Contents

drawMeshThreads(_:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:)

Encodes a draw command that invokes a mesh shader and, optionally, an object shader with a grid of threads.

Declaration

func drawMeshThreads(_ threadsPerGrid: MTLSize, threadsPerObjectThreadgroup: MTLSize, threadsPerMeshThreadgroup: MTLSize)

Parameters

  • threadsPerGrid:

    An Mtlsize instance that represents the number of threads for each grid dimension.

    For mesh shaders, the command rounds the value down to the nearest multiple of threadsPerMeshThreadgroup for each dimension.

    For object shaders, the value doesn’t need to be a multiple of threadsPerObjectThreadgroup.

  • 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.

See Also

Drawing with meshes