Instance Method

dispatchThreadsPerTile(_:)

Encodes a dispatch call to perform a midrender compute operation.

Required.

Declaration

func dispatchThreadsPerTile(_ threadsPerTile: MTLSize)

Parameters

threadsPerTile

The number of threads in one tile, in each dimension.

Discussion

The threadgroup dimensions must conform to the following criteria:

  • Must be 2D, that is, depth must be 1.

  • Must not exceed the tile dimensions.

  • Must be either square or equal to the tile dimensions (only on iOS GPU family 4).

When a tile compute command is encoded, any necessary references to tile compute state or resources previously set on the encoder are recorded as part of the command. After encoding a command, you can safely change the encoding state to set up parameters needed to encode other commands.

See Also

Executing a Tile Function

func setRenderPipelineState(MTLRenderPipelineState)

Sets the current render pipeline state object.

Required.

var tileWidth: Int

The width of the tile, in pixels, for this render pass.

Required.

var tileHeight: Int

The height of the tile, in pixels, for this render pass.

Required.