Contents

stages()

Queries a bitmask representing the shader stages on which commands currently present in this command encoder operate.

Declaration

func stages() -> MTLStages

Return Value

A bitmask representing shader stages that commands currently present in this command encoder operate on.

Discussion

Metal dynamically updates this property based on the commands you encode into the command encoder, for example, it sets the bit dispatch if this encoder contains any commands that dispatch a compute kernel.

Similarly, it sets the bit blit if this encoder contains any commands to copy or modify buffers, textures, or indirect command buffers.

Finally, Metal sets the bit accelerationStructure if this encoder contains any commands that build, copy, or refit acceleration structures.