struct PrivateCapabilities {Show 18 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,
multi_draw_indirect: bool,
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,
multiview_instance_index_limit: u32,
}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: boolAbility to present contents to any screen. Only needed to work around broken platform configurations.
non_coherent_map_mask: BufferAddress§multi_draw_indirect: bool§robust_buffer_access: boolTrue 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: boolTrue 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: boolTrue 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: boolTrue 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).
multiview_instance_index_limit: u32This is done to panic before undefined behavior, and is imperfect.
Basically, to allow implementations to emulate mv using instancing, if you
want to draw n instances to VR, you must draw 2n instances, but you
can never draw more than u32::MAX instances. Therefore, when drawing
multiview on some vulkan implementations, it might restrict the instance
count, which isn’t usually a thing in webgpu. We don’t expose this limit
because its strange, i.e. only occurs on certain vulkan implementations
if you are drawing more than 128 million instances. We still want to avoid
undefined behavior in this situation, so we panic if the limit is violated.
Implementations§
Source§impl PrivateCapabilities
impl PrivateCapabilities
pub fn map_texture_format(&self, format: TextureFormat) -> Format
Trait Implementations§
Source§impl Clone for PrivateCapabilities
impl Clone for PrivateCapabilities
Source§fn clone(&self) -> PrivateCapabilities
fn clone(&self) -> PrivateCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more