pub struct IndirectBuffer { /* private fields */ }Expand description
A buffer that holds indirect dispatch arguments.
This represents the GPU-side buffer that would be used for
dispatch_workgroups_indirect. In CPU simulation mode it
stores the arguments in-memory for testing.
Implementations§
Source§impl IndirectBuffer
impl IndirectBuffer
Sourcepub fn with_args(label: &str, args: IndirectDispatchArgs) -> Self
pub fn with_args(label: &str, args: IndirectDispatchArgs) -> Self
Create an indirect buffer with specific initial arguments.
Sourcepub fn update(&mut self, args: IndirectDispatchArgs)
pub fn update(&mut self, args: IndirectDispatchArgs)
Update the dispatch arguments.
Sourcepub fn args(&self) -> IndirectDispatchArgs
pub fn args(&self) -> IndirectDispatchArgs
Get the current dispatch arguments.
Sourcepub fn generation(&self) -> u64
pub fn generation(&self) -> u64
Get the generation counter.
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Get the buffer size in bytes (always 12 bytes for dispatch args).
Auto Trait Implementations§
impl Freeze for IndirectBuffer
impl RefUnwindSafe for IndirectBuffer
impl Send for IndirectBuffer
impl Sync for IndirectBuffer
impl Unpin for IndirectBuffer
impl UnsafeUnpin for IndirectBuffer
impl UnwindSafe for IndirectBuffer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more