wgpu_hal::vulkan

Struct PrivateCapabilities

Source
struct PrivateCapabilities {
Show 16 fields image_view_usage: bool, timeline_semaphores: bool, texture_d24: bool, texture_d24_s8: bool, texture_s8: bool, can_present: bool, non_coherent_map_mask: BufferAddress, robust_buffer_access: bool, robust_image_access: bool, robust_buffer_access2: bool, robust_image_access2: bool, zero_initialize_workgroup_memory: bool, image_format_list: bool, maximum_samplers: u32, shader_integer_dot_product: bool, shader_int8: bool,
}
Available on vulkan only.
Expand description

Set of internal capabilities, which don’t show up in the exposed device geometry, but affect the code paths taken internally.

Fields§

§image_view_usage: bool§timeline_semaphores: bool§texture_d24: bool§texture_d24_s8: bool§texture_s8: bool§can_present: bool

Ability to present contents to any screen. Only needed to work around broken platform configurations.

§non_coherent_map_mask: BufferAddress§robust_buffer_access: bool

True if this adapter advertises the robustBufferAccess feature.

Note that Vulkan’s robustBufferAccess is not sufficient to implement wgpu_hal’s guarantee that shaders will not access buffer contents via a given bindgroup binding outside that binding’s accessible region. Enabling robustBufferAccess does ensure that out-of-bounds reads and writes are not undefined behavior (that’s good), but still permits out-of-bounds reads to return data from anywhere within the buffer, not just the accessible region.

§robust_image_access: bool§robust_buffer_access2: bool

True if this adapter supports the VK_EXT_robustness2 extension’s robustBufferAccess2 feature.

This is sufficient to implement wgpu_hal’s required bounds-checking of shader accesses to buffer contents. If this feature is not available, this backend must have Naga inject bounds checks in the generated SPIR-V.

§robust_image_access2: bool§zero_initialize_workgroup_memory: bool§image_format_list: bool§maximum_samplers: u32§shader_integer_dot_product: bool

True if this adapter supports the VK_KHR_shader_integer_dot_product extension (promoted to Vulkan 1.3).

This is used to generate optimized code for WGSL’s dot4{I, U}8Packed.

§shader_int8: bool

True if this adapter supports 8-bit integers provided by the VK_KHR_shader_float16_int8 extension (promoted to Vulkan 1.2).

Allows shaders to declare the “Int8” capability. Note, however, that this feature alone allows the use of 8-bit integers “only in the Private, Workgroup (for non-Block variables), and Function storage classes” (see spec). To use 8-bit integers in the interface storage classes (e.g., StorageBuffer), you also need to enable the corresponding feature in VkPhysicalDevice8BitStorageFeatures and declare the corresponding SPIR-V capability (e.g., StorageBuffer8BitAccess).

Implementations§

Trait Implementations§

Source§

impl Clone for PrivateCapabilities

Source§

fn clone(&self) -> PrivateCapabilities

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PrivateCapabilities

Source§

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

Formats the value using the given formatter. 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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,