pub struct Limits {Show 15 fields
pub max_bind_groups: u32,
pub max_bindings_per_bind_group: u32,
pub max_dynamic_uniform_buffers_per_pipeline_layout: u32,
pub max_dynamic_storage_buffers_per_pipeline_layout: u32,
pub max_uniform_buffer_binding_size: u32,
pub max_storage_buffer_binding_size: u32,
pub max_buffer_size: u64,
pub max_compute_workgroup_storage_size: u32,
pub max_compute_invocations_per_workgroup: u32,
pub max_compute_workgroup_size_x: u32,
pub max_compute_workgroup_size_y: u32,
pub max_compute_workgroup_size_z: u32,
pub max_compute_workgroups_per_dimension: u32,
pub min_subgroup_size: u32,
pub max_subgroup_size: u32,
}Expand description
Limits for a device.
This is a trimmed-down version of
wgpu::Limits
with only compute-related parameters.
This can be used to, for example, dynamically set workgroup or dispatch dimensions for optimization purposes.
Fields§
§max_bind_groups: u32Amount of bind groups that can be attached to a pipeline at the same time. Defaults to 4. Higher is “better”.
max_bindings_per_bind_group: u32Maximum binding index allowed in create_bind_group_layout.
Defaults to 1000. Higher is “better”.
max_dynamic_uniform_buffers_per_pipeline_layout: u32Amount of uniform buffer bindings that can be dynamic in a single pipeline. Defaults to 8. Higher is “better”.
max_dynamic_storage_buffers_per_pipeline_layout: u32Amount of storage buffer bindings that can be dynamic in a single pipeline. Defaults to 4. Higher is “better”.
max_uniform_buffer_binding_size: u32Maximum size in bytes of a binding to a uniform buffer. Defaults to 64 KiB. Higher is “better”.
max_storage_buffer_binding_size: u32Maximum size in bytes of a binding to a storage buffer. Defaults to 128 MiB. Higher is “better”.
max_buffer_size: u64A limit above which buffer allocations are guaranteed to fail. Defaults to 256 MiB. Higher is “better”.
Buffer allocations below the maximum buffer size may not succeed depending on available memory, fragmentation, and other factors.
max_compute_workgroup_storage_size: u32Maximum number of bytes used for workgroup memory in a compute entry point. Defaults to 16384. Higher is “better”.
max_compute_invocations_per_workgroup: u32Maximum value of the product of the workgroup_size dimensions for a compute entry-point.
Defaults to 256. Higher is “better”.
max_compute_workgroup_size_x: u32The maximum value of the workgroup_size X dimension for a
compute stage ShaderModule entry-point.
Defaults to 256. Higher is “better”.
max_compute_workgroup_size_y: u32The maximum value of the workgroup_size Y dimension for a
compute stage ShaderModule entry-point.
Defaults to 256. Higher is “better”.
max_compute_workgroup_size_z: u32The maximum value of the workgroup_size Z dimension for a
compute stage ShaderModule entry-point.
Defaults to 64. Higher is “better”.
max_compute_workgroups_per_dimension: u32The maximum value for each dimension of a Device::execute(..., [x, y, z]) operation.
Defaults to 65535. Higher is “better”.
min_subgroup_size: u32Minimal number of invocations in a subgroup. Higher is “better”.
max_subgroup_size: u32Maximal number of invocations in a subgroup. Lower is “better”.