#[repr(C)]pub struct DispatchIndirectArgs {
pub x: u32,
pub y: u32,
pub z: u32,
}Expand description
Layout-stable representation of workgroup dispatch dimensions stored in GPU memory.
The struct is repr(C) so that its in-memory byte layout is well-defined
and can be written directly to a GPU buffer via
wgpu::Queue::write_buffer. It corresponds to the 12-byte
VkDispatchIndirectCommand structure (and its equivalents in D3D12 and
Metal).
§Layout
| Bytes | Field | Meaning |
|---|---|---|
| 0–3 | x | Workgroup count along X axis |
| 4–7 | y | Workgroup count along Y axis |
| 8–11 | z | Workgroup count along Z axis |
All values are stored in little-endian byte order when serialised via
DispatchIndirectArgs::as_bytes.
Fields§
§x: u32Workgroup count along the X dispatch dimension.
y: u32Workgroup count along the Y dispatch dimension.
z: u32Workgroup count along the Z dispatch dimension.
Implementations§
Source§impl DispatchIndirectArgs
impl DispatchIndirectArgs
Sourcepub fn new(x: u32, y: u32, z: u32) -> Self
pub fn new(x: u32, y: u32, z: u32) -> Self
Create new dispatch arguments with explicit x / y / z workgroup counts.
Trait Implementations§
Source§impl Clone for DispatchIndirectArgs
impl Clone for DispatchIndirectArgs
Source§fn clone(&self) -> DispatchIndirectArgs
fn clone(&self) -> DispatchIndirectArgs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DispatchIndirectArgs
Source§impl Debug for DispatchIndirectArgs
impl Debug for DispatchIndirectArgs
impl Eq for DispatchIndirectArgs
Source§impl PartialEq for DispatchIndirectArgs
impl PartialEq for DispatchIndirectArgs
Source§fn eq(&self, other: &DispatchIndirectArgs) -> bool
fn eq(&self, other: &DispatchIndirectArgs) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DispatchIndirectArgs
Auto Trait Implementations§
impl Freeze for DispatchIndirectArgs
impl RefUnwindSafe for DispatchIndirectArgs
impl Send for DispatchIndirectArgs
impl Sync for DispatchIndirectArgs
impl Unpin for DispatchIndirectArgs
impl UnsafeUnpin for DispatchIndirectArgs
impl UnwindSafe for DispatchIndirectArgs
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.