Skip to main content

encode_with_args

Function encode_with_args 

Source
pub fn encode_with_args(
    encoder: &mut CommandEncoder,
    pipeline: &ComputePipelineStateRef,
    bindings: &[(u64, KernelArg<'_>)],
    grid_size: MTLSize,
    threadgroup_size: MTLSize,
)
Expand description

Encode a compute pass with mixed buffer and bytes bindings.

This is an extension of CommandEncoder::encode that additionally supports set_bytes for small constant parameter structs.

§Arguments

  • encoder — The command encoder to record into.
  • pipeline — The compiled compute pipeline.
  • bindings — Slice of (index, KernelArg) pairs.
  • grid_size — Total threads to launch.
  • threadgroup_size — Threads per threadgroup.