pub struct Features { /* private fields */ }Expand description
Features that the device supports. These only include features of the core interface and not API extensions.
Implementations
sourceimpl Features
impl Features
sourcepub const PORTABILITY_MASK: Self = _
pub const PORTABILITY_MASK: Self = _
Bit mask of Vulkan Portability features.
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 SHADER_RESIDENCY_IMAGE_2D: Self = _
pub const SHADER_RESIDENCY_IMAGE_2D: Self = _
sourcepub const SHADER_RESIDENSY_IMAGE_3D: Self = _
pub const SHADER_RESIDENSY_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 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 fn from_bits(bits: u64) -> Option<Self>
pub const fn from_bits(bits: u64) -> 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: u64) -> Self
pub const fn from_bits_truncate(bits: u64) -> Self
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u64) -> Self
pub const unsafe fn from_bits_unchecked(bits: u64) -> 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
sourceimpl BitAndAssign<Features> for Features
impl BitAndAssign<Features> for Features
sourcefn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Disables all flags disabled in the set.
sourceimpl BitOrAssign<Features> for Features
impl BitOrAssign<Features> for Features
sourcefn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Adds the set of flags.
sourceimpl BitXorAssign<Features> for Features
impl BitXorAssign<Features> for Features
sourcefn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Toggles the set of flags.
sourceimpl Extend<Features> for Features
impl Extend<Features> for Features
sourcefn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)sourceimpl FromIterator<Features> for Features
impl FromIterator<Features> for Features
sourcefn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
sourceimpl Ord for Features
impl Ord for Features
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialOrd<Features> for Features
impl PartialOrd<Features> for Features
sourcefn partial_cmp(&self, other: &Features) -> Option<Ordering>
fn partial_cmp(&self, other: &Features) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresourceimpl SubAssign<Features> for Features
impl SubAssign<Features> for Features
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Disables all flags enabled in the set.