- copyFromBuffer
void copyFromBuffer(MTLBuffer sourceBuffer, NSUInteger sourceOffset, MTLBuffer destinationBuffer, NSUInteger destinationOffset, NSUInteger size)
Encodes a command that copies data from one buffer into another.
- copyFromBuffer
void copyFromBuffer(MTLBuffer sourceBuffer, NSUInteger sourceOffset, NSUInteger sourceBytesPerRow, NSUInteger sourceBytesPerImage, MTLSize sourceSize, MTLTexture destinationTexture, NSUInteger destinationSlice, NSUInteger destinationLevel, MTLOrigin destinationOrigin)
Encodes a command to copy image data from a source buffer into a destination texture.
- copyFromBuffer
void copyFromBuffer(MTLBuffer sourceBuffer, NSUInteger sourceOffset, NSUInteger sourceBytesPerRow, NSUInteger sourceBytesPerImage, MTLSize sourceSize, MTLTexture destinationTexture, NSUInteger destinationSlice, NSUInteger destinationLevel, MTLOrigin destinationOrigin, MTLBlitOption options)
Encodes a command to copy image data from a source buffer into a destination texture.
- copyFromTexture
void copyFromTexture(MTLTexture source, MTLTexture ddestination)
Encodes a command that copies data from one texture to another.
- copyFromTexture
void copyFromTexture(MTLTexture sourceTexture, NSUInteger sourceSlice, NSUInteger sourceLevel, MTLTexture destinationTexture, NSUInteger destinationSlice, NSUInteger destinationLevel, NSUInteger sliceCount, NSUInteger levelCount)
Encodes a command that copies slices of a texture to another texture’s slices.
- copyFromTexture
void copyFromTexture(MTLTexture sourceTexture, NSUInteger sourceSlice, NSUInteger sourceLevel, MTLOrigin sourceOrigin, MTLSize sourceSize, MTLTexture destinationTexture, NSUInteger destinationSlice, NSUInteger destinationLevel, MTLOrigin destinationOrigin)
Encodes a command that copies image data from a texture’s slice into another slice.
- copyFromTexture
void copyFromTexture(MTLTexture sourceTexture, NSUInteger sourceSlice, NSUInteger sourceLevel, MTLOrigin sourceOrigin, MTLSize sourceSize, MTLBuffer destinationBuffer, NSUInteger destinationOffset, NSUInteger destinationBytesPerRow, NSUInteger destinationBytesPerImage)
Encodes a command that copies image data from a texture slice to a buffer.
- copyFromTexture
void copyFromTexture(MTLTexture sourceTexture, NSUInteger sourceSlice, NSUInteger sourceLevel, MTLOrigin sourceOrigin, MTLSize sourceSize, MTLBuffer destinationBuffer, NSUInteger destinationOffset, NSUInteger destinationBytesPerRow, NSUInteger destinationBytesPerImage, MTLBlitOption options)
Encodes a command that copies image data from a texture slice to a buffer, and provides options for special texture formats.
- fillBuffer
void fillBuffer(MTLBuffer buffer, NSRange range, ubyte value)
Encodes a command that fills a buffer with a constant value for each byte.
- generateMipmapsForTexture
void generateMipmapsForTexture(MTLTexture )
Encodes a command that generates mipmaps for a texture from the base mipmap level up to the highest mipmap level.
- getTextureAccessCounters
void getTextureAccessCounters(MTLTexture texture, MTLRegion region, NSUInteger mipLevel, NSUInteger slice, BOOL resetCounters, MTLBuffer countersBuffer, NSUInteger countersBufferOffset)
Encodes a command that retrieves a sparse texture’s access data for a specific region, mipmap level, and slice.
- optimizeContentsForCPUAccess
void optimizeContentsForCPUAccess(MTLTexture texture)
Encodes a command that improves the performance of the CPU’s accesses to a texture.
- optimizeContentsForCPUAccess
void optimizeContentsForCPUAccess(MTLTexture texture, NSUInteger slice, NSUInteger level)
Encodes a command that improves the performance of the CPU’s accesses to a specific portion of a texture.
- optimizeContentsForGPUAccess
void optimizeContentsForGPUAccess(MTLTexture texture)
Encodes a command that improves the performance of the GPU’s accesses to a texture.
- optimizeContentsForGPUAccess
void optimizeContentsForGPUAccess(MTLTexture texture, NSUInteger slice, NSUInteger level)
Encodes a command that improves the performance of the GPU’s accesses to a specific portion of a texture.
- resetTextureAccessCounters
void resetTextureAccessCounters(MTLTexture texture, MTLRegion region, NSUInteger mipLevel, NSUInteger slice)
Encodes a command that resets a sparse texture’s access data for a specific region, mipmap level, and slice.
- synchronizeResource
void synchronizeResource(MTLResource resource)
Encodes a command that synchronizes the CPU’s copy of a managed resource, such as a buffer or texture, so that it matches the GPU’s copy.
- synchronizeTexture
void synchronizeTexture(MTLTexture texture, NSUInteger slice, NSUInteger level)
Encodes a command that synchronizes a part of the CPU’s copy of a texture so that it matches the GPU’s copy.
- updateFence
void updateFence(MTLFence )
Encodes a command that instructs the GPU to update a fence, which can signal a pass that’s waiting for it.
- waitForFence
void waitForFence(MTLFence )
Encodes a command that instructs the GPU to wait until a pass updates a fence.
An interface you can use to encode GPU commands that copy and modify the underlying memory of various Metal resources.