copy(sourceBuffer:sourceOffset:destinationBuffer:destinationOffset:size:)
Encodes a command that copies data from a buffer instance into another.
Declaration
func copy(sourceBuffer: any MTLBuffer, sourceOffset: Int, destinationBuffer: any MTLBuffer, destinationOffset: Int, size: Int)Parameters
- sourceBuffer:
An Mtlbuffer instance the command copies data from.
- sourceOffset:
A byte offset within
sourceBufferthe command copies from. - destinationBuffer:
An Mtlbuffer instance the command copies data to.
- destinationOffset:
A byte offset within
destinationBufferthe command copies to. - size:
The number of bytes the command copies from
sourceBuffertodestinationBuffer.