yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
v1.3.2
1//------------------------------------------------------------------------------------------------------------------------------------------------------------- 2// 3// Metal/MTLArgumentEncoder.hpp 4// 5// Copyright 2020-2021 Apple Inc. 6// 7// Licensed under the Apache License, Version 2.0 (the "License"); 8// you may not use this file except in compliance with the License. 9// You may obtain a copy of the License at 10// 11// http://www.apache.org/licenses/LICENSE-2.0 12// 13// Unless required by applicable law or agreed to in writing, software 14// distributed under the License is distributed on an "AS IS" BASIS, 15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16// See the License for the specific language governing permissions and 17// limitations under the License. 18// 19//------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 21#pragma once 22 23#include "MTLDefines.hpp" 24#include "MTLHeaderBridge.hpp" 25#include "MTLPrivate.hpp" 26 27#include <Foundation/Foundation.hpp> 28 29#include "MTLBuffer.hpp" 30#include "MTLComputePipeline.hpp" 31#include "MTLIndirectCommandBuffer.hpp" 32#include "MTLIntersectionFunctionTable.hpp" 33#include "MTLRenderPipeline.hpp" 34#include "MTLSampler.hpp" 35#include "MTLTexture.hpp" 36#include "MTLVisibleFunctionTable.hpp" 37 38namespace MTL 39{ 40class ArgumentEncoder : public NS :: Referencing < ArgumentEncoder > 41{ 42public : 43class Device * device () const ; 44 45NS :: String * label () const ; 46void setLabel ( const NS :: String * label ) ; 47 48NS :: UInteger encodedLength () const ; 49 50NS :: UInteger alignment () const ; 51 52void setArgumentBuffer ( const class Buffer * argumentBuffer , NS :: UInteger offset ) ; 53 54void setArgumentBuffer ( const class Buffer * argumentBuffer , NS :: UInteger startOffset , NS :: UInteger arrayElement ) ; 55 56void setBuffer ( const class Buffer * buffer , NS :: UInteger offset , NS :: UInteger index ) ; 57 58void setBuffers ( MTL :: Buffer * buffers [] , const NS :: UInteger offsets [] , NS :: Range range ) ; 59 60void setTexture ( const class Texture * texture , NS :: UInteger index ) ; 61 62void setTextures ( MTL :: Texture * textures [] , NS :: Range range ) ; 63 64void setSamplerState ( const class SamplerState * sampler , NS :: UInteger index ) ; 65 66void setSamplerStates ( MTL :: SamplerState * samplers [] , NS :: Range range ) ; 67 68void * constantData ( NS :: UInteger index ) ; 69 70void setRenderPipelineState ( const class RenderPipelineState * pipeline , NS :: UInteger index ) ; 71 72void setRenderPipelineStates ( MTL :: RenderPipelineState * pipelines , NS :: Range range ) ; 73 74void setComputePipelineState ( const class ComputePipelineState * pipeline , NS :: UInteger index ) ; 75 76void setComputePipelineStates ( MTL :: ComputePipelineState * pipelines , NS :: Range range ) ; 77 78void setIndirectCommandBuffer ( const class IndirectCommandBuffer * indirectCommandBuffer , NS :: UInteger index ) ; 79 80void setIndirectCommandBuffers ( MTL :: IndirectCommandBuffer * buffers , NS :: Range range ) ; 81 82void setAccelerationStructure ( const class AccelerationStructure * accelerationStructure , NS :: UInteger index ) ; 83 84class ArgumentEncoder * newArgumentEncoder ( NS :: UInteger index ) ; 85 86void setVisibleFunctionTable ( const class VisibleFunctionTable * visibleFunctionTable , NS :: UInteger index ) ; 87 88void setVisibleFunctionTables ( const VisibleFunctionTable * visibleFunctionTables [] , NS :: Range range ) ; 89 90void setIntersectionFunctionTable ( const class IntersectionFunctionTable * intersectionFunctionTable , NS :: UInteger index ) ; 91 92void setIntersectionFunctionTables ( const IntersectionFunctionTable * intersectionFunctionTables [] , NS :: Range range ) ; 93} ; 94 95} 96 97// property: device 98_MTL_INLINE MTL :: Device * MTL :: ArgumentEncoder :: device () const 99{ 100return Object :: sendMessage < MTL :: Device *> ( this , _MTL_PRIVATE_SEL ( device )) ; 101} 102 103// property: label 104_MTL_INLINE NS :: String * MTL :: ArgumentEncoder :: label () const 105{ 106return Object :: sendMessage < NS :: String *> ( this , _MTL_PRIVATE_SEL ( label )) ; 107} 108 109_MTL_INLINE void MTL :: ArgumentEncoder :: setLabel ( const NS :: String * label ) 110{ 111Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setLabel_ ) , label ) ; 112} 113 114// property: encodedLength 115_MTL_INLINE NS :: UInteger MTL :: ArgumentEncoder :: encodedLength () const 116{ 117return Object :: sendMessage < NS :: UInteger > ( this , _MTL_PRIVATE_SEL ( encodedLength )) ; 118} 119 120// property: alignment 121_MTL_INLINE NS :: UInteger MTL :: ArgumentEncoder :: alignment () const 122{ 123return Object :: sendMessage < NS :: UInteger > ( this , _MTL_PRIVATE_SEL ( alignment )) ; 124} 125 126// method: setArgumentBuffer:offset: 127_MTL_INLINE void MTL :: ArgumentEncoder :: setArgumentBuffer ( const MTL :: Buffer * argumentBuffer , NS :: UInteger offset ) 128{ 129Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setArgumentBuffer_offset_ ) , argumentBuffer , offset ) ; 130} 131 132// method: setArgumentBuffer:startOffset:arrayElement: 133_MTL_INLINE void MTL :: ArgumentEncoder :: setArgumentBuffer ( const MTL :: Buffer * argumentBuffer , NS :: UInteger startOffset , NS :: UInteger arrayElement ) 134{ 135Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setArgumentBuffer_startOffset_arrayElement_ ) , argumentBuffer , startOffset , arrayElement ) ; 136} 137 138// method: setBuffer:offset:atIndex: 139_MTL_INLINE void MTL :: ArgumentEncoder :: setBuffer ( const MTL :: Buffer * buffer , NS :: UInteger offset , NS :: UInteger index ) 140{ 141Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setBuffer_offset_atIndex_ ) , buffer , offset , index ) ; 142} 143 144// method: setBuffers:offsets:withRange: 145_MTL_INLINE void MTL :: ArgumentEncoder :: setBuffers ( MTL :: Buffer * buffers [] , const NS :: UInteger offsets [] , NS :: Range range ) 146{ 147Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setBuffers_offsets_withRange_ ) , buffers , offsets , range ) ; 148} 149 150// method: setTexture:atIndex: 151_MTL_INLINE void MTL :: ArgumentEncoder :: setTexture ( const MTL :: Texture * texture , NS :: UInteger index ) 152{ 153Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setTexture_atIndex_ ) , texture , index ) ; 154} 155 156// method: setTextures:withRange: 157_MTL_INLINE void MTL :: ArgumentEncoder :: setTextures ( MTL :: Texture * textures [] , NS :: Range range ) 158{ 159Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setTextures_withRange_ ) , textures , range ) ; 160} 161 162// method: setSamplerState:atIndex: 163_MTL_INLINE void MTL :: ArgumentEncoder :: setSamplerState ( const MTL :: SamplerState * sampler , NS :: UInteger index ) 164{ 165Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setSamplerState_atIndex_ ) , sampler , index ) ; 166} 167 168// method: setSamplerStates:withRange: 169_MTL_INLINE void MTL :: ArgumentEncoder :: setSamplerStates ( MTL :: SamplerState * samplers [] , NS :: Range range ) 170{ 171Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setSamplerStates_withRange_ ) , samplers , range ) ; 172} 173 174// method: constantDataAtIndex: 175_MTL_INLINE void * MTL :: ArgumentEncoder :: constantData ( NS :: UInteger index ) 176{ 177return Object :: sendMessage < void *> ( this , _MTL_PRIVATE_SEL ( constantDataAtIndex_ ) , index ) ; 178} 179 180// method: setRenderPipelineState:atIndex: 181_MTL_INLINE void MTL :: ArgumentEncoder :: setRenderPipelineState ( const MTL :: RenderPipelineState * pipeline , NS :: UInteger index ) 182{ 183Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setRenderPipelineState_atIndex_ ) , pipeline , index ) ; 184} 185 186// method: setRenderPipelineStates:withRange: 187_MTL_INLINE void MTL :: ArgumentEncoder :: setRenderPipelineStates ( MTL :: RenderPipelineState * pipelines , NS :: Range range ) 188{ 189Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setRenderPipelineStates_withRange_ ) , pipelines , range ) ; 190} 191 192// method: setComputePipelineState:atIndex: 193_MTL_INLINE void MTL :: ArgumentEncoder :: setComputePipelineState ( const MTL :: ComputePipelineState * pipeline , NS :: UInteger index ) 194{ 195Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setComputePipelineState_atIndex_ ) , pipeline , index ) ; 196} 197 198// method: setComputePipelineStates:withRange: 199_MTL_INLINE void MTL :: ArgumentEncoder :: setComputePipelineStates ( MTL :: ComputePipelineState * pipelines , NS :: Range range ) 200{ 201Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setComputePipelineStates_withRange_ ) , pipelines , range ) ; 202} 203 204// method: setIndirectCommandBuffer:atIndex: 205_MTL_INLINE void MTL :: ArgumentEncoder :: setIndirectCommandBuffer ( const MTL :: IndirectCommandBuffer * indirectCommandBuffer , NS :: UInteger index ) 206{ 207Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setIndirectCommandBuffer_atIndex_ ) , indirectCommandBuffer , index ) ; 208} 209 210// method: setIndirectCommandBuffers:withRange: 211_MTL_INLINE void MTL :: ArgumentEncoder :: setIndirectCommandBuffers ( MTL :: IndirectCommandBuffer * buffers , NS :: Range range ) 212{ 213Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setIndirectCommandBuffers_withRange_ ) , buffers , range ) ; 214} 215 216// method: setAccelerationStructure:atIndex: 217_MTL_INLINE void MTL :: ArgumentEncoder :: setAccelerationStructure ( const MTL :: AccelerationStructure * accelerationStructure , NS :: UInteger index ) 218{ 219Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setAccelerationStructure_atIndex_ ) , accelerationStructure , index ) ; 220} 221 222// method: newArgumentEncoderForBufferAtIndex: 223_MTL_INLINE MTL :: ArgumentEncoder * MTL :: ArgumentEncoder :: newArgumentEncoder ( NS :: UInteger index ) 224{ 225return Object :: sendMessage < MTL :: ArgumentEncoder *> ( this , _MTL_PRIVATE_SEL ( newArgumentEncoderForBufferAtIndex_ ) , index ) ; 226} 227 228// method: setVisibleFunctionTable:atIndex: 229_MTL_INLINE void MTL :: ArgumentEncoder :: setVisibleFunctionTable ( const MTL :: VisibleFunctionTable * visibleFunctionTable , NS :: UInteger index ) 230{ 231Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setVisibleFunctionTable_atIndex_ ) , visibleFunctionTable , index ) ; 232} 233 234// method: setVisibleFunctionTables:withRange: 235_MTL_INLINE void MTL :: ArgumentEncoder :: setVisibleFunctionTables ( const MTL :: VisibleFunctionTable * visibleFunctionTables [] , NS :: Range range ) 236{ 237Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setVisibleFunctionTables_withRange_ ) , visibleFunctionTables , range ) ; 238} 239 240// method: setIntersectionFunctionTable:atIndex: 241_MTL_INLINE void MTL :: ArgumentEncoder :: setIntersectionFunctionTable ( const MTL :: IntersectionFunctionTable * intersectionFunctionTable , NS :: UInteger index ) 242{ 243Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setIntersectionFunctionTable_atIndex_ ) , intersectionFunctionTable , index ) ; 244} 245 246// method: setIntersectionFunctionTables:withRange: 247_MTL_INLINE void MTL :: ArgumentEncoder :: setIntersectionFunctionTables ( const MTL :: IntersectionFunctionTable * intersectionFunctionTables [] , NS :: Range range ) 248{ 249Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setIntersectionFunctionTables_withRange_ ) , intersectionFunctionTables , range ) ; 250}