Contents

setMeshBuffer(_:offset:index:)

Assigns a buffer to an entry in the mesh shader argument table.

Declaration

func setMeshBuffer(_ buffer: (any MTLBuffer)?, offset: Int, index: Int)

Parameters

  • buffer:

    An Mtlbuffer instance the command assigns to an entry in the mesh shader argument table for buffers.

  • offset:

    An integer that represents the location, in bytes, from the start of buffer where the mesh shader argument data begins.

    See the Metal Feature Set Tables to check for offset alignment requirements for buffers in device and constant address space.

  • index:

    An integer that represents the entry in the mesh shader argument table for buffers that stores a record of buffer and offset.

Mentioned in

Discussion

By default, the texture at each index is nil.

See Also

Assigning buffers for mesh shaders