#[non_exhaustive]
#[repr(i32)]
pub enum DynamicState {
Show 28 variants Viewport = 0, Scissor = 1, LineWidth = 2, DepthBias = 3, BlendConstants = 4, DepthBounds = 5, StencilCompareMask = 6, StencilWriteMask = 7, StencilReference = 8, CullMode = 1_000_267_000, FrontFace = 1_000_267_001, PrimitiveTopology = 1_000_267_002, ViewportWithCount = 1_000_267_003, ScissorWithCount = 1_000_267_004, DepthTestEnable = 1_000_267_006, DepthWriteEnable = 1_000_267_007, DepthCompareOp = 1_000_267_008, DepthBoundsTestEnable = 1_000_267_009, StencilTestEnable = 1_000_267_010, StencilOp = 1_000_267_011, RasterizerDiscardEnable = 1_000_377_001, DepthBiasEnable = 1_000_377_002, PrimitiveRestartEnable = 1_000_377_004, DiscardRectangle = 1_000_099_000, LineStipple = 1_000_259_000, PatchControlPoints = 1_000_377_000, LogicOp = 1_000_377_003, ColorWriteEnable = 1_000_381_000,
}
Expand description

A particular state value within a pipeline that can be dynamically set by a command buffer.

Whenever a particular state is set to be dynamic while creating the pipeline, the corresponding predefined value in the pipeline’s create info is ignored, unless specified otherwise here.

If the dynamic state is used to enable/disable a certain functionality, and the value in the create info is an Option (for example, DynamicState::DepthTestEnable and DepthStencilState::depth), then that Option must be Some when creating the pipeline, in order to provide settings to use when the functionality is enabled.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Viewport = 0

The elements, but not the count, of ViewportState::viewports.

Set with set_viewport.

§

Scissor = 1

The elements, but not the count, of ViewportState::scissors.

Set with set_scissor.

§

LineWidth = 2

§

DepthBias = 3

§

BlendConstants = 4

§

DepthBounds = 5

The value, but not the Option variant, of DepthStencilState::depth_bounds.

Set with set_depth_bounds.

§

StencilCompareMask = 6

The value of StencilOpState::compare_mask for both the front and back face.

Set with set_stencil_compare_mask.

§

StencilWriteMask = 7

The value of StencilOpState::write_mask for both the front and back face.

Set with set_stencil_write_mask.

§

StencilReference = 8

The value of StencilOpState::reference for both the front and back face.

Set with set_stencil_reference.

§

CullMode = 1_000_267_000

§

FrontFace = 1_000_267_001

§

PrimitiveTopology = 1_000_267_002

§

ViewportWithCount = 1_000_267_003

Both the elements and the count of ViewportState::viewports.

Set with set_viewport_with_count.

§

ScissorWithCount = 1_000_267_004

Both the elements and the count of ViewportState::scissors.

Set with set_scissor_with_count.

§

DepthTestEnable = 1_000_267_006

The Option variant of DepthStencilState::depth.

Set with set_depth_test_enable.

§

DepthWriteEnable = 1_000_267_007

§

DepthCompareOp = 1_000_267_008

§

DepthBoundsTestEnable = 1_000_267_009

§

StencilTestEnable = 1_000_267_010

The Option variant of DepthStencilState::stencil.

Set with set_stencil_test_enable.

§

StencilOp = 1_000_267_011

The value of StencilOpState::ops for both the front and back face.

Set with set_stencil_op.

§

RasterizerDiscardEnable = 1_000_377_001

§

DepthBiasEnable = 1_000_377_002

The Option variant of RasterizationState::depth_bias.

Set with set_depth_bias_enable.

§

PrimitiveRestartEnable = 1_000_377_004

§

DiscardRectangle = 1_000_099_000

The elements, but not count, of DiscardRectangleState::rectangles.

Set with set_discard_rectangle.

§

LineStipple = 1_000_259_000

§

PatchControlPoints = 1_000_377_000

§

LogicOp = 1_000_377_003

The value of ColorBlendState::logic_op.

Set with set_logic_op.

§

ColorWriteEnable = 1_000_381_000

The value of ColorBlendAttachmentState::color_write_enable for every attachment.

Set with set_color_write_enable.

Trait Implementations§

source§

impl Clone for DynamicState

source§

fn clone(&self) -> DynamicState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DynamicState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<DynamicState> for DynamicState

source§

fn from(val: DynamicState) -> Self

Converts to this type from the input type.
source§

impl Hash for DynamicState

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for DynamicState

source§

fn eq(&self, other: &DynamicState) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<DynamicState> for DynamicState

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(val: DynamicState) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for DynamicState

source§

impl Eq for DynamicState

source§

impl StructuralEq for DynamicState

source§

impl StructuralPartialEq for DynamicState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.