Skip to main content

Features

Struct Features 

Source
pub struct Features {
Show 37 fields pub timestamps: bool, pub multi_draw_indirect: bool, pub draw_indirect_first_instance: bool, pub draw_indirect_count: bool, pub bindless: bool, pub subgroups: bool, pub subgroups_webgpu: bool, pub subgroup_stages: u32, pub subgroup_ops: u32, pub subgroup_size_control: bool, pub subgroup_extended_types: bool, pub draw_parameters: bool, pub shader_f16: bool, pub shader_f64: bool, pub shader_i16: bool, pub shader_i64: bool, pub shader_i8: bool, pub storage_16bit: bool, pub uniform_16bit: bool, pub push_constant_16bit: bool, pub uniform_standard_layout: bool, pub demote: bool, pub clip_distances: bool, pub primitive_index: bool, pub sample_shading: bool, pub storage_8bit: bool, pub texture_bc: bool, pub anisotropy: bool, pub depth_clamp: bool, pub vertex_stores: bool, pub fragment_stores: bool, pub storage_write_without_format: bool, pub buffer_address: bool, pub swapchain: bool, pub mesh_shader: bool, pub ray_query: bool, pub ray_pipeline: bool,
}
Expand description

what a device can do beyond the Basis level

Fields§

§timestamps: bool

GPU timestamps on the queue (Timestamps)

§multi_draw_indirect: bool

draw_indexed_indirect_multi (several draws from one buffer)

§draw_indirect_first_instance: bool

a first instance other than 0 in indirect draws

§draw_indirect_count: bool

draw_indexed_indirect_count

§bindless: bool

Bindless tables (descriptor indexing, update after bind)

§subgroups: bool

subgroup operations (basic, vote, ballot, arithmetic, shuffle) in compute shaders

§subgroups_webgpu: bool

what WebGPU’s subgroups feature needs (lib/wgsl’s enable subgroups): the operations of subgroups plus relative shuffles and quad operations, in compute and fragment shaders

§subgroup_stages: u32

the stages with subgroup operations (subgroup_stage::) and the operations (subgroup_op::), as the device reports them

§subgroup_ops: u32§subgroup_size_control: bool

Device::create_compute_pipeline_sized: a required subgroup size (WGSL @subgroup_size; Limits::subgroup_min_size ..= subgroup_max_size)

§subgroup_extended_types: bool

subgroup operations on f16 values too

§draw_parameters: bool

the base vertex / base instance / draw index builtins

§shader_f16: bool§shader_f64: bool§shader_i16: bool§shader_i64: bool§shader_i8: bool§storage_16bit: bool

16 / 8 bit values in storage buffers

§uniform_16bit: bool

16-bit values in uniform buffers and push constants too (WGSL f16 there)

§push_constant_16bit: bool§uniform_standard_layout: bool

uniform buffers in the storage layout (uniformBufferStandardLayout: a WGSL uniform buffer whose layout is not std140, e.g. mat2x2f)

§demote: bool

OpDemoteToHelperInvocation (lib/wgsl’s discard at the level Voll)

§clip_distances: bool

WGSL @builtin(clip_distances), @builtin(primitive_index) (geometryShader), @interpolate(.., sample) / @builtin(sample_index) (sampleRateShading)

§primitive_index: bool§sample_shading: bool§storage_8bit: bool§texture_bc: bool

BC1 .. BC7 compressed textures

§anisotropy: bool§depth_clamp: bool§vertex_stores: bool

storage writes in vertex / fragment shaders

§fragment_stores: bool§storage_write_without_format: bool

storage textures without a format in the shader

§buffer_address: bool

shader access to buffers by address

§swapchain: bool

presentation to windows (Swapchain)

§mesh_shader: bool

present on the adapter, not enabled yet: mesh shaders, ray queries, ray-tracing pipelines

§ray_query: bool§ray_pipeline: bool

Trait Implementations§

Source§

impl Clone for Features

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Features

Source§

impl Debug for Features

Source§

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

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

impl Default for Features

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.