pub struct IndirectArgs {
pub buffer: Arc<Buffer>,
pub offset: u64,
}Expand description
Handle + offset identifying where in GPU memory the [u32; 3]
workgroup count lives.
Fields§
§buffer: Arc<Buffer>GPU buffer containing the workgroup count at the given byte offset.
offset: u64Byte offset within buffer. Must be 4-byte aligned per
wgpu’s contract.
Implementations§
Source§impl IndirectArgs
impl IndirectArgs
Sourcepub fn from_handle(
handle: &GpuBufferHandle,
offset: u64,
) -> Result<Self, BackendError>
pub fn from_handle( handle: &GpuBufferHandle, offset: u64, ) -> Result<Self, BackendError>
Build an IndirectArgs from a GpuBufferHandle + offset.
§Errors
Returns a BackendError when:
offsetis not 4-byte aligned (wgpu rejects unaligned indirect dispatches).offset + INDIRECT_ARGS_BYTESwould exceed the buffer’s byte length.- The underlying buffer does not carry
wgpu::BufferUsages::INDIRECT.
Auto Trait Implementations§
impl !RefUnwindSafe for IndirectArgs
impl !UnwindSafe for IndirectArgs
impl Freeze for IndirectArgs
impl Send for IndirectArgs
impl Sync for IndirectArgs
impl Unpin for IndirectArgs
impl UnsafeUnpin for IndirectArgs
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