public interface MTLCommandBuffer
A serial list of commands for the device to execute.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
MTLCommandBuffer.Block_addCompletedHandler |
static interface |
MTLCommandBuffer.Block_addScheduledHandler |
| Modifier and Type | Method and Description |
|---|---|
MTLAccelerationStructureCommandEncoder |
accelerationStructureCommandEncoder() |
void |
addCompletedHandler(MTLCommandBuffer.Block_addCompletedHandler block)
addCompletedHandler:block:
|
void |
addScheduledHandler(MTLCommandBuffer.Block_addScheduledHandler block)
addScheduledHandler:block:
|
MTLBlitCommandEncoder |
blitCommandEncoder()
blitCommandEncoder
|
MTLBlitCommandEncoder |
blitCommandEncoderWithDescriptor(MTLBlitPassDescriptor blitPassDescriptor)
blitCommandEncoderWithDescriptor:
|
MTLCommandQueue |
commandQueue()
[@property] commandQueue
|
void |
commit()
commit
|
MTLComputeCommandEncoder |
computeCommandEncoder()
computeCommandEncoder
|
MTLComputeCommandEncoder |
computeCommandEncoderWithDescriptor(MTLComputePassDescriptor computePassDescriptor)
computeCommandEncoderWithDescriptor:
|
MTLComputeCommandEncoder |
computeCommandEncoderWithDispatchType(long dispatchType)
computeCommandEncoderWithDispatchType
|
MTLDevice |
device()
[@property] device
|
void |
encodeSignalEventValue(MTLEvent event,
long value)
encodeSignalEvent:value:
|
void |
encodeWaitForEventValue(MTLEvent event,
long value)
encodeWaitForEvent:value:
|
void |
enqueue()
enqueue
|
NSError |
error()
[@property] error
|
long |
errorOptions()
The set of options configuring the error reporting of the created command buffer.
|
double |
GPUEndTime()
[@property] GPUEndTime
|
double |
GPUStartTime()
[@property] GPUStartTime
|
double |
kernelEndTime() |
double |
kernelStartTime() |
java.lang.String |
label()
[@property] label
|
MTLLogContainer |
logs()
[@property] logs
|
MTLParallelRenderCommandEncoder |
parallelRenderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)
parallelRenderCommandEncoderWithDescriptor:
|
void |
popDebugGroup()
popDebugGroup
|
void |
presentDrawable(MTLDrawable drawable)
presentDrawable:
|
void |
presentDrawableAfterMinimumDuration(MTLDrawable drawable,
double duration)
presentDrawable:afterMinimumDuration:
|
void |
presentDrawableAtTime(MTLDrawable drawable,
double presentationTime)
presentDrawable:atTime:
|
void |
pushDebugGroup(java.lang.String string)
pushDebugGroup:
|
MTLRenderCommandEncoder |
renderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)
renderCommandEncoderWithDescriptor:
|
MTLResourceStateCommandEncoder |
resourceStateCommandEncoder() |
MTLResourceStateCommandEncoder |
resourceStateCommandEncoderWithDescriptor(MTLResourceStatePassDescriptor resourceStatePassDescriptor) |
boolean |
retainedReferences()
[@property] retainedReferences
|
void |
setLabel(java.lang.String value)
[@property] label
|
long |
status()
[@property] status
|
void |
waitUntilCompleted()
waitUntilCompleted
|
void |
waitUntilScheduled()
waitUntilScheduled
|
void addCompletedHandler(MTLCommandBuffer.Block_addCompletedHandler block)
Add a block to be called when this command buffer has completed execution.
void addScheduledHandler(MTLCommandBuffer.Block_addScheduledHandler block)
Adds a block to be called when this command buffer has been scheduled for execution.
MTLBlitCommandEncoder blitCommandEncoder()
returns a blit command encoder to encode into this command buffer.
MTLCommandQueue commandQueue()
The command queue this command buffer was created from.
void commit()
Commit a command buffer so it can be executed as soon as possible.
MTLComputeCommandEncoder computeCommandEncoder()
returns a compute command encoder to encode into this command buffer.
MTLDevice device()
The device this resource was created against.
void enqueue()
Append this command buffer to the end of its MTLCommandQueue.
NSError error()
If an error occurred during execution, the NSError may contain more details about the problem.
java.lang.String label()
A string to help identify this object.
MTLParallelRenderCommandEncoder parallelRenderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)
returns a parallel render pass encoder to encode into this command buffer.
void presentDrawable(MTLDrawable drawable)
Add a drawable present that will be invoked when this command buffer has been scheduled for execution.
The submission thread will be lock stepped with present call been serviced by window server
void presentDrawableAtTime(MTLDrawable drawable, double presentationTime)
Add a drawable present for a specific host time that will be invoked when this command buffer has been scheduled for execution.
The submission thread will be lock stepped with present call been serviced by window server
MTLRenderCommandEncoder renderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)
returns a render command endcoder to encode into this command buffer.
boolean retainedReferences()
If YES, this command buffer holds strong references to objects needed to execute this command buffer.
void setLabel(java.lang.String value)
A string to help identify this object.
long status()
status reports the current stage in the lifetime of MTLCommandBuffer, as it proceeds to enqueued, committed, scheduled, and completed.
void waitUntilCompleted()
Synchronously wait for this command buffer to complete.
void waitUntilScheduled()
Synchronously wait for this command buffer to be scheduled.
double GPUEndTime()
The host time in seconds that GPU finishes executing this command buffer. Returns zero if CPU has not received completion notification. This usually can be called in command buffer completion handler.
double GPUStartTime()
The host time in seconds that GPU starts executing this command buffer. Returns zero if it has not started. This usually can be called in command buffer completion handler.
double kernelEndTime()
double kernelStartTime()
void popDebugGroup()
Pop the latest named string off of the stack.
void presentDrawableAfterMinimumDuration(MTLDrawable drawable, double duration)
Add a drawable present for a specific host time that allows previous frame to be on screen for at least duration time.
The difference of this API versus presentDrawable:atTime is that this API defers calculation of the presentation time until the previous frame's actual presentation time is known, thus to be able to maintain a more consistent and stable frame time. This also provides an easy way to set frame rate. The submission thread will be lock stepped with present call been serviced by window server
drawable - The drawable to be presentedduration - The minimum time that previous frame should be displayed. The time is double preceision floating point in the unit of seconds.void pushDebugGroup(java.lang.String string)
Push a new named string onto a stack of string labels.
MTLComputeCommandEncoder computeCommandEncoderWithDispatchType(long dispatchType)
returns a compute command encoder to encode into this command buffer. Optionally allow this command encoder to execute dispatches concurrently.
On devices that do not support concurrent command encoders, this call is equivalent to computeCommandEncoder
void encodeSignalEventValue(MTLEvent event, long value)
Encodes a command that signals an event with a given value.
This method may only be called if there is no current command encoder on the receiver.
void encodeWaitForEventValue(MTLEvent event, long value)
Encodes a command that pauses execution of this command buffer until the specified event reaches a given value.
This method may only be called if there is no current command encoder on the receiver.
MTLResourceStateCommandEncoder resourceStateCommandEncoder()
MTLAccelerationStructureCommandEncoder accelerationStructureCommandEncoder()
MTLBlitCommandEncoder blitCommandEncoderWithDescriptor(MTLBlitPassDescriptor blitPassDescriptor)
returns a blit command endcoder to encode into this command buffer.
MTLComputeCommandEncoder computeCommandEncoderWithDescriptor(MTLComputePassDescriptor computePassDescriptor)
returns a compute command endcoder to encode into this command buffer.
long errorOptions()
MTLLogContainer logs()
Logs generated by the command buffer during execution of the GPU commands. Valid after GPU execution is completed
MTLResourceStateCommandEncoder resourceStateCommandEncoderWithDescriptor(MTLResourceStatePassDescriptor resourceStatePassDescriptor)