Package apple.metalperformanceshaders
Class MPSCommandBuffer
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.metalperformanceshaders.MPSCommandBuffer
-
- All Implemented Interfaces:
MTLCommandBuffer,NSObject
public class MPSCommandBuffer extends NSObject implements MTLCommandBuffer
MPSCommandBuffer [@dependency] This depends on Metal.framework A MPSCommandBuffer object is used to wrap an existing command buffer with MPS specific options. A MPS kernel typically operates between a fixed set of inputs and outputs. The MPSCommandBuffer class provides a way to add further encode-time parameters to the encode call using the command buffer. Currently the only parameter included in the MPSCommandBuffer that all MPS kernels support is the the predicate option, which can be used to pre-empt the kernel from the GPU side. NOTE: the options that contain metal resources will be referenced by this object and therefore it is advisable to make the lifetime of this object as short as possible as is the case for all command buffers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
Nested classes/interfaces inherited from interface apple.metal.protocol.MTLCommandBuffer
MTLCommandBuffer.Block_addCompletedHandler, MTLCommandBuffer.Block_addScheduledHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMPSCommandBuffer(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MTLAccelerationStructureCommandEncoderaccelerationStructureCommandEncoder()static booleanaccessInstanceVariablesDirectly()voidaddCompletedHandler(MTLCommandBuffer.Block_addCompletedHandler block)addCompletedHandler:block: Add a block to be called when this command buffer has completed execution.voidaddScheduledHandler(MTLCommandBuffer.Block_addScheduledHandler block)addScheduledHandler:block: Adds a block to be called when this command buffer has been scheduled for execution.static MPSCommandBufferalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)MTLBlitCommandEncoderblitCommandEncoder()blitCommandEncoder returns a blit command encoder to encode into this command buffer.MTLBlitCommandEncoderblitCommandEncoderWithDescriptor(MTLBlitPassDescriptor blitPassDescriptor)blitCommandEncoderWithDescriptor: returns a blit command endcoder to encode into this command buffer.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()MTLCommandBuffercommandBuffer()[@property] commandBuffer The Metal Command Buffer that was used to initialize this object.static MPSCommandBuffercommandBufferFromCommandQueue(MTLCommandQueue commandQueue)Initializes a MPSCommandBuffer object from a given command queue.static MPSCommandBuffercommandBufferWithCommandBuffer(MTLCommandBuffer commandBuffer)Initializes a MPSCommandBuffer object with given MTLCommandBuffer.MTLCommandQueuecommandQueue()[@property] commandQueue The command queue this command buffer was created from.voidcommit()commit Commit a command buffer so it can be executed as soon as possible.voidcommitAndContinue()Commit work encoded so far and continue with a new underlying command buffer This method commits the underlying root MTLCommandBuffer, and makes a new one on the same command queue.MTLComputeCommandEncodercomputeCommandEncoder()computeCommandEncoder returns a compute command encoder to encode into this command buffer.MTLComputeCommandEncodercomputeCommandEncoderWithDescriptor(MTLComputePassDescriptor computePassDescriptor)computeCommandEncoderWithDescriptor: returns a compute command endcoder to encode into this command buffer.MTLComputeCommandEncodercomputeCommandEncoderWithDispatchType(long dispatchType)computeCommandEncoderWithDispatchType returns a compute command encoder to encode into this command buffer.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()MTLDevicedevice()[@property] device The device this resource was created against.voidencodeSignalEventValue(MTLEvent event, long value)encodeSignalEvent:value: Encodes a command that signals an event with a given value.voidencodeWaitForEventValue(MTLEvent event, long value)encodeWaitForEvent:value: Encodes a command that pauses execution of this command buffer until the specified event reaches a given value.voidenqueue()enqueue Append this command buffer to the end of its MTLCommandQueue.NSErrorerror()[@property] error If an error occurred during execution, the NSError may contain more details about the problem.longerrorOptions()The set of options configuring the error reporting of the created command buffer.doubleGPUEndTime()[@property] GPUEndTime The host time in seconds that GPU finishes executing this command buffer.doubleGPUStartTime()[@property] GPUStartTime The host time in seconds that GPU starts executing this command buffer.static longhash_static()MPSHeapProviderheapProvider()[@property] heapProvider A application supplied object to allocate MTLHeaps for MPS By default this is nil, which will use MPS' device level global heap cache to allocate the heaps.MPSCommandBufferinit()MPSCommandBufferinitWithCommandBuffer(MTLCommandBuffer commandBuffer)Initializes an empty MPSCommandBuffer object with given MTLCommandBuffer.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)doublekernelEndTime()doublekernelStartTime()static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)java.lang.Stringlabel()[@property] label A string to help identify this object.MTLLogContainerlogs()[@property] logs Logs generated by the command buffer during execution of the GPU commands.static java.lang.Objectnew_objc()MTLParallelRenderCommandEncoderparallelRenderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)parallelRenderCommandEncoderWithDescriptor: returns a parallel render pass encoder to encode into this command buffer.voidpopDebugGroup()popDebugGroup Pop the latest named string off of the stack.MPSPredicatepredicate()[@property] predicate A GPU predicate object.voidprefetchHeapForWorkloadSize(long size)Prefetch heap into the MPS command buffer heap cache.voidpresentDrawable(MTLDrawable drawable)presentDrawable: Add a drawable present that will be invoked when this command buffer has been scheduled for execution.voidpresentDrawableAfterMinimumDuration(MTLDrawable drawable, double duration)presentDrawable:afterMinimumDuration: Add a drawable present for a specific host time that allows previous frame to be on screen for at least duration time.voidpresentDrawableAtTime(MTLDrawable drawable, double presentationTime)presentDrawable:atTime: Add a drawable present for a specific host time that will be invoked when this command buffer has been scheduled for execution.voidpushDebugGroup(java.lang.String string)pushDebugGroup: Push a new named string onto a stack of string labels.MTLRenderCommandEncoderrenderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)renderCommandEncoderWithDescriptor: returns a render command endcoder to encode into this command buffer.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)MTLResourceStateCommandEncoderresourceStateCommandEncoder()MTLResourceStateCommandEncoderresourceStateCommandEncoderWithDescriptor(MTLResourceStatePassDescriptor resourceStatePassDescriptor)booleanretainedReferences()[@property] retainedReferences If YES, this command buffer holds strong references to objects needed to execute this command buffer.MTLCommandBufferrootCommandBuffer()[@property] rootCommandBuffer The base MTLCommandBuffer underlying the MPSCommandBuffer MPSCommandBuffers may wrap other MPSCommandBuffers, in the process creating what is in effect a stack of predicate objects that may be pushed or popped by making new MPSCommandBuffers or by calling -commandBuffer.voidsetHeapProvider(MPSHeapProvider value)[@property] heapProvider A application supplied object to allocate MTLHeaps for MPS By default this is nil, which will use MPS' device level global heap cache to allocate the heaps.voidsetLabel(java.lang.String value)[@property] label A string to help identify this object.voidsetPredicate(MPSPredicate value)[@property] predicate A GPU predicate object.static voidsetVersion_static(long aVersion)longstatus()[@property] status status reports the current stage in the lifetime of MTLCommandBuffer, as it proceeds to enqueued, committed, scheduled, and completed.static org.moe.natj.objc.Classsuperclass_static()static longversion_static()voidwaitUntilCompleted()waitUntilCompleted Synchronously wait for this command buffer to complete.voidwaitUntilScheduled()waitUntilScheduled Synchronously wait for this command buffer to be scheduled.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
GPUEndTime
public double GPUEndTime()
Description copied from interface:MTLCommandBuffer[@property] 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.- Specified by:
GPUEndTimein interfaceMTLCommandBuffer
-
GPUStartTime
public double GPUStartTime()
Description copied from interface:MTLCommandBuffer[@property] 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.- Specified by:
GPUStartTimein interfaceMTLCommandBuffer
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
addCompletedHandler
public void addCompletedHandler(MTLCommandBuffer.Block_addCompletedHandler block)
Description copied from interface:MTLCommandBufferaddCompletedHandler:block: Add a block to be called when this command buffer has completed execution.- Specified by:
addCompletedHandlerin interfaceMTLCommandBuffer
-
addScheduledHandler
public void addScheduledHandler(MTLCommandBuffer.Block_addScheduledHandler block)
Description copied from interface:MTLCommandBufferaddScheduledHandler:block: Adds a block to be called when this command buffer has been scheduled for execution.- Specified by:
addScheduledHandlerin interfaceMTLCommandBuffer
-
alloc
public static MPSCommandBuffer alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
blitCommandEncoder
public MTLBlitCommandEncoder blitCommandEncoder()
Description copied from interface:MTLCommandBufferblitCommandEncoder returns a blit command encoder to encode into this command buffer.- Specified by:
blitCommandEncoderin interfaceMTLCommandBuffer
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
commandBuffer
public MTLCommandBuffer commandBuffer()
[@property] commandBuffer The Metal Command Buffer that was used to initialize this object.
-
commandBufferFromCommandQueue
public static MPSCommandBuffer commandBufferFromCommandQueue(MTLCommandQueue commandQueue)
Initializes a MPSCommandBuffer object from a given command queue.- Returns:
- A pointer to the newly initialized MPSCommandBuffer object.
-
commandBufferWithCommandBuffer
public static MPSCommandBuffer commandBufferWithCommandBuffer(MTLCommandBuffer commandBuffer)
Initializes a MPSCommandBuffer object with given MTLCommandBuffer.- Returns:
- A pointer to the newly initialized MPSCommandBuffer object.
-
commandQueue
public MTLCommandQueue commandQueue()
Description copied from interface:MTLCommandBuffer[@property] commandQueue The command queue this command buffer was created from.- Specified by:
commandQueuein interfaceMTLCommandBuffer
-
commit
public void commit()
Description copied from interface:MTLCommandBuffercommit Commit a command buffer so it can be executed as soon as possible.- Specified by:
commitin interfaceMTLCommandBuffer
-
commitAndContinue
public void commitAndContinue()
Commit work encoded so far and continue with a new underlying command buffer This method commits the underlying root MTLCommandBuffer, and makes a new one on the same command queue. The MPS heap is moved forward to the new command buffer such that temporary objects used by the previous command buffer can be still be used with the new one. This provides a way to move work already encoded into consideration by the Metal back end sooner. For large workloads, e.g. a neural networking graph periodically calling -commitAndContinue may allow you to improve CPU / GPU parallelism without the substantial memory increases associated with double buffering. It will also help decrease overall latency. Any Metal schedule or completion callbacks previously attached to this object will remain attached to the old command buffer and will fire as expected as the old command buffer is scheduled and completes. If your application is relying on such callbacks to coordinate retain / release of important objects that are needed for work encoded after -commitAndContinue, your application should retain these objects before calling commitAndContinue, and attach new release callbacks to this object with a new completion handler so that they persist through the lifetime of the new underlying command buffer. You may do this, for example by adding the objects to a mutable array before calling -commitAndContinue, then release the mutable array in a new completion callback added after -commitAndContinue. Because -commitAndContinue commits the old command buffer then switches to a new one, some aspects of command buffer completion may surprise unwary developers. For example, -waitUntilCompleted called immediately after -commitAndContinue asks Metal to wait for the new command buffer to finish, not the old one. Since the new command buffer presumably hasn't been committed yet, it is formally a deadlock, resources may leak and Metal may complain. Your application should ether call -commit before -waitUntilCompleted, or capture the -rootCommandBuffer from before the call to -commitAndContinue and wait on that. Similarly, your application should be sure to use the appropriate command buffer when querying the [MTLCommandBuffer status] property. If the underlying MTLCommandBuffer also implements -commitAndContinue, then the message will be forwarded to that object instead. In this way, underlying predicate objects and other state will be preserved.
-
computeCommandEncoder
public MTLComputeCommandEncoder computeCommandEncoder()
Description copied from interface:MTLCommandBuffercomputeCommandEncoder returns a compute command encoder to encode into this command buffer.- Specified by:
computeCommandEncoderin interfaceMTLCommandBuffer
-
computeCommandEncoderWithDispatchType
public MTLComputeCommandEncoder computeCommandEncoderWithDispatchType(long dispatchType)
Description copied from interface:MTLCommandBuffercomputeCommandEncoderWithDispatchType 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- Specified by:
computeCommandEncoderWithDispatchTypein interfaceMTLCommandBuffer
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
device
public MTLDevice device()
Description copied from interface:MTLCommandBuffer[@property] device The device this resource was created against.- Specified by:
devicein interfaceMTLCommandBuffer
-
encodeSignalEventValue
public void encodeSignalEventValue(MTLEvent event, long value)
Description copied from interface:MTLCommandBufferencodeSignalEvent: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.- Specified by:
encodeSignalEventValuein interfaceMTLCommandBuffer
-
encodeWaitForEventValue
public void encodeWaitForEventValue(MTLEvent event, long value)
Description copied from interface:MTLCommandBufferencodeWaitForEvent: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.- Specified by:
encodeWaitForEventValuein interfaceMTLCommandBuffer
-
enqueue
public void enqueue()
Description copied from interface:MTLCommandBufferenqueue Append this command buffer to the end of its MTLCommandQueue.- Specified by:
enqueuein interfaceMTLCommandBuffer
-
error
public NSError error()
Description copied from interface:MTLCommandBuffer[@property] error If an error occurred during execution, the NSError may contain more details about the problem.- Specified by:
errorin interfaceMTLCommandBuffer
-
hash_static
public static long hash_static()
-
heapProvider
public MPSHeapProvider heapProvider()
[@property] heapProvider A application supplied object to allocate MTLHeaps for MPS By default this is nil, which will use MPS' device level global heap cache to allocate the heaps. This is a reasonable choice. However, it may be inefficient if you are keeping your own MTLHeap, since there will be two pessimistically sized free stores which may be larger than is strictly necessary, and of course fragmentation across multiple heaps. In such cases, the problem may be solved either by using MPS' automatically managed heap (simple) or having MPS use your heap. The heapProvider allows you to implement the second case. To use the MPS heap, simply make temporary MPSImages, vectors and matrices. If multiple MPSCommandBuffers reference the same MTLCommandBuffer, changing the heapProvider on one will change the heap provider for all of them.
-
init
public MPSCommandBuffer init()
-
initWithCommandBuffer
public MPSCommandBuffer initWithCommandBuffer(MTLCommandBuffer commandBuffer)
Initializes an empty MPSCommandBuffer object with given MTLCommandBuffer.- Returns:
- A pointer to the newly initialized MPSCommandBuffer object.
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
kernelEndTime
public double kernelEndTime()
- Specified by:
kernelEndTimein interfaceMTLCommandBuffer
-
kernelStartTime
public double kernelStartTime()
- Specified by:
kernelStartTimein interfaceMTLCommandBuffer
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
label
public java.lang.String label()
Description copied from interface:MTLCommandBuffer[@property] label A string to help identify this object.- Specified by:
labelin interfaceMTLCommandBuffer
-
new_objc
public static java.lang.Object new_objc()
-
parallelRenderCommandEncoderWithDescriptor
public MTLParallelRenderCommandEncoder parallelRenderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)
Description copied from interface:MTLCommandBufferparallelRenderCommandEncoderWithDescriptor: returns a parallel render pass encoder to encode into this command buffer.- Specified by:
parallelRenderCommandEncoderWithDescriptorin interfaceMTLCommandBuffer
-
popDebugGroup
public void popDebugGroup()
Description copied from interface:MTLCommandBufferpopDebugGroup Pop the latest named string off of the stack.- Specified by:
popDebugGroupin interfaceMTLCommandBuffer
-
predicate
public MPSPredicate predicate()
[@property] predicate A GPU predicate object. Default: nil.
-
prefetchHeapForWorkloadSize
public void prefetchHeapForWorkloadSize(long size)
Prefetch heap into the MPS command buffer heap cache. If there is not sufficient free storage in the MPS heap for the command buffer for allocations of total size size, pre-warm the MPS heap with a new MTLHeap allocation of sufficient size. If this size turns out to be too small MPS may ask for more heaps later to cover additional allocations. If heapProvider is not nil, the heapProvider will be used.- Parameters:
size- The minimum size of the free store needed
-
presentDrawable
public void presentDrawable(MTLDrawable drawable)
Description copied from interface:MTLCommandBufferpresentDrawable: 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- Specified by:
presentDrawablein interfaceMTLCommandBuffer
-
presentDrawableAfterMinimumDuration
public void presentDrawableAfterMinimumDuration(MTLDrawable drawable, double duration)
Description copied from interface:MTLCommandBufferpresentDrawable:afterMinimumDuration: 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- Specified by:
presentDrawableAfterMinimumDurationin interfaceMTLCommandBuffer- Parameters:
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.
-
presentDrawableAtTime
public void presentDrawableAtTime(MTLDrawable drawable, double presentationTime)
Description copied from interface:MTLCommandBufferpresentDrawable:atTime: 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- Specified by:
presentDrawableAtTimein interfaceMTLCommandBuffer
-
pushDebugGroup
public void pushDebugGroup(java.lang.String string)
Description copied from interface:MTLCommandBufferpushDebugGroup: Push a new named string onto a stack of string labels.- Specified by:
pushDebugGroupin interfaceMTLCommandBuffer
-
renderCommandEncoderWithDescriptor
public MTLRenderCommandEncoder renderCommandEncoderWithDescriptor(MTLRenderPassDescriptor renderPassDescriptor)
Description copied from interface:MTLCommandBufferrenderCommandEncoderWithDescriptor: returns a render command endcoder to encode into this command buffer.- Specified by:
renderCommandEncoderWithDescriptorin interfaceMTLCommandBuffer
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
resourceStateCommandEncoder
public MTLResourceStateCommandEncoder resourceStateCommandEncoder()
- Specified by:
resourceStateCommandEncoderin interfaceMTLCommandBuffer
-
retainedReferences
public boolean retainedReferences()
Description copied from interface:MTLCommandBuffer[@property] retainedReferences If YES, this command buffer holds strong references to objects needed to execute this command buffer.- Specified by:
retainedReferencesin interfaceMTLCommandBuffer
-
rootCommandBuffer
public MTLCommandBuffer rootCommandBuffer()
[@property] rootCommandBuffer The base MTLCommandBuffer underlying the MPSCommandBuffer MPSCommandBuffers may wrap other MPSCommandBuffers, in the process creating what is in effect a stack of predicate objects that may be pushed or popped by making new MPSCommandBuffers or by calling -commandBuffer. In some circumstances, it is preferable to use the root command buffer, particularly when trying to identify the command buffer that will be commited by -commitAndContinue.
-
setHeapProvider
public void setHeapProvider(MPSHeapProvider value)
[@property] heapProvider A application supplied object to allocate MTLHeaps for MPS By default this is nil, which will use MPS' device level global heap cache to allocate the heaps. This is a reasonable choice. However, it may be inefficient if you are keeping your own MTLHeap, since there will be two pessimistically sized free stores which may be larger than is strictly necessary, and of course fragmentation across multiple heaps. In such cases, the problem may be solved either by using MPS' automatically managed heap (simple) or having MPS use your heap. The heapProvider allows you to implement the second case. To use the MPS heap, simply make temporary MPSImages, vectors and matrices. If multiple MPSCommandBuffers reference the same MTLCommandBuffer, changing the heapProvider on one will change the heap provider for all of them.
-
setLabel
public void setLabel(java.lang.String value)
Description copied from interface:MTLCommandBuffer[@property] label A string to help identify this object.- Specified by:
setLabelin interfaceMTLCommandBuffer
-
setPredicate
public void setPredicate(MPSPredicate value)
[@property] predicate A GPU predicate object. Default: nil.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
status
public long status()
Description copied from interface:MTLCommandBuffer[@property] status status reports the current stage in the lifetime of MTLCommandBuffer, as it proceeds to enqueued, committed, scheduled, and completed.- Specified by:
statusin interfaceMTLCommandBuffer
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
waitUntilCompleted
public void waitUntilCompleted()
Description copied from interface:MTLCommandBufferwaitUntilCompleted Synchronously wait for this command buffer to complete.- Specified by:
waitUntilCompletedin interfaceMTLCommandBuffer
-
waitUntilScheduled
public void waitUntilScheduled()
Description copied from interface:MTLCommandBufferwaitUntilScheduled Synchronously wait for this command buffer to be scheduled.- Specified by:
waitUntilScheduledin interfaceMTLCommandBuffer
-
accelerationStructureCommandEncoder
public MTLAccelerationStructureCommandEncoder accelerationStructureCommandEncoder()
- Specified by:
accelerationStructureCommandEncoderin interfaceMTLCommandBuffer
-
blitCommandEncoderWithDescriptor
public MTLBlitCommandEncoder blitCommandEncoderWithDescriptor(MTLBlitPassDescriptor blitPassDescriptor)
Description copied from interface:MTLCommandBufferblitCommandEncoderWithDescriptor: returns a blit command endcoder to encode into this command buffer.- Specified by:
blitCommandEncoderWithDescriptorin interfaceMTLCommandBuffer
-
computeCommandEncoderWithDescriptor
public MTLComputeCommandEncoder computeCommandEncoderWithDescriptor(MTLComputePassDescriptor computePassDescriptor)
Description copied from interface:MTLCommandBuffercomputeCommandEncoderWithDescriptor: returns a compute command endcoder to encode into this command buffer.- Specified by:
computeCommandEncoderWithDescriptorin interfaceMTLCommandBuffer
-
errorOptions
public long errorOptions()
Description copied from interface:MTLCommandBufferThe set of options configuring the error reporting of the created command buffer.- Specified by:
errorOptionsin interfaceMTLCommandBuffer
-
logs
public MTLLogContainer logs()
Description copied from interface:MTLCommandBuffer[@property] logs Logs generated by the command buffer during execution of the GPU commands. Valid after GPU execution is completed- Specified by:
logsin interfaceMTLCommandBuffer
-
resourceStateCommandEncoderWithDescriptor
public MTLResourceStateCommandEncoder resourceStateCommandEncoderWithDescriptor(MTLResourceStatePassDescriptor resourceStatePassDescriptor)
- Specified by:
resourceStateCommandEncoderWithDescriptorin interfaceMTLCommandBuffer
-
-