Interface MTLArgumentEncoder


  • public interface MTLArgumentEncoder
    [@protocol] MTLArgumentEncoder MTLArgumentEncoder encodes buffer, texture, sampler, and constant data into a buffer. API-Since: 11.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long alignment()
      [@property] alignment The alignment in bytes required to store the encoded resource bindings.
      @NotNull org.moe.natj.general.ptr.VoidPtr constantDataAtIndex​(long index)
      constantDataAtIndex: Returns a pointer to the constant data at the given bind point index.
      @NotNull MTLDevice device()
      [@property] device The device this argument encoder was created against.
      long encodedLength()
      [@property] encodedLength The number of bytes required to store the encoded resource bindings.
      @Nullable java.lang.String label()
      [@property] label A string to help identify this object.
      @Nullable MTLArgumentEncoder newArgumentEncoderForBufferAtIndex​(long index)
      newArgumentEncoderForBufferAtIndex: Returns a pointer to a new MTLArgumentEncoder that can be used to encode the an argument buffer in the buffer associated with a given index.
      void setAccelerationStructureAtIndex​(@Nullable MTLAccelerationStructure accelerationStructure, long index)
      API-Since: 14.0
      void setArgumentBufferOffset​(@Nullable MTLBuffer argumentBuffer, long offset)
      setArgumentBuffer:offset: Sets the destination buffer and offset at which the arguments will be encoded.
      void setArgumentBufferStartOffsetArrayElement​(@Nullable MTLBuffer argumentBuffer, long startOffset, long arrayElement)
      * @method setArgumentBuffer:offset:arrayElement: * @brief Sets the destination buffer, starting offset and specific array element arguments will be encoded into.
      void setBufferOffsetAtIndex​(@Nullable MTLBuffer buffer, long offset, long index)
      setBuffer:offset:atIndex: Set a buffer at the given bind point index.
      void setBuffersOffsetsWithRange​(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, @NotNull org.moe.natj.general.ptr.ConstNUIntPtr offsets, NSRange range)
      setBuffers:offsets:withRange: Set an array of buffers at the given bind point index range.
      void setComputePipelineStateAtIndex​(@Nullable MTLComputePipelineState pipeline, long index)
      setComputePipelineState:atIndex Sets a compute pipeline state at a given bind point index API-Since: 13.0
      void setComputePipelineStatesWithRange​(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> pipelines, NSRange range)
      setComputePipelineStates:withRange Set an array of compute pipeline states at a given bind point index range API-Since: 13.0
      void setIndirectCommandBufferAtIndex​(@Nullable MTLIndirectCommandBuffer indirectCommandBuffer, long index)
      setIndirectCommandBuffer:atIndex Sets an indirect command buffer at a given bind point index API-Since: 12.0
      void setIndirectCommandBuffersWithRange​(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, NSRange range)
      setIndirectCommandBuffers:withRange: Set an array of indirect command buffers at the given bind point index range.
      void setIntersectionFunctionTableAtIndex​(@Nullable MTLIntersectionFunctionTable intersectionFunctionTable, long index)
      setIntersectionFunctionTable:atIndex: Set an intersection function table at the given buffer index API-Since: 14.0
      void setIntersectionFunctionTablesWithRange​(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> intersectionFunctionTables, NSRange range)
      setIntersectionFunctionTables:withRange: Set intersection function tables at the given buffer index range API-Since: 14.0
      void setLabel​(@Nullable java.lang.String value)
      [@property] label A string to help identify this object.
      void setRenderPipelineStateAtIndex​(@Nullable MTLRenderPipelineState pipeline, long index)
      setRenderPipelineState:atIndex Sets a render pipeline state at a given bind point index API-Since: 13.0
      void setRenderPipelineStatesWithRange​(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> pipelines, NSRange range)
      setRenderPipelineStates:withRange Set an array of render pipeline states at a given bind point index range API-Since: 13.0
      void setSamplerStateAtIndex​(@Nullable MTLSamplerState sampler, long index)
      setSamplerState:atIndex: Set a sampler at the given bind point index.
      void setSamplerStatesWithRange​(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, NSRange range)
      setSamplerStates:withRange: Set an array of samplers at the given bind point index range.
      void setTextureAtIndex​(@Nullable MTLTexture texture, long index)
      setTexture:atIndex: Set a texture at the given bind point index.
      void setTexturesWithRange​(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures, NSRange range)
      setTextures:withRange: Set an array of textures at the given bind point index range.
      void setVisibleFunctionTableAtIndex​(@Nullable MTLVisibleFunctionTable visibleFunctionTable, long index)
      setVisibleFunctionTable:atIndex: Set a visible function table at the given buffer index API-Since: 14.0
      void setVisibleFunctionTablesWithRange​(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> visibleFunctionTables, NSRange range)
      setVisibleFunctionTables:withRange: Set visible function tables at the given buffer index range API-Since: 14.0
    • Method Detail

      • alignment

        long alignment()
        [@property] alignment The alignment in bytes required to store the encoded resource bindings.
      • constantDataAtIndex

        @NotNull
        @NotNull org.moe.natj.general.ptr.VoidPtr constantDataAtIndex​(long index)
        constantDataAtIndex: Returns a pointer to the constant data at the given bind point index.
      • device

        @NotNull
        @NotNull MTLDevice device()
        [@property] device The device this argument encoder was created against.
      • encodedLength

        long encodedLength()
        [@property] encodedLength The number of bytes required to store the encoded resource bindings.
      • label

        @Nullable
        @Nullable java.lang.String label()
        [@property] label A string to help identify this object.
      • setArgumentBufferOffset

        void setArgumentBufferOffset​(@Nullable
                                     @Nullable MTLBuffer argumentBuffer,
                                     long offset)
        setArgumentBuffer:offset: Sets the destination buffer and offset at which the arguments will be encoded.
      • setArgumentBufferStartOffsetArrayElement

        void setArgumentBufferStartOffsetArrayElement​(@Nullable
                                                      @Nullable MTLBuffer argumentBuffer,
                                                      long startOffset,
                                                      long arrayElement)
        * @method setArgumentBuffer:offset:arrayElement: * @brief Sets the destination buffer, starting offset and specific array element arguments will be encoded into. arrayElement represents the desired element of IAB array targetted by encoding
      • setBufferOffsetAtIndex

        void setBufferOffsetAtIndex​(@Nullable
                                    @Nullable MTLBuffer buffer,
                                    long offset,
                                    long index)
        setBuffer:offset:atIndex: Set a buffer at the given bind point index.
      • setBuffersOffsetsWithRange

        void setBuffersOffsetsWithRange​(@NotNull
                                        @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers,
                                        @NotNull
                                        @NotNull org.moe.natj.general.ptr.ConstNUIntPtr offsets,
                                        NSRange range)
        setBuffers:offsets:withRange: Set an array of buffers at the given bind point index range.
      • setLabel

        void setLabel​(@Nullable
                      @Nullable java.lang.String value)
        [@property] label A string to help identify this object.
      • setSamplerStateAtIndex

        void setSamplerStateAtIndex​(@Nullable
                                    @Nullable MTLSamplerState sampler,
                                    long index)
        setSamplerState:atIndex: Set a sampler at the given bind point index.
      • setSamplerStatesWithRange

        void setSamplerStatesWithRange​(@NotNull
                                       @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers,
                                       NSRange range)
        setSamplerStates:withRange: Set an array of samplers at the given bind point index range.
      • setTextureAtIndex

        void setTextureAtIndex​(@Nullable
                               @Nullable MTLTexture texture,
                               long index)
        setTexture:atIndex: Set a texture at the given bind point index.
      • setTexturesWithRange

        void setTexturesWithRange​(@NotNull
                                  @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures,
                                  NSRange range)
        setTextures:withRange: Set an array of textures at the given bind point index range.
      • newArgumentEncoderForBufferAtIndex

        @Nullable
        @Nullable MTLArgumentEncoder newArgumentEncoderForBufferAtIndex​(long index)
        newArgumentEncoderForBufferAtIndex: Returns a pointer to a new MTLArgumentEncoder that can be used to encode the an argument buffer in the buffer associated with a given index. Returns nil if the resource at the given index is not an argument buffer. API-Since: 11.0
      • setComputePipelineStateAtIndex

        void setComputePipelineStateAtIndex​(@Nullable
                                            @Nullable MTLComputePipelineState pipeline,
                                            long index)
        setComputePipelineState:atIndex Sets a compute pipeline state at a given bind point index API-Since: 13.0
      • setComputePipelineStatesWithRange

        void setComputePipelineStatesWithRange​(@NotNull
                                               @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> pipelines,
                                               NSRange range)
        setComputePipelineStates:withRange Set an array of compute pipeline states at a given bind point index range API-Since: 13.0
      • setIndirectCommandBufferAtIndex

        void setIndirectCommandBufferAtIndex​(@Nullable
                                             @Nullable MTLIndirectCommandBuffer indirectCommandBuffer,
                                             long index)
        setIndirectCommandBuffer:atIndex Sets an indirect command buffer at a given bind point index API-Since: 12.0
      • setIndirectCommandBuffersWithRange

        void setIndirectCommandBuffersWithRange​(@NotNull
                                                @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers,
                                                NSRange range)
        setIndirectCommandBuffers:withRange: Set an array of indirect command buffers at the given bind point index range. API-Since: 12.0
      • setRenderPipelineStateAtIndex

        void setRenderPipelineStateAtIndex​(@Nullable
                                           @Nullable MTLRenderPipelineState pipeline,
                                           long index)
        setRenderPipelineState:atIndex Sets a render pipeline state at a given bind point index API-Since: 13.0
      • setRenderPipelineStatesWithRange

        void setRenderPipelineStatesWithRange​(@NotNull
                                              @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> pipelines,
                                              NSRange range)
        setRenderPipelineStates:withRange Set an array of render pipeline states at a given bind point index range API-Since: 13.0
      • setAccelerationStructureAtIndex

        void setAccelerationStructureAtIndex​(@Nullable
                                             @Nullable MTLAccelerationStructure accelerationStructure,
                                             long index)
        API-Since: 14.0
      • setIntersectionFunctionTableAtIndex

        void setIntersectionFunctionTableAtIndex​(@Nullable
                                                 @Nullable MTLIntersectionFunctionTable intersectionFunctionTable,
                                                 long index)
        setIntersectionFunctionTable:atIndex: Set an intersection function table at the given buffer index API-Since: 14.0
      • setIntersectionFunctionTablesWithRange

        void setIntersectionFunctionTablesWithRange​(@NotNull
                                                    @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> intersectionFunctionTables,
                                                    NSRange range)
        setIntersectionFunctionTables:withRange: Set intersection function tables at the given buffer index range API-Since: 14.0
      • setVisibleFunctionTableAtIndex

        void setVisibleFunctionTableAtIndex​(@Nullable
                                            @Nullable MTLVisibleFunctionTable visibleFunctionTable,
                                            long index)
        setVisibleFunctionTable:atIndex: Set a visible function table at the given buffer index API-Since: 14.0
      • setVisibleFunctionTablesWithRange

        void setVisibleFunctionTablesWithRange​(@NotNull
                                               @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> visibleFunctionTables,
                                               NSRange range)
        setVisibleFunctionTables:withRange: Set visible function tables at the given buffer index range API-Since: 14.0