pub struct ShaderBoundChecks { /* private fields */ }
Expand description
Describes how shader bound checks should be performed.
Implementations§
Source§impl ShaderBoundChecks
impl ShaderBoundChecks
Sourcepub unsafe fn unchecked() -> Self
pub unsafe fn unchecked() -> Self
Creates a new configuration where the shader isn’t bound checked.
§Safety
The caller MUST ensure that all shaders built with this configuration don’t perform any out of bounds reads or writes.
Note that wgpu_core
, in particular, initializes only those portions of
buffers that it expects might be read, and it does not expect contents
outside the ranges bound in bindgroups to be accessible, so using this
configuration with ill-behaved shaders could expose uninitialized GPU
memory contents to the application.
Sourcepub fn runtime_checks(&self) -> bool
pub fn runtime_checks(&self) -> bool
Query whether runtime bound checks are enabled in this configuration
Trait Implementations§
Source§impl Clone for ShaderBoundChecks
impl Clone for ShaderBoundChecks
Source§fn clone(&self) -> ShaderBoundChecks
fn clone(&self) -> ShaderBoundChecks
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ShaderBoundChecks
impl Debug for ShaderBoundChecks
Source§impl Default for ShaderBoundChecks
impl Default for ShaderBoundChecks
Source§impl<'de> Deserialize<'de> for ShaderBoundChecks
impl<'de> Deserialize<'de> for ShaderBoundChecks
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ShaderBoundChecks
impl RefUnwindSafe for ShaderBoundChecks
impl Send for ShaderBoundChecks
impl Sync for ShaderBoundChecks
impl Unpin for ShaderBoundChecks
impl UnwindSafe for ShaderBoundChecks
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)