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 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.