MTLBlitCommandEncoder

An interface you can use to encode GPU commands that copy and modify the underlying memory of various Metal resources.

version(D_ObjectiveC)
extern (Objective-C) extern
interface MTLBlitCommandEncoder : MTLCommandEncoder {}

Members

Functions

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.

Inherited Members

From MTLCommandEncoder

endEncoding
void endEncoding()

Declares that all command generation from the encoder is completed.

insertDebugSignpost
void insertDebugSignpost(NSString )

Inserts a debug string into the captured frame data.

pushDebugGroup
void pushDebugGroup(NSString )

Pushes a specific string onto a stack of debug group strings for the command encoder.

popDebugGroup
void popDebugGroup()

Pops the latest string off of a stack of debug group strings for the command encoder.

device
MTLDevice device()

The Metal device from which the command encoder was created.

label
NSString label()

A string that labels the command encoder.

label
NSString label(NSString )
Undocumented in source.

Meta