pub enum Arg<'a> {
Read(&'a Buffer, usize),
Write(&'a mut Buffer, usize),
Bytes(&'a [u8]),
Same(usize, usize),
}Expand description
A kernel argument, bound to the slot of its position in the argument list.
Variants§
Read(&'a Buffer, usize)
A buffer the kernel only reads, from byte offset on.
Write(&'a mut Buffer, usize)
A buffer the kernel writes (and may read), from byte offset on.
Bytes(&'a [u8])
Small constant data copied into the command stream (at most 4 KiB).
Same(usize, usize)
The buffer of the argument at this index bound again, from byte offset on: an
in-place kernel reading and writing one buffer through two slots. That argument must
be an Arg::Write (whose hazards cover both slots); anything else is an
GpuError::InvalidArgument.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Arg<'a>
impl<'a> !UnwindSafe for Arg<'a>
impl<'a> Freeze for Arg<'a>
impl<'a> Send for Arg<'a>
impl<'a> Sync for Arg<'a>
impl<'a> Unpin for Arg<'a>
impl<'a> UnsafeUnpin for Arg<'a>
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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