Contents

makeArgumentEncoderForBuffer(atIndex:)

Creates a new argument encoder for a nested argument buffer.

Declaration

func makeArgumentEncoderForBuffer(atIndex index: Int) -> (any MTLArgumentEncoder)?

Parameters

  • index:

    The index of a nested argument-buffer within the argument buffer. The value corresponds to either the index ID of a declaration in Metal Shading Language (MSL) or the Index property of an Mtlargumentdescriptor instance.

Return Value

An argument encoder targeting the nested argument buffer.

Discussion

If an argument buffer contains nested argument buffers in its structure, then each nested argument buffer needs to use its own MTLArgumentEncoder object to encode its individual resources.