pub struct Limits {
pub max_workgroup_size_x: u32,
pub max_workgroup_size_y: u32,
pub max_workgroup_size_z: u32,
pub max_invocations_per_workgroup: u32,
pub max_workgroups_per_dim: u32,
}Expand description
A conservative, portable subset of the WebGPU compute limits a planner
needs. Field names follow the WebGPU / wgpu limit names.
Limits::portable_default reflects the guaranteed lower bounds every
conformant WebGPU adapter must expose, so planning against it yields
dispatches that run everywhere.
Fields§
§max_workgroup_size_x: u32maxComputeWorkgroupSizeX.
max_workgroup_size_y: u32maxComputeWorkgroupSizeY.
max_workgroup_size_z: u32maxComputeWorkgroupSizeZ.
max_invocations_per_workgroup: u32maxComputeInvocationsPerWorkgroup — product of the three axes must
not exceed this.
max_workgroups_per_dim: u32maxComputeWorkgroupsPerDimension.
Implementations§
Source§impl Limits
impl Limits
Sourcepub fn portable_default() -> Self
pub fn portable_default() -> Self
The WebGPU guaranteed lower bounds (Chrome / Firefox / Safari all expose at least these).
256 invocations, (256, 256, 64) per-axis sizes, 65535 workgroups
per dimension.
Sourcepub fn desktop_default() -> Self
pub fn desktop_default() -> Self
A higher-end desktop profile (e.g. discrete NVIDIA / AMD via Vulkan)
exposing 1024 invocations per workgroup.
Trait Implementations§
impl Copy for Limits
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.