MTLCommandBuffer

A container that stores a sequence of GPU commands that you encode into it.

Members

Functions

addCompletedHandler
void addCompletedHandler(MTLCommandBufferHandler )

Registers a completion handler the GPU device calls immediately after the GPU finishes running the commands in the command buffer.

addScheduleHandler
void addScheduleHandler(MTLCommandBufferHandler )

Registers a completion handler the GPU device calls immediately after it schedules the command buffer to run on the GPU.

commit
void commit()

Submits the command buffer to run on the GPU.

encodeSignalEvent
void encodeSignalEvent(MTLEvent event, ulong value)

Encodes a command into the command buffer that pauses the GPU from running subsequent passes until the event equals or exceeds a value.

encodeWaitForEvent
void encodeWaitForEvent(MTLEvent event, ulong value)

Encodes a command into the command buffer that pauses the GPU from running subsequent passes until the event equals or exceeds a value.

enqueue
void enqueue()

Reserves the next available place for the command buffer in its command queue.

label
NSString label()

A string to help identify this object

label
NSString label(NSString )
Undocumented in source.
presentDrawable
void presentDrawable(MTLDrawable drawable)

Presents a drawable as early as possible.

presentDrawable
void presentDrawable(MTLDrawable drawable, CFTimeInterval presentationTime)

Presents a drawable at a specific time.

presentDrawableAfterMinimumDuration
void presentDrawableAfterMinimumDuration(MTLDrawable drawable, CFTimeInterval duration)

Presents a drawable after the system presents the previous drawable for an amount of time.

renderCommandEncoderWithDescriptor
MTLRenderCommandEncoder renderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)
Undocumented in source.
status
MTLCommandBufferStatus status()

The command buffer’s current state.

waitUntilCompleted
void waitUntilCompleted()

Synchronously waits for the GPU to finish running the command buffer, which can block the current thread’s execution.

waitUntilScheduled
void waitUntilScheduled()

Synchronously waits for the command queue to schedule the buffer, which can block the current thread’s execution.

Meta