yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
v1.2.31
1//------------------------------------------------------------------------------------------------------------------------------------------------------------- 2// 3// Metal/MTLRasterizationRate.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 "MTLDevice.hpp" 30#include "MTLTypes.hpp" 31 32namespace MTL 33{ 34class RasterizationRateSampleArray : public NS :: Referencing < RasterizationRateSampleArray > 35{ 36public : 37static class RasterizationRateSampleArray * alloc () ; 38 39class RasterizationRateSampleArray * init () ; 40 41NS :: Number * object ( NS :: UInteger index ) ; 42 43void setObject ( const NS :: Number * value , NS :: UInteger index ) ; 44} ; 45 46class RasterizationRateLayerDescriptor : public NS :: Copying < RasterizationRateLayerDescriptor > 47{ 48public : 49static class RasterizationRateLayerDescriptor * alloc () ; 50 51MTL :: RasterizationRateLayerDescriptor * init () ; 52 53MTL :: RasterizationRateLayerDescriptor * init ( MTL :: Size sampleCount ) ; 54 55MTL :: RasterizationRateLayerDescriptor * init ( MTL :: Size sampleCount , const float * horizontal , const float * vertical ) ; 56 57MTL :: Size sampleCount () const ; 58 59MTL :: Size maxSampleCount () const ; 60 61float * horizontalSampleStorage () const ; 62 63float * verticalSampleStorage () const ; 64 65class RasterizationRateSampleArray * horizontal () const ; 66 67class RasterizationRateSampleArray * vertical () const ; 68 69void setSampleCount ( MTL :: Size sampleCount ) ; 70} ; 71 72class RasterizationRateLayerArray : public NS :: Referencing < RasterizationRateLayerArray > 73{ 74public : 75static class RasterizationRateLayerArray * alloc () ; 76 77class RasterizationRateLayerArray * init () ; 78 79class RasterizationRateLayerDescriptor * object ( NS :: UInteger layerIndex ) ; 80 81void setObject ( const class RasterizationRateLayerDescriptor * layer , NS :: UInteger layerIndex ) ; 82} ; 83 84class RasterizationRateMapDescriptor : public NS :: Copying < RasterizationRateMapDescriptor > 85{ 86public : 87static class RasterizationRateMapDescriptor * alloc () ; 88 89class RasterizationRateMapDescriptor * init () ; 90 91static class RasterizationRateMapDescriptor * rasterizationRateMapDescriptor ( MTL :: Size screenSize ) ; 92 93static class RasterizationRateMapDescriptor * rasterizationRateMapDescriptor ( MTL :: Size screenSize , const class RasterizationRateLayerDescriptor * layer ) ; 94 95static class RasterizationRateMapDescriptor * rasterizationRateMapDescriptor ( MTL :: Size screenSize , NS :: UInteger layerCount , MTL :: RasterizationRateLayerDescriptor * const * layers ) ; 96 97class RasterizationRateLayerDescriptor * layer ( NS :: UInteger layerIndex ) ; 98 99void setLayer ( const class RasterizationRateLayerDescriptor * layer , NS :: UInteger layerIndex ) ; 100 101class RasterizationRateLayerArray * layers () const ; 102 103MTL :: Size screenSize () const ; 104void setScreenSize ( MTL :: Size screenSize ) ; 105 106NS :: String * label () const ; 107void setLabel ( const NS :: String * label ) ; 108 109NS :: UInteger layerCount () const ; 110} ; 111 112class RasterizationRateMap : public NS :: Referencing < RasterizationRateMap > 113{ 114public : 115class Device * device () const ; 116 117NS :: String * label () const ; 118 119MTL :: Size screenSize () const ; 120 121MTL :: Size physicalGranularity () const ; 122 123NS :: UInteger layerCount () const ; 124 125MTL :: SizeAndAlign parameterBufferSizeAndAlign () const ; 126 127void copyParameterDataToBuffer ( const class Buffer * buffer , NS :: UInteger offset ) ; 128 129MTL :: Size physicalSize ( NS :: UInteger layerIndex ) ; 130 131MTL :: Coordinate2D mapScreenToPhysicalCoordinates ( MTL :: Coordinate2D screenCoordinates , NS :: UInteger layerIndex ) ; 132 133MTL :: Coordinate2D mapPhysicalToScreenCoordinates ( MTL :: Coordinate2D physicalCoordinates , NS :: UInteger layerIndex ) ; 134} ; 135 136} 137 138// static method: alloc 139_MTL_INLINE MTL :: RasterizationRateSampleArray * MTL :: RasterizationRateSampleArray :: alloc () 140{ 141return NS :: Object :: alloc < MTL :: RasterizationRateSampleArray > ( _MTL_PRIVATE_CLS ( MTLRasterizationRateSampleArray )) ; 142} 143 144// method: init 145_MTL_INLINE MTL :: RasterizationRateSampleArray * MTL :: RasterizationRateSampleArray :: init () 146{ 147return NS :: Object :: init < MTL :: RasterizationRateSampleArray > () ; 148} 149 150// method: objectAtIndexedSubscript: 151_MTL_INLINE NS :: Number * MTL :: RasterizationRateSampleArray :: object ( NS :: UInteger index ) 152{ 153return Object :: sendMessage < NS :: Number *> ( this , _MTL_PRIVATE_SEL ( objectAtIndexedSubscript_ ) , index ) ; 154} 155 156// method: setObject:atIndexedSubscript: 157_MTL_INLINE void MTL :: RasterizationRateSampleArray :: setObject ( const NS :: Number * value , NS :: UInteger index ) 158{ 159Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setObject_atIndexedSubscript_ ) , value , index ) ; 160} 161 162// static method: alloc 163_MTL_INLINE MTL :: RasterizationRateLayerDescriptor * MTL :: RasterizationRateLayerDescriptor :: alloc () 164{ 165return NS :: Object :: alloc < MTL :: RasterizationRateLayerDescriptor > ( _MTL_PRIVATE_CLS ( MTLRasterizationRateLayerDescriptor )) ; 166} 167 168// method: init 169_MTL_INLINE MTL :: RasterizationRateLayerDescriptor * MTL :: RasterizationRateLayerDescriptor :: init () 170{ 171return NS :: Object :: init < MTL :: RasterizationRateLayerDescriptor > () ; 172} 173 174// method: initWithSampleCount: 175_MTL_INLINE MTL :: RasterizationRateLayerDescriptor * MTL :: RasterizationRateLayerDescriptor :: init ( MTL :: Size sampleCount ) 176{ 177return Object :: sendMessage < MTL :: RasterizationRateLayerDescriptor *> ( this , _MTL_PRIVATE_SEL ( initWithSampleCount_ ) , sampleCount ) ; 178} 179 180// method: initWithSampleCount:horizontal:vertical: 181_MTL_INLINE MTL :: RasterizationRateLayerDescriptor * MTL :: RasterizationRateLayerDescriptor :: init ( MTL :: Size sampleCount , const float * horizontal , const float * vertical ) 182{ 183return Object :: sendMessage < MTL :: RasterizationRateLayerDescriptor *> ( this , _MTL_PRIVATE_SEL ( initWithSampleCount_horizontal_vertical_ ) , sampleCount , horizontal , vertical ) ; 184} 185 186// property: sampleCount 187_MTL_INLINE MTL :: Size MTL :: RasterizationRateLayerDescriptor :: sampleCount () const 188{ 189return Object :: sendMessage < MTL :: Size > ( this , _MTL_PRIVATE_SEL ( sampleCount )) ; 190} 191 192// property: maxSampleCount 193_MTL_INLINE MTL :: Size MTL :: RasterizationRateLayerDescriptor :: maxSampleCount () const 194{ 195return Object :: sendMessage < MTL :: Size > ( this , _MTL_PRIVATE_SEL ( maxSampleCount )) ; 196} 197 198// property: horizontalSampleStorage 199_MTL_INLINE float * MTL :: RasterizationRateLayerDescriptor :: horizontalSampleStorage () const 200{ 201return Object :: sendMessage < float *> ( this , _MTL_PRIVATE_SEL ( horizontalSampleStorage )) ; 202} 203 204// property: verticalSampleStorage 205_MTL_INLINE float * MTL :: RasterizationRateLayerDescriptor :: verticalSampleStorage () const 206{ 207return Object :: sendMessage < float *> ( this , _MTL_PRIVATE_SEL ( verticalSampleStorage )) ; 208} 209 210// property: horizontal 211_MTL_INLINE MTL :: RasterizationRateSampleArray * MTL :: RasterizationRateLayerDescriptor :: horizontal () const 212{ 213return Object :: sendMessage < MTL :: RasterizationRateSampleArray *> ( this , _MTL_PRIVATE_SEL ( horizontal )) ; 214} 215 216// property: vertical 217_MTL_INLINE MTL :: RasterizationRateSampleArray * MTL :: RasterizationRateLayerDescriptor :: vertical () const 218{ 219return Object :: sendMessage < MTL :: RasterizationRateSampleArray *> ( this , _MTL_PRIVATE_SEL ( vertical )) ; 220} 221 222// method: setSampleCount: 223_MTL_INLINE void MTL :: RasterizationRateLayerDescriptor :: setSampleCount ( MTL :: Size sampleCount ) 224{ 225Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setSampleCount_ ) , sampleCount ) ; 226} 227 228// static method: alloc 229_MTL_INLINE MTL :: RasterizationRateLayerArray * MTL :: RasterizationRateLayerArray :: alloc () 230{ 231return NS :: Object :: alloc < MTL :: RasterizationRateLayerArray > ( _MTL_PRIVATE_CLS ( MTLRasterizationRateLayerArray )) ; 232} 233 234// method: init 235_MTL_INLINE MTL :: RasterizationRateLayerArray * MTL :: RasterizationRateLayerArray :: init () 236{ 237return NS :: Object :: init < MTL :: RasterizationRateLayerArray > () ; 238} 239 240// method: objectAtIndexedSubscript: 241_MTL_INLINE MTL :: RasterizationRateLayerDescriptor * MTL :: RasterizationRateLayerArray :: object ( NS :: UInteger layerIndex ) 242{ 243return Object :: sendMessage < MTL :: RasterizationRateLayerDescriptor *> ( this , _MTL_PRIVATE_SEL ( objectAtIndexedSubscript_ ) , layerIndex ) ; 244} 245 246// method: setObject:atIndexedSubscript: 247_MTL_INLINE void MTL :: RasterizationRateLayerArray :: setObject ( const MTL :: RasterizationRateLayerDescriptor * layer , NS :: UInteger layerIndex ) 248{ 249Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setObject_atIndexedSubscript_ ) , layer , layerIndex ) ; 250} 251 252// static method: alloc 253_MTL_INLINE MTL :: RasterizationRateMapDescriptor * MTL :: RasterizationRateMapDescriptor :: alloc () 254{ 255return NS :: Object :: alloc < MTL :: RasterizationRateMapDescriptor > ( _MTL_PRIVATE_CLS ( MTLRasterizationRateMapDescriptor )) ; 256} 257 258// method: init 259_MTL_INLINE MTL :: RasterizationRateMapDescriptor * MTL :: RasterizationRateMapDescriptor :: init () 260{ 261return NS :: Object :: init < MTL :: RasterizationRateMapDescriptor > () ; 262} 263 264// static method: rasterizationRateMapDescriptorWithScreenSize: 265_MTL_INLINE MTL :: RasterizationRateMapDescriptor * MTL :: RasterizationRateMapDescriptor :: rasterizationRateMapDescriptor ( MTL :: Size screenSize ) 266{ 267return Object :: sendMessage < MTL :: RasterizationRateMapDescriptor *> ( _MTL_PRIVATE_CLS ( MTLRasterizationRateMapDescriptor ) , _MTL_PRIVATE_SEL ( rasterizationRateMapDescriptorWithScreenSize_ ) , screenSize ) ; 268} 269 270// static method: rasterizationRateMapDescriptorWithScreenSize:layer: 271_MTL_INLINE MTL :: RasterizationRateMapDescriptor * MTL :: RasterizationRateMapDescriptor :: rasterizationRateMapDescriptor ( MTL :: Size screenSize , const MTL :: RasterizationRateLayerDescriptor * layer ) 272{ 273return Object :: sendMessage < MTL :: RasterizationRateMapDescriptor *> ( _MTL_PRIVATE_CLS ( MTLRasterizationRateMapDescriptor ) , _MTL_PRIVATE_SEL ( rasterizationRateMapDescriptorWithScreenSize_layer_ ) , screenSize , layer ) ; 274} 275 276// static method: rasterizationRateMapDescriptorWithScreenSize:layerCount:layers: 277_MTL_INLINE MTL :: RasterizationRateMapDescriptor * MTL :: RasterizationRateMapDescriptor :: rasterizationRateMapDescriptor ( MTL :: Size screenSize , NS :: UInteger layerCount , MTL :: RasterizationRateLayerDescriptor * const * layers ) 278{ 279return Object :: sendMessage < MTL :: RasterizationRateMapDescriptor *> ( _MTL_PRIVATE_CLS ( MTLRasterizationRateMapDescriptor ) , _MTL_PRIVATE_SEL ( rasterizationRateMapDescriptorWithScreenSize_layerCount_layers_ ) , screenSize , layerCount , layers ) ; 280} 281 282// method: layerAtIndex: 283_MTL_INLINE MTL :: RasterizationRateLayerDescriptor * MTL :: RasterizationRateMapDescriptor :: layer ( NS :: UInteger layerIndex ) 284{ 285return Object :: sendMessage < MTL :: RasterizationRateLayerDescriptor *> ( this , _MTL_PRIVATE_SEL ( layerAtIndex_ ) , layerIndex ) ; 286} 287 288// method: setLayer:atIndex: 289_MTL_INLINE void MTL :: RasterizationRateMapDescriptor :: setLayer ( const MTL :: RasterizationRateLayerDescriptor * layer , NS :: UInteger layerIndex ) 290{ 291Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setLayer_atIndex_ ) , layer , layerIndex ) ; 292} 293 294// property: layers 295_MTL_INLINE MTL :: RasterizationRateLayerArray * MTL :: RasterizationRateMapDescriptor :: layers () const 296{ 297return Object :: sendMessage < MTL :: RasterizationRateLayerArray *> ( this , _MTL_PRIVATE_SEL ( layers )) ; 298} 299 300// property: screenSize 301_MTL_INLINE MTL :: Size MTL :: RasterizationRateMapDescriptor :: screenSize () const 302{ 303return Object :: sendMessage < MTL :: Size > ( this , _MTL_PRIVATE_SEL ( screenSize )) ; 304} 305 306_MTL_INLINE void MTL :: RasterizationRateMapDescriptor :: setScreenSize ( MTL :: Size screenSize ) 307{ 308Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setScreenSize_ ) , screenSize ) ; 309} 310 311// property: label 312_MTL_INLINE NS :: String * MTL :: RasterizationRateMapDescriptor :: label () const 313{ 314return Object :: sendMessage < NS :: String *> ( this , _MTL_PRIVATE_SEL ( label )) ; 315} 316 317_MTL_INLINE void MTL :: RasterizationRateMapDescriptor :: setLabel ( const NS :: String * label ) 318{ 319Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( setLabel_ ) , label ) ; 320} 321 322// property: layerCount 323_MTL_INLINE NS :: UInteger MTL :: RasterizationRateMapDescriptor :: layerCount () const 324{ 325return Object :: sendMessage < NS :: UInteger > ( this , _MTL_PRIVATE_SEL ( layerCount )) ; 326} 327 328// property: device 329_MTL_INLINE MTL :: Device * MTL :: RasterizationRateMap :: device () const 330{ 331return Object :: sendMessage < MTL :: Device *> ( this , _MTL_PRIVATE_SEL ( device )) ; 332} 333 334// property: label 335_MTL_INLINE NS :: String * MTL :: RasterizationRateMap :: label () const 336{ 337return Object :: sendMessage < NS :: String *> ( this , _MTL_PRIVATE_SEL ( label )) ; 338} 339 340// property: screenSize 341_MTL_INLINE MTL :: Size MTL :: RasterizationRateMap :: screenSize () const 342{ 343return Object :: sendMessage < MTL :: Size > ( this , _MTL_PRIVATE_SEL ( screenSize )) ; 344} 345 346// property: physicalGranularity 347_MTL_INLINE MTL :: Size MTL :: RasterizationRateMap :: physicalGranularity () const 348{ 349return Object :: sendMessage < MTL :: Size > ( this , _MTL_PRIVATE_SEL ( physicalGranularity )) ; 350} 351 352// property: layerCount 353_MTL_INLINE NS :: UInteger MTL :: RasterizationRateMap :: layerCount () const 354{ 355return Object :: sendMessage < NS :: UInteger > ( this , _MTL_PRIVATE_SEL ( layerCount )) ; 356} 357 358// property: parameterBufferSizeAndAlign 359_MTL_INLINE MTL :: SizeAndAlign MTL :: RasterizationRateMap :: parameterBufferSizeAndAlign () const 360{ 361return Object :: sendMessage < MTL :: SizeAndAlign > ( this , _MTL_PRIVATE_SEL ( parameterBufferSizeAndAlign )) ; 362} 363 364// method: copyParameterDataToBuffer:offset: 365_MTL_INLINE void MTL :: RasterizationRateMap :: copyParameterDataToBuffer ( const MTL :: Buffer * buffer , NS :: UInteger offset ) 366{ 367Object :: sendMessage < void > ( this , _MTL_PRIVATE_SEL ( copyParameterDataToBuffer_offset_ ) , buffer , offset ) ; 368} 369 370// method: physicalSizeForLayer: 371_MTL_INLINE MTL :: Size MTL :: RasterizationRateMap :: physicalSize ( NS :: UInteger layerIndex ) 372{ 373return Object :: sendMessage < MTL :: Size > ( this , _MTL_PRIVATE_SEL ( physicalSizeForLayer_ ) , layerIndex ) ; 374} 375 376// method: mapScreenToPhysicalCoordinates:forLayer: 377_MTL_INLINE MTL :: Coordinate2D MTL :: RasterizationRateMap :: mapScreenToPhysicalCoordinates ( MTL :: Coordinate2D screenCoordinates , NS :: UInteger layerIndex ) 378{ 379return Object :: sendMessage < MTL :: Coordinate2D > ( this , _MTL_PRIVATE_SEL ( mapScreenToPhysicalCoordinates_forLayer_ ) , screenCoordinates , layerIndex ) ; 380} 381 382// method: mapPhysicalToScreenCoordinates:forLayer: 383_MTL_INLINE MTL :: Coordinate2D MTL :: RasterizationRateMap :: mapPhysicalToScreenCoordinates ( MTL :: Coordinate2D physicalCoordinates , NS :: UInteger layerIndex ) 384{ 385return Object :: sendMessage < MTL :: Coordinate2D > ( this , _MTL_PRIVATE_SEL ( mapPhysicalToScreenCoordinates_forLayer_ ) , physicalCoordinates , layerIndex ) ; 386}