setBuffer(_:offset:index:)
Encodes a reference to a buffer into the argument buffer.
Declaration
func setBuffer(_ buffer: (any MTLBuffer)?, offset: Int, index: Int)Parameters
- buffer:
A buffer the method encodes.
- offset:
A byte offset for
buffer. - index:
The index of a 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.