pub struct Features { /* private fields */ }
Expand description
Features that the device supports.
These only include features of the core interface and not API extensions.
Can be obtained from a physical device by calling
features
.
Implementations§
Source§impl Features
impl Features
Sourcepub const PORTABILITY_MASK: Self = _
pub const PORTABILITY_MASK: Self = _
Bit mask of Vulkan Portability features.
Sourcepub const WEBGPU_MASK: Self = _
pub const WEBGPU_MASK: Self = _
Bit mask for extra WebGPU features.
Sourcepub const EXTENSIONS_MASK: Self = _
pub const EXTENSIONS_MASK: Self = _
Bit mask for all extensions.
Sourcepub const ROBUST_BUFFER_ACCESS: Self = _
pub const ROBUST_BUFFER_ACCESS: Self = _
Support for robust buffer access. Buffer access by SPIR-V shaders is checked against the buffer/image boundaries.
Sourcepub const FULL_DRAW_INDEX_U32: Self = _
pub const FULL_DRAW_INDEX_U32: Self = _
Support the full 32-bit range of indexed for draw calls.
If not supported, the maximum index value is determined by Limits::max_draw_index_value
.
Sourcepub const IMAGE_CUBE_ARRAY: Self = _
pub const IMAGE_CUBE_ARRAY: Self = _
Support cube array image views.
Sourcepub const INDEPENDENT_BLENDING: Self = _
pub const INDEPENDENT_BLENDING: Self = _
Support different color blending settings per attachments on graphics pipeline creation.
Sourcepub const GEOMETRY_SHADER: Self = _
pub const GEOMETRY_SHADER: Self = _
Support geometry shader.
Sourcepub const TESSELLATION_SHADER: Self = _
pub const TESSELLATION_SHADER: Self = _
Support tessellation shaders.
Sourcepub const SAMPLE_RATE_SHADING: Self = _
pub const SAMPLE_RATE_SHADING: Self = _
Support per-sample shading and multisample interpolation.
Sourcepub const DUAL_SRC_BLENDING: Self = _
pub const DUAL_SRC_BLENDING: Self = _
Support dual source blending.
Sourcepub const MULTI_DRAW_INDIRECT: Self = _
pub const MULTI_DRAW_INDIRECT: Self = _
Support multiple draws per indirect call.
Sourcepub const DRAW_INDIRECT_FIRST_INSTANCE: Self = _
pub const DRAW_INDIRECT_FIRST_INSTANCE: Self = _
Support indirect drawing with first instance value. If not supported the first instance value must be 0.
Sourcepub const DEPTH_CLAMP: Self = _
pub const DEPTH_CLAMP: Self = _
Support depth clamping.
Sourcepub const DEPTH_BIAS_CLAMP: Self = _
pub const DEPTH_BIAS_CLAMP: Self = _
Support depth bias clamping.
Sourcepub const NON_FILL_POLYGON_MODE: Self = _
pub const NON_FILL_POLYGON_MODE: Self = _
Support non-fill polygon modes.
Sourcepub const DEPTH_BOUNDS: Self = _
pub const DEPTH_BOUNDS: Self = _
Support depth bounds test.
Sourcepub const LINE_WIDTH: Self = _
pub const LINE_WIDTH: Self = _
Support lines with width other than 1.0.
Sourcepub const POINT_SIZE: Self = _
pub const POINT_SIZE: Self = _
Support points with size greater than 1.0.
Sourcepub const ALPHA_TO_ONE: Self = _
pub const ALPHA_TO_ONE: Self = _
Support replacing alpha values with 1.0.
Sourcepub const MULTI_VIEWPORTS: Self = _
pub const MULTI_VIEWPORTS: Self = _
Support multiple viewports and scissors.
Sourcepub const SAMPLER_ANISOTROPY: Self = _
pub const SAMPLER_ANISOTROPY: Self = _
Support anisotropic filtering.
Sourcepub const FORMAT_ETC2: Self = _
pub const FORMAT_ETC2: Self = _
Support ETC2 texture compression formats.
Sourcepub const FORMAT_ASTC_LDR: Self = _
pub const FORMAT_ASTC_LDR: Self = _
Support ASTC (LDR) texture compression formats.
Sourcepub const PRECISE_OCCLUSION_QUERY: Self = _
pub const PRECISE_OCCLUSION_QUERY: Self = _
Support precise occlusion queries, returning the actual number of samples. If not supported, queries return a non-zero value when at least one sample passes.
Sourcepub const PIPELINE_STATISTICS_QUERY: Self = _
pub const PIPELINE_STATISTICS_QUERY: Self = _
Support query of pipeline statistics.
Sourcepub const VERTEX_STORES_AND_ATOMICS: Self = _
pub const VERTEX_STORES_AND_ATOMICS: Self = _
Support unordered access stores and atomic ops in the vertex, geometry and tessellation shader stage. If not supported, the shader resources must be annotated as read-only.
Sourcepub const FRAGMENT_STORES_AND_ATOMICS: Self = _
pub const FRAGMENT_STORES_AND_ATOMICS: Self = _
Support unordered access stores and atomic ops in the fragment shader stage If not supported, the shader resources must be annotated as read-only.
Sourcepub const SHADER_TESSELLATION_AND_GEOMETRY_POINT_SIZE: Self = _
pub const SHADER_TESSELLATION_AND_GEOMETRY_POINT_SIZE: Self = _
Sourcepub const SHADER_IMAGE_GATHER_EXTENDED: Self = _
pub const SHADER_IMAGE_GATHER_EXTENDED: Self = _
Sourcepub const SHADER_STORAGE_IMAGE_EXTENDED_FORMATS: Self = _
pub const SHADER_STORAGE_IMAGE_EXTENDED_FORMATS: Self = _
Sourcepub const SHADER_STORAGE_IMAGE_MULTISAMPLE: Self = _
pub const SHADER_STORAGE_IMAGE_MULTISAMPLE: Self = _
Sourcepub const SHADER_STORAGE_IMAGE_READ_WITHOUT_FORMAT: Self = _
pub const SHADER_STORAGE_IMAGE_READ_WITHOUT_FORMAT: Self = _
Sourcepub const SHADER_STORAGE_IMAGE_WRITE_WITHOUT_FORMAT: Self = _
pub const SHADER_STORAGE_IMAGE_WRITE_WITHOUT_FORMAT: Self = _
Sourcepub const SHADER_UNIFORM_BUFFER_ARRAY_DYNAMIC_INDEXING: Self = _
pub const SHADER_UNIFORM_BUFFER_ARRAY_DYNAMIC_INDEXING: Self = _
Sourcepub const SHADER_SAMPLED_IMAGE_ARRAY_DYNAMIC_INDEXING: Self = _
pub const SHADER_SAMPLED_IMAGE_ARRAY_DYNAMIC_INDEXING: Self = _
Sourcepub const SHADER_STORAGE_BUFFER_ARRAY_DYNAMIC_INDEXING: Self = _
pub const SHADER_STORAGE_BUFFER_ARRAY_DYNAMIC_INDEXING: Self = _
Sourcepub const SHADER_STORAGE_IMAGE_ARRAY_DYNAMIC_INDEXING: Self = _
pub const SHADER_STORAGE_IMAGE_ARRAY_DYNAMIC_INDEXING: Self = _
Sourcepub const SHADER_CLIP_DISTANCE: Self = _
pub const SHADER_CLIP_DISTANCE: Self = _
Sourcepub const SHADER_CULL_DISTANCE: Self = _
pub const SHADER_CULL_DISTANCE: Self = _
Sourcepub const SHADER_FLOAT64: Self = _
pub const SHADER_FLOAT64: Self = _
Sourcepub const SHADER_INT64: Self = _
pub const SHADER_INT64: Self = _
Sourcepub const SHADER_INT16: Self = _
pub const SHADER_INT16: Self = _
Sourcepub const SHADER_RESOURCE_RESIDENCY: Self = _
pub const SHADER_RESOURCE_RESIDENCY: Self = _
Sourcepub const SHADER_RESOURCE_MIN_LOD: Self = _
pub const SHADER_RESOURCE_MIN_LOD: Self = _
Sourcepub const SPARSE_BINDING: Self = _
pub const SPARSE_BINDING: Self = _
Sourcepub const SPARSE_RESIDENCY_BUFFER: Self = _
pub const SPARSE_RESIDENCY_BUFFER: Self = _
Sourcepub const SPARSE_RESIDENCY_IMAGE_2D: Self = _
pub const SPARSE_RESIDENCY_IMAGE_2D: Self = _
Sourcepub const SPARSE_RESIDENCY_IMAGE_3D: Self = _
pub const SPARSE_RESIDENCY_IMAGE_3D: Self = _
Sourcepub const SPARSE_RESIDENCY_2_SAMPLES: Self = _
pub const SPARSE_RESIDENCY_2_SAMPLES: Self = _
Sourcepub const SPARSE_RESIDENCY_4_SAMPLES: Self = _
pub const SPARSE_RESIDENCY_4_SAMPLES: Self = _
Sourcepub const SPARSE_RESIDENCY_8_SAMPLES: Self = _
pub const SPARSE_RESIDENCY_8_SAMPLES: Self = _
Sourcepub const SPARSE_RESIDENCY_16_SAMPLES: Self = _
pub const SPARSE_RESIDENCY_16_SAMPLES: Self = _
Sourcepub const SPARSE_RESIDENCY_ALIASED: Self = _
pub const SPARSE_RESIDENCY_ALIASED: Self = _
Sourcepub const VARIABLE_MULTISAMPLE_RATE: Self = _
pub const VARIABLE_MULTISAMPLE_RATE: Self = _
Sourcepub const INHERITED_QUERIES: Self = _
pub const INHERITED_QUERIES: Self = _
Sourcepub const TEXTURE_DESCRIPTOR_ARRAY: Self = _
pub const TEXTURE_DESCRIPTOR_ARRAY: Self = _
Support for arrays of texture descriptors
Sourcepub const SAMPLER_MIRROR_CLAMP_EDGE: Self = _
pub const SAMPLER_MIRROR_CLAMP_EDGE: Self = _
Support for
Sourcepub const SAMPLED_TEXTURE_DESCRIPTOR_INDEXING: Self = _
pub const SAMPLED_TEXTURE_DESCRIPTOR_INDEXING: Self = _
Allow indexing sampled texture descriptor arrays with dynamically non-uniform data
Sourcepub const STORAGE_TEXTURE_DESCRIPTOR_INDEXING: Self = _
pub const STORAGE_TEXTURE_DESCRIPTOR_INDEXING: Self = _
Allow indexing storage texture descriptor arrays with dynamically non-uniform data
Sourcepub const UNSIZED_DESCRIPTOR_ARRAY: Self = _
pub const UNSIZED_DESCRIPTOR_ARRAY: Self = _
Allow descriptor arrays to be unsized in shaders
Sourcepub const DESCRIPTOR_INDEXING_MASK: Self = _
pub const DESCRIPTOR_INDEXING_MASK: Self = _
Mask for all the features associated with descriptor indexing.
Sourcepub const DRAW_INDIRECT_COUNT: Self = _
pub const DRAW_INDIRECT_COUNT: Self = _
Enable draw_indirect_count and draw_indexed_indirect_count
Sourcepub const CONSERVATIVE_RASTERIZATION: Self = _
pub const CONSERVATIVE_RASTERIZATION: Self = _
Support for conservative rasterization. Presence of this flag only indicates basic overestimation rasterization for triangles only. (no guarantee on underestimation, overestimation, handling of degenerate primitives, fragment shader coverage reporting and uncertainty ranges)
Sourcepub const BUFFER_DESCRIPTOR_ARRAY: Self = _
pub const BUFFER_DESCRIPTOR_ARRAY: Self = _
Support for arrays of buffer descriptors
Sourcepub const UNIFORM_BUFFER_DESCRIPTOR_INDEXING: Self = _
pub const UNIFORM_BUFFER_DESCRIPTOR_INDEXING: Self = _
Allow indexing uniform buffer descriptor arrays with dynamically non-uniform data
Sourcepub const STORAGE_BUFFER_DESCRIPTOR_INDEXING: Self = _
pub const STORAGE_BUFFER_DESCRIPTOR_INDEXING: Self = _
Allow indexing storage buffer descriptor arrays with dynamically non-uniform data
Sourcepub const TRIANGLE_FAN: Self = _
pub const TRIANGLE_FAN: Self = _
Support triangle fan primitive topology.
Sourcepub const SEPARATE_STENCIL_REF_VALUES: Self = _
pub const SEPARATE_STENCIL_REF_VALUES: Self = _
Support separate stencil reference values for front and back sides.
Sourcepub const INSTANCE_RATE: Self = _
pub const INSTANCE_RATE: Self = _
Support manually specified vertex attribute rates (divisors).
Sourcepub const SAMPLER_MIP_LOD_BIAS: Self = _
pub const SAMPLER_MIP_LOD_BIAS: Self = _
Support non-zero mipmap bias on samplers.
Sourcepub const SAMPLER_BORDER_COLOR: Self = _
pub const SAMPLER_BORDER_COLOR: Self = _
Support sampler wrap mode that clamps to border.
Sourcepub const MUTABLE_COMPARISON_SAMPLER: Self = _
pub const MUTABLE_COMPARISON_SAMPLER: Self = _
Can create comparison samplers in regular descriptor sets.
Sourcepub const MUTABLE_UNNORMALIZED_SAMPLER: Self = _
pub const MUTABLE_UNNORMALIZED_SAMPLER: Self = _
Can create non-normalized samplers in regular descriptor sets.
Sourcepub const NDC_Y_UP: Self = _
pub const NDC_Y_UP: Self = _
Make the NDC coordinate system pointing Y up, to match D3D and Metal.
Sourcepub const TASK_SHADER: Self = _
pub const TASK_SHADER: Self = _
Supports task shader stage.
Sourcepub const MESH_SHADER: Self = _
pub const MESH_SHADER: Self = _
Supports mesh shader stage.
Sourcepub const MESH_SHADER_MASK: Self = _
pub const MESH_SHADER_MASK: Self = _
Mask for all the features associated with mesh shader stages.
Sourcepub const SAMPLER_REDUCTION: Self = _
pub const SAMPLER_REDUCTION: Self = _
Support sampler min/max reduction mode.
Sourcepub const EXTERNAL_MEMORY: Self = _
pub const EXTERNAL_MEMORY: Self = _
Supports external memory import and export.
Sourcepub const fn from_bits(bits: u128) -> Option<Self>
pub const fn from_bits(bits: u128) -> Option<Self>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u128) -> Self
pub const fn from_bits_truncate(bits: u128) -> Self
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u128) -> Self
pub const unsafe fn from_bits_unchecked(bits: u128) -> Self
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
§Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Returns true
if all of the flags in other
are contained within self
.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Inserts or removes the specified flags depending on the passed value.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations§
Source§impl BitAndAssign for Features
impl BitAndAssign for Features
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Disables all flags disabled in the set.
Source§impl BitOrAssign for Features
impl BitOrAssign for Features
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Adds the set of flags.
Source§impl BitXorAssign for Features
impl BitXorAssign for Features
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Toggles the set of flags.
Source§impl Extend<Features> for Features
impl Extend<Features> for Features
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<Features> for Features
impl FromIterator<Features> for Features
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
Source§impl Ord for Features
impl Ord for Features
Source§impl PartialOrd for Features
impl PartialOrd for Features
Source§impl SubAssign for Features
impl SubAssign for Features
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Disables all flags enabled in the set.