drawMeshThreadgroups(indirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:)
Encodes a draw command that invokes a mesh shader and, optionally, an object shader with indirect arguments.
Declaration
func drawMeshThreadgroups(indirectBuffer: any MTLBuffer, indirectBufferOffset: Int, threadsPerObjectThreadgroup: MTLSize, threadsPerMeshThreadgroup: MTLSize)Parameters
- indirectBuffer:
An Mtlbuffer instance with data that matches the layout of the Mtldispatchthreadgroupsindirectarguments structure.
- indirectBufferOffset:
An integer that represents the location, in bytes, from the start of
indirectBufferwhere the indirect arguments structure begins.See the Metal Feature Set Tables to check for offset alignment requirements for buffers in
deviceandconstantaddress space. - threadsPerObjectThreadgroup:
An Mtlsize instance that represents the number of threads in an object shader threadgroup, if applicable.
- threadsPerMeshThreadgroup:
An Mtlsize instance that represents the number of threads in a mesh shader threadgroup.