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§
Source§impl Features
impl Features
Sourcepub const PORTABILITY_MASK: Features
pub const PORTABILITY_MASK: Features
Bit mask of Vulkan Portability features.
Sourcepub const ROBUST_BUFFER_ACCESS: Features
pub const ROBUST_BUFFER_ACCESS: Features
Support for robust buffer access. Buffer access by SPIR-V shaders is checked against the buffer/image boundaries.
Sourcepub const FULL_DRAW_INDEX_U32: Features
pub const FULL_DRAW_INDEX_U32: Features
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: Features
pub const IMAGE_CUBE_ARRAY: Features
Support cube array image views.
Sourcepub const INDEPENDENT_BLENDING: Features
pub const INDEPENDENT_BLENDING: Features
Support different color blending settings per attachments on graphics pipeline creation.
Sourcepub const GEOMETRY_SHADER: Features
pub const GEOMETRY_SHADER: Features
Support geometry shader.
Sourcepub const TESSELLATION_SHADER: Features
pub const TESSELLATION_SHADER: Features
Support tessellation shaders.
Sourcepub const SAMPLE_RATE_SHADING: Features
pub const SAMPLE_RATE_SHADING: Features
Support per-sample shading and multisample interpolation.
Sourcepub const DUAL_SRC_BLENDING: Features
pub const DUAL_SRC_BLENDING: Features
Support dual source blending.
Sourcepub const MULTI_DRAW_INDIRECT: Features
pub const MULTI_DRAW_INDIRECT: Features
Support multiple draws per indirect call.
Sourcepub const DRAW_INDIRECT_FIRST_INSTANCE: Features
pub const DRAW_INDIRECT_FIRST_INSTANCE: Features
Support indirect drawing with first instance value. If not supported the first instance value must be 0.
Sourcepub const DEPTH_CLAMP: Features
pub const DEPTH_CLAMP: Features
Support depth clamping.
Sourcepub const DEPTH_BIAS_CLAMP: Features
pub const DEPTH_BIAS_CLAMP: Features
Support depth bias clamping.
Sourcepub const NON_FILL_POLYGON_MODE: Features
pub const NON_FILL_POLYGON_MODE: Features
Support non-fill polygon modes.
Sourcepub const DEPTH_BOUNDS: Features
pub const DEPTH_BOUNDS: Features
Support depth bounds test.
Sourcepub const LINE_WIDTH: Features
pub const LINE_WIDTH: Features
Support lines with width other than 1.0.
Sourcepub const POINT_SIZE: Features
pub const POINT_SIZE: Features
Support points with size greater than 1.0.
Sourcepub const ALPHA_TO_ONE: Features
pub const ALPHA_TO_ONE: Features
Support replacing alpha values with 1.0.
Sourcepub const MULTI_VIEWPORTS: Features
pub const MULTI_VIEWPORTS: Features
Support multiple viewports and scissors.
Sourcepub const SAMPLER_ANISOTROPY: Features
pub const SAMPLER_ANISOTROPY: Features
Support anisotropic filtering.
Sourcepub const FORMAT_ETC2: Features
pub const FORMAT_ETC2: Features
Support ETC2 texture compression formats.
Sourcepub const FORMAT_ASTC_LDR: Features
pub const FORMAT_ASTC_LDR: Features
Support ASTC (LDR) texture compression formats.
Sourcepub const PRECISE_OCCLUSION_QUERY: Features
pub const PRECISE_OCCLUSION_QUERY: Features
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: Features
pub const PIPELINE_STATISTICS_QUERY: Features
Support query of pipeline statistics.
Sourcepub const VERTEX_STORES_AND_ATOMICS: Features
pub const VERTEX_STORES_AND_ATOMICS: Features
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: Features
pub const FRAGMENT_STORES_AND_ATOMICS: Features
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_IMAGE_GATHER_EXTENDED: Features
pub const SHADER_IMAGE_GATHER_EXTENDED: Features
Sourcepub const SHADER_STORAGE_IMAGE_MULTISAMPLE: Features
pub const SHADER_STORAGE_IMAGE_MULTISAMPLE: Features
Sourcepub const SHADER_CLIP_DISTANCE: Features
pub const SHADER_CLIP_DISTANCE: Features
Sourcepub const SHADER_CULL_DISTANCE: Features
pub const SHADER_CULL_DISTANCE: Features
Sourcepub const SHADER_FLOAT64: Features
pub const SHADER_FLOAT64: Features
Sourcepub const SHADER_INT64: Features
pub const SHADER_INT64: Features
Sourcepub const SHADER_INT16: Features
pub const SHADER_INT16: Features
Sourcepub const SHADER_RESOURCE_RESIDENCY: Features
pub const SHADER_RESOURCE_RESIDENCY: Features
Sourcepub const SHADER_RESOURCE_MIN_LOD: Features
pub const SHADER_RESOURCE_MIN_LOD: Features
Sourcepub const SPARSE_BINDING: Features
pub const SPARSE_BINDING: Features
Sourcepub const SPARSE_RESIDENCY_BUFFER: Features
pub const SPARSE_RESIDENCY_BUFFER: Features
Sourcepub const SPARSE_RESIDENCY_IMAGE_2D: Features
pub const SPARSE_RESIDENCY_IMAGE_2D: Features
Sourcepub const SPARSE_RESIDENCY_IMAGE_3D: Features
pub const SPARSE_RESIDENCY_IMAGE_3D: Features
Sourcepub const SPARSE_RESIDENCY_2_SAMPLES: Features
pub const SPARSE_RESIDENCY_2_SAMPLES: Features
Sourcepub const SPARSE_RESIDENCY_4_SAMPLES: Features
pub const SPARSE_RESIDENCY_4_SAMPLES: Features
Sourcepub const SPARSE_RESIDENCY_8_SAMPLES: Features
pub const SPARSE_RESIDENCY_8_SAMPLES: Features
Sourcepub const SPARSE_RESIDENCY_16_SAMPLES: Features
pub const SPARSE_RESIDENCY_16_SAMPLES: Features
Sourcepub const SPARSE_RESIDENCY_ALIASED: Features
pub const SPARSE_RESIDENCY_ALIASED: Features
Sourcepub const VARIABLE_MULTISAMPLE_RATE: Features
pub const VARIABLE_MULTISAMPLE_RATE: Features
Sourcepub const INHERITED_QUERIES: Features
pub const INHERITED_QUERIES: Features
Sourcepub const TRIANGLE_FAN: Features
pub const TRIANGLE_FAN: Features
Support triangle fan primitive topology.
Sourcepub const SEPARATE_STENCIL_REF_VALUES: Features
pub const SEPARATE_STENCIL_REF_VALUES: Features
Support separate stencil reference values for front and back sides.
Sourcepub const INSTANCE_RATE: Features
pub const INSTANCE_RATE: Features
Support manually specified vertex attribute rates (divisors).
Sourcepub const SAMPLER_MIP_LOD_BIAS: Features
pub const SAMPLER_MIP_LOD_BIAS: Features
Support non-zero mipmap bias on samplers.
Sourcepub const fn from_bits(bits: u64) -> Option<Features>
pub const fn from_bits(bits: u64) -> Option<Features>
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) -> Features
pub const fn from_bits_truncate(bits: u64) -> Features
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u64) -> Features
pub const unsafe fn from_bits_unchecked(bits: u64) -> Features
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: Features) -> bool
pub const fn intersects(&self, other: Features) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: Features) -> bool
pub const fn contains(&self, other: Features) -> bool
Returns true
if all of the flags in other
are contained within self
.
Sourcepub fn set(&mut self, other: Features, value: bool)
pub fn set(&mut self, other: Features, value: bool)
Inserts or removes the specified flags depending on the passed value.
Sourcepub const fn intersection(self, other: Features) -> Features
pub const fn intersection(self, other: Features) -> Features
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: Features) -> Features
pub const fn union(self, other: Features) -> Features
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: Features) -> Features
pub const fn difference(self, other: Features) -> Features
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: Features) -> Features
pub const fn symmetric_difference(self, other: Features) -> Features
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) -> Features
pub const fn complement(self) -> Features
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: Features)
fn bitand_assign(&mut self, other: Features)
Disables all flags disabled in the set.
Source§impl BitOrAssign for Features
impl BitOrAssign for Features
Source§fn bitor_assign(&mut self, other: Features)
fn bitor_assign(&mut self, other: Features)
Adds the set of flags.
Source§impl BitXorAssign for Features
impl BitXorAssign for Features
Source§fn bitxor_assign(&mut self, other: Features)
fn bitxor_assign(&mut self, other: Features)
Toggles the set of flags.
Source§impl Extend<Features> for Features
impl Extend<Features> for Features
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Features>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Features>,
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§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: Features)
fn sub_assign(&mut self, other: Features)
Disables all flags enabled in the set.