Expand description
Helper utilities for encoding compute dispatches with inline constant parameters (bytes) alongside buffer bindings.
The base CommandEncoder::encode method only supports buffer bindings.
These helpers extend encoding to support Metal set_bytes for small
constant parameter structs, which avoids allocating a full Metal buffer
for a few bytes of configuration data.
KernelArg and as_bytes are defined in crate::encoder and re-exported
here for backward compatibility.
Enums§
- Kernel
Arg - A buffer or inline-bytes binding for a compute kernel argument slot.
Functions§
- as_
bytes - Convert a
Podvalue to a byte slice suitable forKernelArg::Bytes. - encode_
threadgroups_ with_ args - Encode a compute pass with threadgroups and mixed buffer/bytes bindings.
- encode_
threadgroups_ with_ args_ and_ shared - Encode a compute pass with threadgroups, mixed buffer/bytes bindings, and threadgroup shared memory allocations.
- encode_
with_ args - Encode a compute pass with mixed buffer and bytes bindings.