#[repr(C)]pub struct DepthStencilStateDescriptor {
pub format: TextureFormat,
pub depth_write_enabled: bool,
pub depth_compare: CompareFunction,
pub stencil_front: StencilStateFaceDescriptor,
pub stencil_back: StencilStateFaceDescriptor,
pub stencil_read_mask: u32,
pub stencil_write_mask: u32,
}
Expand description
Describes the depth/stencil state in a render pipeline.
Fields§
§format: TextureFormat
Format of the depth/stencil buffer, must be special depth format. Must match the the format
of the depth/stencil attachment in [CommandEncoder::begin_render_pass
].
depth_write_enabled: bool
If disabled, depth will not be written to.
depth_compare: CompareFunction
Comparison function used to compare depth values in the depth test.
stencil_front: StencilStateFaceDescriptor
Stencil state used for front faces.
stencil_back: StencilStateFaceDescriptor
Stencil state used for back faces.
stencil_read_mask: u32
Stencil values are AND’d with this mask when reading and writing from the stencil buffer. Only low 8 bits are used.
stencil_write_mask: u32
Stencil values are AND’d with this mask when writing to the stencil buffer. Only low 8 bits are used.
Implementations§
Source§impl DepthStencilStateDescriptor
impl DepthStencilStateDescriptor
pub fn needs_stencil_reference(&self) -> bool
pub fn is_read_only(&self) -> bool
Trait Implementations§
Source§impl Clone for DepthStencilStateDescriptor
impl Clone for DepthStencilStateDescriptor
Source§fn clone(&self) -> DepthStencilStateDescriptor
fn clone(&self) -> DepthStencilStateDescriptor
Returns a duplicate 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 DepthStencilStateDescriptor
impl Debug for DepthStencilStateDescriptor
Source§impl<'de> Deserialize<'de> for DepthStencilStateDescriptor
impl<'de> Deserialize<'de> for DepthStencilStateDescriptor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DepthStencilStateDescriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DepthStencilStateDescriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for DepthStencilStateDescriptor
impl Hash for DepthStencilStateDescriptor
Source§impl Serialize for DepthStencilStateDescriptor
impl Serialize for DepthStencilStateDescriptor
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for DepthStencilStateDescriptor
impl StructuralPartialEq for DepthStencilStateDescriptor
Auto Trait Implementations§
impl Freeze for DepthStencilStateDescriptor
impl RefUnwindSafe for DepthStencilStateDescriptor
impl Send for DepthStencilStateDescriptor
impl Sync for DepthStencilStateDescriptor
impl Unpin for DepthStencilStateDescriptor
impl UnwindSafe for DepthStencilStateDescriptor
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