Package apple.metal.protocol
Interface MTLRenderCommandEncoder
-
- All Superinterfaces:
MTLCommandEncoder
public interface MTLRenderCommandEncoder extends MTLCommandEncoder
[@protocol] MTLRenderCommandEncoder MTLRenderCommandEncoder is a container for graphics rendering state and the code to translate the state into a command format that the device can execute.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispatchThreadsPerTile(MTLSize threadsPerTile)dispatchThreadsPerTile: dispatch threads to perform a mid-render compute operation.voiddrawIndexedPatchesPatchIndexBufferPatchIndexBufferOffsetControlPointIndexBufferControlPointIndexBufferOffsetIndirectBufferIndirectBufferOffset(long numberOfPatchControlPoints, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer controlPointIndexBuffer, long controlPointIndexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)voiddrawIndexedPatchesPatchStartPatchCountPatchIndexBufferPatchIndexBufferOffsetControlPointIndexBufferControlPointIndexBufferOffsetInstanceCountBaseInstance(long numberOfPatchControlPoints, long patchStart, long patchCount, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer controlPointIndexBuffer, long controlPointIndexBufferOffset, long instanceCount, long baseInstance)voiddrawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffset(long primitiveType, long indexCount, long indexType, MTLBuffer indexBuffer, long indexBufferOffset)drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset: Draw primitives with an index list.voiddrawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffsetInstanceCount(long primitiveType, long indexCount, long indexType, MTLBuffer indexBuffer, long indexBufferOffset, long instanceCount)drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount: Draw primitives with an index list.voiddrawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffsetInstanceCountBaseVertexBaseInstance(long primitiveType, long indexCount, long indexType, MTLBuffer indexBuffer, long indexBufferOffset, long instanceCount, long baseVertex, long baseInstance)drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance: Draw primitives with an index list.voiddrawIndexedPrimitivesIndexTypeIndexBufferIndexBufferOffsetIndirectBufferIndirectBufferOffset(long primitiveType, long indexType, MTLBuffer indexBuffer, long indexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset: Draw primitives with an index list using an indirect buffer see MTLDrawIndexedPrimitivesIndirectArguments.voiddrawPatchesPatchIndexBufferPatchIndexBufferOffsetIndirectBufferIndirectBufferOffset(long numberOfPatchControlPoints, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)voiddrawPatchesPatchStartPatchCountPatchIndexBufferPatchIndexBufferOffsetInstanceCountBaseInstance(long numberOfPatchControlPoints, long patchStart, long patchCount, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, long instanceCount, long baseInstance)voiddrawPrimitivesIndirectBufferIndirectBufferOffset(long primitiveType, MTLBuffer indirectBuffer, long indirectBufferOffset)drawPrimitives:indirectBuffer:indirectBufferOffset: Draw primitives without an index list using an indirect buffer see MTLDrawPrimitivesIndirectArguments.voiddrawPrimitivesVertexStartVertexCount(long primitiveType, long vertexStart, long vertexCount)drawPrimitives:vertexStart:vertexCount: Draw primitives without an index list.voiddrawPrimitivesVertexStartVertexCountInstanceCount(long primitiveType, long vertexStart, long vertexCount, long instanceCount)drawPrimitives:vertexStart:vertexCount:instanceCount: Draw primitives without an index list.voiddrawPrimitivesVertexStartVertexCountInstanceCountBaseInstance(long primitiveType, long vertexStart, long vertexCount, long instanceCount, long baseInstance)drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance: Draw primitives without an index list.voidexecuteCommandsInBufferIndirectBufferIndirectBufferOffset(MTLIndirectCommandBuffer indirectCommandbuffer, MTLBuffer indirectRangeBuffer, long indirectBufferOffset)executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: Execute commands in the buffer within the range specified by the indirect range buffer.voidexecuteCommandsInBufferWithRange(MTLIndirectCommandBuffer indirectCommandBuffer, NSRange executionRange)executeCommandsInBuffer:withRange: Execute commands in the buffer within the range specified.voidsampleCountersInBufferAtSampleIndexWithBarrier(MTLCounterSampleBuffer sampleBuffer, long sampleIndex, boolean barrier)sampleCountersInBuffer:atSampleIndex:withBarrier: Sample hardware counters at this point in the render encoder and store the counter sample into the sample buffer at the specified index.voidsetBlendColorRedGreenBlueAlpha(float red, float green, float blue, float alpha)Constant Blend Color setBlendColorRed:green:blue:alpha: Set the constant blend color used across all blending on all render targetsvoidsetColorStoreActionAtIndex(long storeAction, long colorAttachmentIndex)setColorStoreAction:atIndex: If the the store action for a given color attachment was set to MTLStoreActionUnknown when the render command encoder was created, setColorStoreAction:atIndex: must be used to finalize the store action before endEncoding is called.voidsetColorStoreActionOptionsAtIndex(long storeActionOptions, long colorAttachmentIndex)setColorStoreActionOptions:atIndex: If the the store action for a given color attachment was set to MTLStoreActionUnknown when the render command encoder was created, setColorStoreActionOptions:atIndex: may be used to finalize the store action options before endEncoding is called.voidsetCullMode(long cullMode)setCullMode: Controls if primitives are culled when front facing, back facing, or not culled at all.voidsetDepthBiasSlopeScaleClamp(float depthBias, float slopeScale, float clamp)setDepthBias:slopeScale:clamp: Depth Bias.voidsetDepthClipMode(long depthClipMode)setDepthClipMode: Controls what is done with fragments outside of the near or far planes.voidsetDepthStencilState(MTLDepthStencilState depthStencilState)setDepthStencilState: Set the DepthStencil state object.voidsetDepthStoreAction(long storeAction)setDepthStoreAction: If the the store action for the depth attachment was set to MTLStoreActionUnknown when the render command encoder was created, setDepthStoreAction: must be used to finalize the store action before endEncoding is called.voidsetDepthStoreActionOptions(long storeActionOptions)setDepthStoreActionOptions: If the the store action for the depth attachment was set to MTLStoreActionUnknown when the render command encoder was created, setDepthStoreActionOptions: may be used to finalize the store action options before endEncoding is called.voidsetFragmentBufferOffsetAtIndex(long offset, long index)setFragmentBufferOffset:atIndex: Set the offset within the current global buffer for all fragment shaders at the given bind point index.voidsetFragmentBufferOffsetAtIndex(MTLBuffer buffer, long offset, long index)setFragmentBuffer:offset:atIndex: Set a global buffer for all fragment shaders at the given bind point index.voidsetFragmentBuffersOffsetsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, org.moe.natj.general.ptr.ConstNUIntPtr offsets, NSRange range)setFragmentBuffers:offsets:withRange: Set an array of global buffers for all fragment shaders with the given bind point range.voidsetFragmentBytesLengthAtIndex(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length, long index)setFragmentBytes:length:atIndex: Set the data (by copy) for a given fragment buffer binding point.voidsetFragmentSamplerStateAtIndex(MTLSamplerState sampler, long index)setFragmentSamplerState:atIndex: Set a global sampler for all fragment shaders at the given bind point index.voidsetFragmentSamplerStateLodMinClampLodMaxClampAtIndex(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)setFragmentSamplerState:lodMinClamp:lodMaxClamp:atIndex: Set a global sampler for all fragment shaders at the given bind point index.voidsetFragmentSamplerStatesLodMinClampsLodMaxClampsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, org.moe.natj.general.ptr.ConstFloatPtr lodMinClamps, org.moe.natj.general.ptr.ConstFloatPtr lodMaxClamps, NSRange range)setFragmentSamplerStates:lodMinClamps:lodMaxClamps:withRange: Set an array of global samplers for all fragment shaders with the given bind point range.voidsetFragmentSamplerStatesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, NSRange range)setFragmentSamplerStates:withRange: Set an array of global samplers for all fragment shaders with the given bind point range.voidsetFragmentTextureAtIndex(MTLTexture texture, long index)setFragmentTexture:atIndex: Set a global texture for all fragment shaders at the given bind point index.voidsetFragmentTexturesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures, NSRange range)setFragmentTextures:withRange: Set an array of global textures for all fragment shaders with the given bind point range.voidsetFrontFacingWinding(long frontFacingWinding)setFrontFacingWinding: The winding order of front-facing primitives.voidsetRenderPipelineState(MTLRenderPipelineState pipelineState)setRenderPipelineState Sets the current render pipeline state object.voidsetScissorRect(MTLScissorRect rect)setScissorRect: Specifies a rectangle for a fragment scissor test.voidsetScissorRectsCount(MTLScissorRect scissorRects, long count)setScissorRects: Specifies an array of rectangles for a fragment scissor test.voidsetStencilFrontReferenceValueBackReferenceValue(int frontReferenceValue, int backReferenceValue)setStencilFrontReferenceValue:backReferenceValue: Set the stencil reference value for the back and front stencil buffers independently.voidsetStencilReferenceValue(int referenceValue)setStencilReferenceValue: Set the stencil reference value for both the back and front stencil buffers.voidsetStencilStoreAction(long storeAction)setStencilStoreAction: If the the store action for the stencil attachment was set to MTLStoreActionUnknown when the render command encoder was created, setStencilStoreAction: must be used to finalize the store action before endEncoding is called.voidsetStencilStoreActionOptions(long storeActionOptions)setStencilStoreActionOptions: If the the store action for the stencil attachment was set to MTLStoreActionUnknown when the render command encoder was created, setStencilStoreActionOptions: may be used to finalize the store action options before endEncoding is called.voidsetTessellationFactorBufferOffsetInstanceStride(MTLBuffer buffer, long offset, long instanceStride)voidsetTessellationFactorScale(float scale)voidsetThreadgroupMemoryLengthOffsetAtIndex(long length, long offset, long index)setThreadgroupMemoryLength:offset:atIndex: Set the size of the threadgroup memory argument at the given bind point index and offset.voidsetTileBufferOffsetAtIndex(long offset, long index)setTileBufferOffset:atIndex: Set the offset within the current global buffer for all tile shaders at the given bind point index.voidsetTileBufferOffsetAtIndex(MTLBuffer buffer, long offset, long index)setTileBuffer:offset:atIndex: Set a global buffer for all tile shaders at the given bind point index.voidsetTileBuffersOffsetsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, org.moe.natj.general.ptr.ConstNUIntPtr offsets, NSRange range)setTileBuffers:offsets:withRange: Set an array of global buffers for all tile shaders with the given bind point range.voidsetTileBytesLengthAtIndex(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length, long index)setTileBytes:length:atIndex: Set the data (by copy) for a given tile buffer binding point.voidsetTileSamplerStateAtIndex(MTLSamplerState sampler, long index)setTileSamplerState:atIndex: Set a global sampler for all tile shaders at the given bind point index.voidsetTileSamplerStateLodMinClampLodMaxClampAtIndex(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex: Set a global sampler for all tile shaders at the given bind point index.voidsetTileSamplerStatesLodMinClampsLodMaxClampsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, org.moe.natj.general.ptr.ConstFloatPtr lodMinClamps, org.moe.natj.general.ptr.ConstFloatPtr lodMaxClamps, NSRange range)setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange: Set an array of global samplers for all tile shaders with the given bind point range.voidsetTileSamplerStatesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, NSRange range)setTileSamplerStates:withRange: Set an array of global samplers for all fragment shaders with the given bind point range.voidsetTileTextureAtIndex(MTLTexture texture, long index)setTileTexture:atIndex: Set a global texture for all tile shaders at the given bind point index.voidsetTileTexturesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures, NSRange range)setTileTextures:withRange: Set an array of global textures for all tile shaders with the given bind point range.voidsetTriangleFillMode(long fillMode)setTriangleFillMode: Set how to rasterize triangle and triangle strip primitives.voidsetVertexAmplificationCountViewMappings(long count, MTLVertexAmplificationViewMapping viewMappings)setVertexAmplificationCount: Specifies the vertex amplification count and associated view mappings for each amplification ID.voidsetVertexBufferOffsetAtIndex(long offset, long index)setVertexBufferOffset:atIndex: Set the offset within the current global buffer for all vertex shaders at the given bind point index.voidsetVertexBufferOffsetAtIndex(MTLBuffer buffer, long offset, long index)setVertexBuffer:offset:atIndex: Set a global buffer for all vertex shaders at the given bind point index.voidsetVertexBuffersOffsetsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, org.moe.natj.general.ptr.ConstNUIntPtr offsets, NSRange range)setVertexBuffers:offsets:withRange: Set an array of global buffers for all vertex shaders with the given bind point range.voidsetVertexBytesLengthAtIndex(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length, long index)setVertexBytes:length:atIndex: Set the data (by copy) for a given vertex buffer binding point.voidsetVertexSamplerStateAtIndex(MTLSamplerState sampler, long index)setVertexSamplerState:atIndex: Set a global sampler for all vertex shaders at the given bind point index.voidsetVertexSamplerStateLodMinClampLodMaxClampAtIndex(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)setVertexSamplerState:lodMinClamp:lodMaxClamp:atIndex: Set a global sampler for all vertex shaders at the given bind point index.voidsetVertexSamplerStatesLodMinClampsLodMaxClampsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, org.moe.natj.general.ptr.ConstFloatPtr lodMinClamps, org.moe.natj.general.ptr.ConstFloatPtr lodMaxClamps, NSRange range)setVertexSamplerStates:lodMinClamps:lodMaxClamps:withRange: Set an array of global samplers for all vertex shaders with the given bind point range.voidsetVertexSamplerStatesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, NSRange range)setVertexSamplerStates:withRange: Set an array of global samplers for all vertex shaders with the given bind point range.voidsetVertexTextureAtIndex(MTLTexture texture, long index)setVertexTexture:atIndex: Set a global texture for all vertex shaders at the given bind point index.voidsetVertexTexturesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures, NSRange range)setVertexTextures:withRange: Set an array of global textures for all vertex shaders with the given bind point range.voidsetViewport(MTLViewport viewport)setViewport: Set the viewport, which is used to transform vertexes from normalized device coordinates to window coordinates.voidsetViewportsCount(MTLViewport viewports, long count)setViewports: Specifies an array of viewports, which are used to transform vertices from normalized device coordinates to window coordinates based on [[ viewport_array_index ]] value specified in the vertex shader.voidsetVisibilityResultModeOffset(long mode, long offset)setVisibilityResultMode:offset: Monitor if samples pass the depth and stencil tests.longtileHeight()[@property] tileHeight: The height of the tile for this render pass.longtileWidth()[@property] tileWidth: The width of the tile for this render pass.voidupdateFenceAfterStages(MTLFence fence, long stages)updateFence:afterStages: Update the fence to capture all GPU work so far enqueued by this encoder for the given stages.voiduseHeap(MTLHeap heap)useHeap: Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer This method does not protect against data hazards; these hazards must be addressed using an MTLFence.voiduseHeapsCount(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> heaps, long count)useHeaps:count: Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer This method does not protect against data hazards; these hazards must be addressed using an MTLFence.voiduseHeapsCountStages(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> heaps, long count, long stages)useHeaps:count:stages Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer This method does not protect against data hazards; these hazards must be addressed using an MTLFence.voiduseHeapStages(MTLHeap heap, long stages)useHeap:stages Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer If the heap is tracked, this method protects against hazard tracking; these hazards must be addressed using an MTLFence.voiduseResourcesCountUsage(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> resources, long count, long usage)* @method useResources:count:usage: * @abstract Declare that an array of resources may be accessed through an argument buffer by the render pass * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence.voiduseResourcesCountUsageStages(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> resources, long count, long usage, long stages)* @method useResources:count:usage:stages * @abstract Declare that an array of resources may be accessed through an argument buffer by the render pass * @discussion For hazard tracked resources, this method protects against data hazards.voiduseResourceUsage(MTLResource resource, long usage)* @method useResource:usage: * @abstract Declare that a resource may be accessed by the render pass through an argument buffer * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence.voiduseResourceUsageStages(MTLResource resource, long usage, long stages)* @method useResources:usage:stage * @abstract Declare that a resource may be accessed by the render pass through an argument buffer * @For hazard tracked resources, this method protects against data hazards.voidwaitForFenceBeforeStages(MTLFence fence, long stages)waitForFence:beforeStages: Prevent further GPU work until the fence is reached for the given stages.-
Methods inherited from interface apple.metal.protocol.MTLCommandEncoder
device, endEncoding, insertDebugSignpost, label, popDebugGroup, pushDebugGroup, setLabel
-
-
-
-
Method Detail
-
drawIndexedPatchesPatchStartPatchCountPatchIndexBufferPatchIndexBufferOffsetControlPointIndexBufferControlPointIndexBufferOffsetInstanceCountBaseInstance
void drawIndexedPatchesPatchStartPatchCountPatchIndexBufferPatchIndexBufferOffsetControlPointIndexBufferControlPointIndexBufferOffsetInstanceCountBaseInstance(long numberOfPatchControlPoints, long patchStart, long patchCount, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer controlPointIndexBuffer, long controlPointIndexBufferOffset, long instanceCount, long baseInstance)
-
drawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffset
void drawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffset(long primitiveType, long indexCount, long indexType, MTLBuffer indexBuffer, long indexBufferOffset)drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset: Draw primitives with an index list.- Parameters:
primitiveType- The type of primitives that elements are assembled into.indexCount- The number of indexes to read from the index buffer for each instance.indexType- The type if indexes, either 16 bit integer or 32 bit integer.indexBuffer- A buffer object that the device will read indexes from.indexBufferOffset- Byte offset within @a indexBuffer to start reading indexes from. @a indexBufferOffset must be a multiple of the index size.
-
drawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffsetInstanceCount
void drawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffsetInstanceCount(long primitiveType, long indexCount, long indexType, MTLBuffer indexBuffer, long indexBufferOffset, long instanceCount)drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount: Draw primitives with an index list.- Parameters:
primitiveType- The type of primitives that elements are assembled into.indexCount- The number of indexes to read from the index buffer for each instance.indexType- The type if indexes, either 16 bit integer or 32 bit integer.indexBuffer- A buffer object that the device will read indexes from.indexBufferOffset- Byte offset within @a indexBuffer to start reading indexes from. @a indexBufferOffset must be a multiple of the index size.instanceCount- The number of instances drawn.
-
drawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffsetInstanceCountBaseVertexBaseInstance
void drawIndexedPrimitivesIndexCountIndexTypeIndexBufferIndexBufferOffsetInstanceCountBaseVertexBaseInstance(long primitiveType, long indexCount, long indexType, MTLBuffer indexBuffer, long indexBufferOffset, long instanceCount, long baseVertex, long baseInstance)drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance: Draw primitives with an index list.- Parameters:
primitiveType- The type of primitives that elements are assembled into.indexCount- The number of indexes to read from the index buffer for each instance.indexType- The type if indexes, either 16 bit integer or 32 bit integer.indexBuffer- A buffer object that the device will read indexes from.indexBufferOffset- Byte offset within @a indexBuffer to start reading indexes from. @a indexBufferOffset must be a multiple of the index size.instanceCount- The number of instances drawn.baseVertex- Offset for vertex_id. NOTE: this can be negativebaseInstance- Offset for instance_id.
-
drawIndexedPrimitivesIndexTypeIndexBufferIndexBufferOffsetIndirectBufferIndirectBufferOffset
void drawIndexedPrimitivesIndexTypeIndexBufferIndexBufferOffsetIndirectBufferIndirectBufferOffset(long primitiveType, long indexType, MTLBuffer indexBuffer, long indexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset: Draw primitives with an index list using an indirect buffer see MTLDrawIndexedPrimitivesIndirectArguments.- Parameters:
primitiveType- The type of primitives that elements are assembled into.indexType- The type if indexes, either 16 bit integer or 32 bit integer.indexBuffer- A buffer object that the device will read indexes from.indexBufferOffset- Byte offset within @a indexBuffer to start reading indexes from. @a indexBufferOffset must be a multiple of the index size.indirectBuffer- A buffer object that the device will read drawIndexedPrimitives arguments from, see MTLDrawIndexedPrimitivesIndirectArguments.indirectBufferOffset- Byte offset within @a indirectBuffer to start reading indexes from. @a indirectBufferOffset must be a multiple of 4.
-
drawPatchesPatchStartPatchCountPatchIndexBufferPatchIndexBufferOffsetInstanceCountBaseInstance
void drawPatchesPatchStartPatchCountPatchIndexBufferPatchIndexBufferOffsetInstanceCountBaseInstance(long numberOfPatchControlPoints, long patchStart, long patchCount, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, long instanceCount, long baseInstance)
-
drawPrimitivesIndirectBufferIndirectBufferOffset
void drawPrimitivesIndirectBufferIndirectBufferOffset(long primitiveType, MTLBuffer indirectBuffer, long indirectBufferOffset)drawPrimitives:indirectBuffer:indirectBufferOffset: Draw primitives without an index list using an indirect buffer see MTLDrawPrimitivesIndirectArguments.- Parameters:
primitiveType- The type of primitives that elements are assembled into.indirectBuffer- A buffer object that the device will read drawPrimitives arguments from, see MTLDrawPrimitivesIndirectArguments.indirectBufferOffset- Byte offset within @a indirectBuffer to start reading indexes from. @a indirectBufferOffset must be a multiple of 4.
-
drawPrimitivesVertexStartVertexCount
void drawPrimitivesVertexStartVertexCount(long primitiveType, long vertexStart, long vertexCount)drawPrimitives:vertexStart:vertexCount: Draw primitives without an index list.- Parameters:
primitiveType- The type of primitives that elements are assembled into.vertexStart- For each instance, the first index to drawvertexCount- For each instance, the number of indexes to draw
-
drawPrimitivesVertexStartVertexCountInstanceCount
void drawPrimitivesVertexStartVertexCountInstanceCount(long primitiveType, long vertexStart, long vertexCount, long instanceCount)drawPrimitives:vertexStart:vertexCount:instanceCount: Draw primitives without an index list.- Parameters:
primitiveType- The type of primitives that elements are assembled into.vertexStart- For each instance, the first index to drawvertexCount- For each instance, the number of indexes to drawinstanceCount- The number of instances drawn.
-
drawPrimitivesVertexStartVertexCountInstanceCountBaseInstance
void drawPrimitivesVertexStartVertexCountInstanceCountBaseInstance(long primitiveType, long vertexStart, long vertexCount, long instanceCount, long baseInstance)drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance: Draw primitives without an index list.- Parameters:
primitiveType- The type of primitives that elements are assembled into.vertexStart- For each instance, the first index to drawvertexCount- For each instance, the number of indexes to drawinstanceCount- The number of instances drawn.baseInstance- Offset for instance_id.
-
setBlendColorRedGreenBlueAlpha
void setBlendColorRedGreenBlueAlpha(float red, float green, float blue, float alpha)Constant Blend Color setBlendColorRed:green:blue:alpha: Set the constant blend color used across all blending on all render targets
-
setColorStoreActionAtIndex
void setColorStoreActionAtIndex(long storeAction, long colorAttachmentIndex)setColorStoreAction:atIndex: If the the store action for a given color attachment was set to MTLStoreActionUnknown when the render command encoder was created, setColorStoreAction:atIndex: must be used to finalize the store action before endEncoding is called.- Parameters:
storeAction- The desired store action for the given color attachment. This may be set to any value other than MTLStoreActionUnknown.colorAttachmentIndex- The index of the color attachment
-
setCullMode
void setCullMode(long cullMode)
setCullMode: Controls if primitives are culled when front facing, back facing, or not culled at all.
-
setDepthBiasSlopeScaleClamp
void setDepthBiasSlopeScaleClamp(float depthBias, float slopeScale, float clamp)setDepthBias:slopeScale:clamp: Depth Bias.
-
setDepthStencilState
void setDepthStencilState(MTLDepthStencilState depthStencilState)
setDepthStencilState: Set the DepthStencil state object.
-
setDepthStoreAction
void setDepthStoreAction(long storeAction)
setDepthStoreAction: If the the store action for the depth attachment was set to MTLStoreActionUnknown when the render command encoder was created, setDepthStoreAction: must be used to finalize the store action before endEncoding is called.
-
setFragmentBufferOffsetAtIndex
void setFragmentBufferOffsetAtIndex(MTLBuffer buffer, long offset, long index)
setFragmentBuffer:offset:atIndex: Set a global buffer for all fragment shaders at the given bind point index.
-
setFragmentBufferOffsetAtIndex
void setFragmentBufferOffsetAtIndex(long offset, long index)setFragmentBufferOffset:atIndex: Set the offset within the current global buffer for all fragment shaders at the given bind point index.
-
setFragmentBuffersOffsetsWithRange
void setFragmentBuffersOffsetsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, org.moe.natj.general.ptr.ConstNUIntPtr offsets, NSRange range)setFragmentBuffers:offsets:withRange: Set an array of global buffers for all fragment shaders with the given bind point range.
-
setFragmentBytesLengthAtIndex
void setFragmentBytesLengthAtIndex(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length, long index)setFragmentBytes:length:atIndex: Set the data (by copy) for a given fragment buffer binding point. This will remove any existing MTLBuffer from the binding point.
-
setFragmentSamplerStateAtIndex
void setFragmentSamplerStateAtIndex(MTLSamplerState sampler, long index)
setFragmentSamplerState:atIndex: Set a global sampler for all fragment shaders at the given bind point index.
-
setFragmentSamplerStateLodMinClampLodMaxClampAtIndex
void setFragmentSamplerStateLodMinClampLodMaxClampAtIndex(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)
setFragmentSamplerState:lodMinClamp:lodMaxClamp:atIndex: Set a global sampler for all fragment shaders at the given bind point index.
-
setFragmentSamplerStatesLodMinClampsLodMaxClampsWithRange
void setFragmentSamplerStatesLodMinClampsLodMaxClampsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, org.moe.natj.general.ptr.ConstFloatPtr lodMinClamps, org.moe.natj.general.ptr.ConstFloatPtr lodMaxClamps, NSRange range)setFragmentSamplerStates:lodMinClamps:lodMaxClamps:withRange: Set an array of global samplers for all fragment shaders with the given bind point range.
-
setFragmentSamplerStatesWithRange
void setFragmentSamplerStatesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, NSRange range)setFragmentSamplerStates:withRange: Set an array of global samplers for all fragment shaders with the given bind point range.
-
setFragmentTextureAtIndex
void setFragmentTextureAtIndex(MTLTexture texture, long index)
setFragmentTexture:atIndex: Set a global texture for all fragment shaders at the given bind point index.
-
setFragmentTexturesWithRange
void setFragmentTexturesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures, NSRange range)setFragmentTextures:withRange: Set an array of global textures for all fragment shaders with the given bind point range.
-
setFrontFacingWinding
void setFrontFacingWinding(long frontFacingWinding)
setFrontFacingWinding: The winding order of front-facing primitives.
-
setRenderPipelineState
void setRenderPipelineState(MTLRenderPipelineState pipelineState)
setRenderPipelineState Sets the current render pipeline state object.
-
setScissorRect
void setScissorRect(MTLScissorRect rect)
setScissorRect: Specifies a rectangle for a fragment scissor test. All fragments outside of this rectangle are discarded.
-
setStencilFrontReferenceValueBackReferenceValue
void setStencilFrontReferenceValueBackReferenceValue(int frontReferenceValue, int backReferenceValue)setStencilFrontReferenceValue:backReferenceValue: Set the stencil reference value for the back and front stencil buffers independently.
-
setStencilReferenceValue
void setStencilReferenceValue(int referenceValue)
setStencilReferenceValue: Set the stencil reference value for both the back and front stencil buffers.
-
setStencilStoreAction
void setStencilStoreAction(long storeAction)
setStencilStoreAction: If the the store action for the stencil attachment was set to MTLStoreActionUnknown when the render command encoder was created, setStencilStoreAction: must be used to finalize the store action before endEncoding is called.
-
setTessellationFactorBufferOffsetInstanceStride
void setTessellationFactorBufferOffsetInstanceStride(MTLBuffer buffer, long offset, long instanceStride)
-
setTessellationFactorScale
void setTessellationFactorScale(float scale)
-
setTriangleFillMode
void setTriangleFillMode(long fillMode)
setTriangleFillMode: Set how to rasterize triangle and triangle strip primitives.
-
setVertexBufferOffsetAtIndex
void setVertexBufferOffsetAtIndex(MTLBuffer buffer, long offset, long index)
setVertexBuffer:offset:atIndex: Set a global buffer for all vertex shaders at the given bind point index.
-
setVertexBufferOffsetAtIndex
void setVertexBufferOffsetAtIndex(long offset, long index)setVertexBufferOffset:atIndex: Set the offset within the current global buffer for all vertex shaders at the given bind point index.
-
setVertexBuffersOffsetsWithRange
void setVertexBuffersOffsetsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, org.moe.natj.general.ptr.ConstNUIntPtr offsets, NSRange range)setVertexBuffers:offsets:withRange: Set an array of global buffers for all vertex shaders with the given bind point range.
-
setVertexBytesLengthAtIndex
void setVertexBytesLengthAtIndex(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length, long index)setVertexBytes:length:atIndex: Set the data (by copy) for a given vertex buffer binding point. This will remove any existing MTLBuffer from the binding point.
-
setVertexSamplerStateAtIndex
void setVertexSamplerStateAtIndex(MTLSamplerState sampler, long index)
setVertexSamplerState:atIndex: Set a global sampler for all vertex shaders at the given bind point index.
-
setVertexSamplerStateLodMinClampLodMaxClampAtIndex
void setVertexSamplerStateLodMinClampLodMaxClampAtIndex(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)
setVertexSamplerState:lodMinClamp:lodMaxClamp:atIndex: Set a global sampler for all vertex shaders at the given bind point index.
-
setVertexSamplerStatesLodMinClampsLodMaxClampsWithRange
void setVertexSamplerStatesLodMinClampsLodMaxClampsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, org.moe.natj.general.ptr.ConstFloatPtr lodMinClamps, org.moe.natj.general.ptr.ConstFloatPtr lodMaxClamps, NSRange range)setVertexSamplerStates:lodMinClamps:lodMaxClamps:withRange: Set an array of global samplers for all vertex shaders with the given bind point range.
-
setVertexSamplerStatesWithRange
void setVertexSamplerStatesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, NSRange range)setVertexSamplerStates:withRange: Set an array of global samplers for all vertex shaders with the given bind point range.
-
setVertexTextureAtIndex
void setVertexTextureAtIndex(MTLTexture texture, long index)
setVertexTexture:atIndex: Set a global texture for all vertex shaders at the given bind point index.
-
setVertexTexturesWithRange
void setVertexTexturesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures, NSRange range)setVertexTextures:withRange: Set an array of global textures for all vertex shaders with the given bind point range.
-
setViewport
void setViewport(MTLViewport viewport)
setViewport: Set the viewport, which is used to transform vertexes from normalized device coordinates to window coordinates. Fragments that lie outside of the viewport are clipped, and optionally clamped for fragments outside of znear/zfar.
-
setVisibilityResultModeOffset
void setVisibilityResultModeOffset(long mode, long offset)setVisibilityResultMode:offset: Monitor if samples pass the depth and stencil tests.- Parameters:
mode- Controls if the counter is disabled or moniters passing samples.offset- The offset relative to the occlusion query buffer provided when the command encoder was created. offset must be a multiple of 8.
-
updateFenceAfterStages
void updateFenceAfterStages(MTLFence fence, long stages)
updateFence:afterStages: Update the fence to capture all GPU work so far enqueued by this encoder for the given stages. UnlikeupdateFence: , this method will update the fence when the given stage(s) complete, allowing for commands to overlap in execution. On iOS, render command encoder fence updates are always delayed until the end of the encoder.
-
waitForFenceBeforeStages
void waitForFenceBeforeStages(MTLFence fence, long stages)
waitForFence:beforeStages: Prevent further GPU work until the fence is reached for the given stages. UnlikewaitForFence: , this method will only block commands assoicated with the given stage(s), allowing for commands to overlap in execution. On iOS, render command encoder fence waits always occur the beginning of the encoder.
-
dispatchThreadsPerTile
void dispatchThreadsPerTile(MTLSize threadsPerTile)
dispatchThreadsPerTile: dispatch threads to perform a mid-render compute operation.
-
setColorStoreActionOptionsAtIndex
void setColorStoreActionOptionsAtIndex(long storeActionOptions, long colorAttachmentIndex)setColorStoreActionOptions:atIndex: If the the store action for a given color attachment was set to MTLStoreActionUnknown when the render command encoder was created, setColorStoreActionOptions:atIndex: may be used to finalize the store action options before endEncoding is called.- Parameters:
storeActionOptions- The desired store action options for the given color attachment.colorAttachmentIndex- The index of the color attachment
-
setDepthClipMode
void setDepthClipMode(long depthClipMode)
setDepthClipMode: Controls what is done with fragments outside of the near or far planes.
-
setDepthStoreActionOptions
void setDepthStoreActionOptions(long storeActionOptions)
setDepthStoreActionOptions: If the the store action for the depth attachment was set to MTLStoreActionUnknown when the render command encoder was created, setDepthStoreActionOptions: may be used to finalize the store action options before endEncoding is called.
-
setStencilStoreActionOptions
void setStencilStoreActionOptions(long storeActionOptions)
setStencilStoreActionOptions: If the the store action for the stencil attachment was set to MTLStoreActionUnknown when the render command encoder was created, setStencilStoreActionOptions: may be used to finalize the store action options before endEncoding is called.
-
setThreadgroupMemoryLengthOffsetAtIndex
void setThreadgroupMemoryLengthOffsetAtIndex(long length, long offset, long index)setThreadgroupMemoryLength:offset:atIndex: Set the size of the threadgroup memory argument at the given bind point index and offset.
-
setTileBufferOffsetAtIndex
void setTileBufferOffsetAtIndex(MTLBuffer buffer, long offset, long index)
setTileBuffer:offset:atIndex: Set a global buffer for all tile shaders at the given bind point index.
-
setTileBufferOffsetAtIndex
void setTileBufferOffsetAtIndex(long offset, long index)setTileBufferOffset:atIndex: Set the offset within the current global buffer for all tile shaders at the given bind point index.
-
setTileBuffersOffsetsWithRange
void setTileBuffersOffsetsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, org.moe.natj.general.ptr.ConstNUIntPtr offsets, NSRange range)setTileBuffers:offsets:withRange: Set an array of global buffers for all tile shaders with the given bind point range.
-
setTileBytesLengthAtIndex
void setTileBytesLengthAtIndex(org.moe.natj.general.ptr.ConstVoidPtr bytes, long length, long index)setTileBytes:length:atIndex: Set the data (by copy) for a given tile buffer binding point. This will remove any existing MTLBuffer from the binding point.
-
setTileSamplerStateAtIndex
void setTileSamplerStateAtIndex(MTLSamplerState sampler, long index)
setTileSamplerState:atIndex: Set a global sampler for all tile shaders at the given bind point index.
-
setTileSamplerStateLodMinClampLodMaxClampAtIndex
void setTileSamplerStateLodMinClampLodMaxClampAtIndex(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)
setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex: Set a global sampler for all tile shaders at the given bind point index.
-
setTileSamplerStatesLodMinClampsLodMaxClampsWithRange
void setTileSamplerStatesLodMinClampsLodMaxClampsWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, org.moe.natj.general.ptr.ConstFloatPtr lodMinClamps, org.moe.natj.general.ptr.ConstFloatPtr lodMaxClamps, NSRange range)setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange: Set an array of global samplers for all tile shaders with the given bind point range.
-
setTileSamplerStatesWithRange
void setTileSamplerStatesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, NSRange range)setTileSamplerStates:withRange: Set an array of global samplers for all fragment shaders with the given bind point range.
-
setTileTextureAtIndex
void setTileTextureAtIndex(MTLTexture texture, long index)
setTileTexture:atIndex: Set a global texture for all tile shaders at the given bind point index.
-
setTileTexturesWithRange
void setTileTexturesWithRange(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures, NSRange range)setTileTextures:withRange: Set an array of global textures for all tile shaders with the given bind point range.
-
tileHeight
long tileHeight()
[@property] tileHeight: The height of the tile for this render pass.
-
tileWidth
long tileWidth()
[@property] tileWidth: The width of the tile for this render pass.
-
useHeap
void useHeap(MTLHeap heap)
useHeap: Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
-
useHeapsCount
void useHeapsCount(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> heaps, long count)useHeaps:count: Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
-
useResourceUsage
void useResourceUsage(MTLResource resource, long usage)
* @method useResource:usage: * @abstract Declare that a resource may be accessed by the render pass through an argument buffer * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resource through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices. Note that calling useResource does not retain the resource. It is the responsiblity of the user to retain the resource until the command buffer has been executed.
-
useResourcesCountUsage
void useResourcesCountUsage(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> resources, long count, long usage)* @method useResources:count:usage: * @abstract Declare that an array of resources may be accessed through an argument buffer by the render pass * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices. Note that calling useResources does not retain the resources. It is the responsiblity of the user to retain the resources until the command buffer has been executed.
-
drawIndexedPatchesPatchIndexBufferPatchIndexBufferOffsetControlPointIndexBufferControlPointIndexBufferOffsetIndirectBufferIndirectBufferOffset
void drawIndexedPatchesPatchIndexBufferPatchIndexBufferOffsetControlPointIndexBufferControlPointIndexBufferOffsetIndirectBufferIndirectBufferOffset(long numberOfPatchControlPoints, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer controlPointIndexBuffer, long controlPointIndexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)
-
drawPatchesPatchIndexBufferPatchIndexBufferOffsetIndirectBufferIndirectBufferOffset
void drawPatchesPatchIndexBufferPatchIndexBufferOffsetIndirectBufferIndirectBufferOffset(long numberOfPatchControlPoints, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)
-
executeCommandsInBufferIndirectBufferIndirectBufferOffset
void executeCommandsInBufferIndirectBufferIndirectBufferOffset(MTLIndirectCommandBuffer indirectCommandbuffer, MTLBuffer indirectRangeBuffer, long indirectBufferOffset)
executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: Execute commands in the buffer within the range specified by the indirect range buffer. The same indirect command buffer may be executed any number of times within the same encoder.- Parameters:
indirectRangeBuffer- An indirect buffer from which the device reads the execution range parameter, as laid out in the MTLIndirectCommandBufferExecutionRange structure.indirectBufferOffset- The byte offset within indirectBuffer where the execution range parameter is located. Must be a multiple of 4 bytes.
-
executeCommandsInBufferWithRange
void executeCommandsInBufferWithRange(MTLIndirectCommandBuffer indirectCommandBuffer, NSRange executionRange)
executeCommandsInBuffer:withRange: Execute commands in the buffer within the range specified. The same indirect command buffer may be executed any number of times within the same encoder.
-
setScissorRectsCount
void setScissorRectsCount(MTLScissorRect scissorRects, long count)
setScissorRects: Specifies an array of rectangles for a fragment scissor test. The specific rectangle used is based on the [[ viewport_array_index ]] value output by the vertex shader. Fragments that lie outside the scissor rectangle are discarded.
-
setVertexAmplificationCountViewMappings
void setVertexAmplificationCountViewMappings(long count, MTLVertexAmplificationViewMapping viewMappings)setVertexAmplificationCount: Specifies the vertex amplification count and associated view mappings for each amplification ID. Each mapping element describes how to route the corresponding amplification ID to a specific viewport and render target array index by using offsets from the base array index provided by the [[render_target_array_index]] and/or [[viewport_array_index]] output attributes in the vertex shader. This allows a modicum of programmability for each amplified vertex to be routed to a different [[render_target_array_index]] and [[viewport_array_index]] even though these attribytes cannot be amplified themselves.- Parameters:
count- the amplification count. The maximum value is currently 2.viewMappings- an array of mapping elements.
-
setViewportsCount
void setViewportsCount(MTLViewport viewports, long count)
setViewports: Specifies an array of viewports, which are used to transform vertices from normalized device coordinates to window coordinates based on [[ viewport_array_index ]] value specified in the vertex shader.
-
useHeapStages
void useHeapStages(MTLHeap heap, long stages)
useHeap:stages Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer If the heap is tracked, this method protects against hazard tracking; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
-
useHeapsCountStages
void useHeapsCountStages(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> heaps, long count, long stages)useHeaps:count:stages Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
-
useResourceUsageStages
void useResourceUsageStages(MTLResource resource, long usage, long stages)
* @method useResources:usage:stage * @abstract Declare that a resource may be accessed by the render pass through an argument buffer * @For hazard tracked resources, this method protects against data hazards. This method must be called before encoding any draw commands which may access the resource through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices. Note that calling useResource does not retain the resource. It is the responsiblity of the user to retain the resource until the command buffer has been executed.
-
useResourcesCountUsageStages
void useResourcesCountUsageStages(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> resources, long count, long usage, long stages)* @method useResources:count:usage:stages * @abstract Declare that an array of resources may be accessed through an argument buffer by the render pass * @discussion For hazard tracked resources, this method protects against data hazards. This method must be called before encoding any draw commands which may access the resources through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices. Note that calling useResources does not retain the resources. It is the responsiblity of the user to retain the resources until the command buffer has been executed.
-
sampleCountersInBufferAtSampleIndexWithBarrier
void sampleCountersInBufferAtSampleIndexWithBarrier(MTLCounterSampleBuffer sampleBuffer, long sampleIndex, boolean barrier)
sampleCountersInBuffer:atSampleIndex:withBarrier: Sample hardware counters at this point in the render encoder and store the counter sample into the sample buffer at the specified index.- Parameters:
sampleBuffer- The sample buffer to sample intosampleIndex- The index into the counter buffer to write the sample.barrier- Insert a barrier before taking the sample. Passing YES will ensure that all work encoded before this operation in the encoder is complete but does not isolate the work with respect to other encoders. Passing NO will allow the sample to be taken concurrently with other operations in this encoder. In general, passing YES will lead to more repeatable counter results but may negatively impact performance. Passing NO will generally be higher performance but counter results may not be repeatable.
-
-