/ include / Metal / MTLDevice.hpp
MTLDevice.hpp
   1  //-------------------------------------------------------------------------------------------------------------------------------------------------------------
   2  //
   3  // Metal/MTLDevice.hpp
   4  //
   5  // Copyright 2020-2024 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 "MTLArgument.hpp"
  30  #include "MTLDevice.hpp"
  31  #include "MTLPixelFormat.hpp"
  32  #include "MTLResource.hpp"
  33  #include "MTLTexture.hpp"
  34  #include "MTLTypes.hpp"
  35  #include <IOSurface/IOSurfaceRef.h>
  36  #include <functional>
  37  
  38  namespace MTL
  39  {
  40  _MTL_ENUM(NS::Integer, IOCompressionMethod) {
  41      IOCompressionMethodZlib = 0,
  42      IOCompressionMethodLZFSE = 1,
  43      IOCompressionMethodLZ4 = 2,
  44      IOCompressionMethodLZMA = 3,
  45      IOCompressionMethodLZBitmap = 4,
  46  };
  47  
  48  _MTL_ENUM(NS::UInteger, FeatureSet) {
  49      FeatureSet_iOS_GPUFamily1_v1 = 0,
  50      FeatureSet_iOS_GPUFamily2_v1 = 1,
  51      FeatureSet_iOS_GPUFamily1_v2 = 2,
  52      FeatureSet_iOS_GPUFamily2_v2 = 3,
  53      FeatureSet_iOS_GPUFamily3_v1 = 4,
  54      FeatureSet_iOS_GPUFamily1_v3 = 5,
  55      FeatureSet_iOS_GPUFamily2_v3 = 6,
  56      FeatureSet_iOS_GPUFamily3_v2 = 7,
  57      FeatureSet_iOS_GPUFamily1_v4 = 8,
  58      FeatureSet_iOS_GPUFamily2_v4 = 9,
  59      FeatureSet_iOS_GPUFamily3_v3 = 10,
  60      FeatureSet_iOS_GPUFamily4_v1 = 11,
  61      FeatureSet_iOS_GPUFamily1_v5 = 12,
  62      FeatureSet_iOS_GPUFamily2_v5 = 13,
  63      FeatureSet_iOS_GPUFamily3_v4 = 14,
  64      FeatureSet_iOS_GPUFamily4_v2 = 15,
  65      FeatureSet_iOS_GPUFamily5_v1 = 16,
  66      FeatureSet_macOS_GPUFamily1_v1 = 10000,
  67      FeatureSet_OSX_GPUFamily1_v1 = 10000,
  68      FeatureSet_macOS_GPUFamily1_v2 = 10001,
  69      FeatureSet_OSX_GPUFamily1_v2 = 10001,
  70      FeatureSet_macOS_ReadWriteTextureTier2 = 10002,
  71      FeatureSet_OSX_ReadWriteTextureTier2 = 10002,
  72      FeatureSet_macOS_GPUFamily1_v3 = 10003,
  73      FeatureSet_macOS_GPUFamily1_v4 = 10004,
  74      FeatureSet_macOS_GPUFamily2_v1 = 10005,
  75      FeatureSet_watchOS_GPUFamily1_v1 = 20000,
  76      FeatureSet_WatchOS_GPUFamily1_v1 = 20000,
  77      FeatureSet_watchOS_GPUFamily2_v1 = 20001,
  78      FeatureSet_WatchOS_GPUFamily2_v1 = 20001,
  79      FeatureSet_tvOS_GPUFamily1_v1 = 30000,
  80      FeatureSet_TVOS_GPUFamily1_v1 = 30000,
  81      FeatureSet_tvOS_GPUFamily1_v2 = 30001,
  82      FeatureSet_tvOS_GPUFamily1_v3 = 30002,
  83      FeatureSet_tvOS_GPUFamily2_v1 = 30003,
  84      FeatureSet_tvOS_GPUFamily1_v4 = 30004,
  85      FeatureSet_tvOS_GPUFamily2_v2 = 30005,
  86  };
  87  
  88  _MTL_ENUM(NS::Integer, GPUFamily) {
  89      GPUFamilyApple1 = 1001,
  90      GPUFamilyApple2 = 1002,
  91      GPUFamilyApple3 = 1003,
  92      GPUFamilyApple4 = 1004,
  93      GPUFamilyApple5 = 1005,
  94      GPUFamilyApple6 = 1006,
  95      GPUFamilyApple7 = 1007,
  96      GPUFamilyApple8 = 1008,
  97      GPUFamilyApple9 = 1009,
  98      GPUFamilyMac1 = 2001,
  99      GPUFamilyMac2 = 2002,
 100      GPUFamilyCommon1 = 3001,
 101      GPUFamilyCommon2 = 3002,
 102      GPUFamilyCommon3 = 3003,
 103      GPUFamilyMacCatalyst1 = 4001,
 104      GPUFamilyMacCatalyst2 = 4002,
 105      GPUFamilyMetal3 = 5001,
 106  };
 107  
 108  _MTL_ENUM(NS::UInteger, DeviceLocation) {
 109      DeviceLocationBuiltIn = 0,
 110      DeviceLocationSlot = 1,
 111      DeviceLocationExternal = 2,
 112      DeviceLocationUnspecified = NS::UIntegerMax,
 113  };
 114  
 115  _MTL_OPTIONS(NS::UInteger, PipelineOption) {
 116      PipelineOptionNone = 0,
 117      PipelineOptionArgumentInfo = 1,
 118      PipelineOptionBindingInfo = 1,
 119      PipelineOptionBufferTypeInfo = 2,
 120      PipelineOptionFailOnBinaryArchiveMiss = 4,
 121  };
 122  
 123  _MTL_ENUM(NS::UInteger, ReadWriteTextureTier) {
 124      ReadWriteTextureTierNone = 0,
 125      ReadWriteTextureTier1 = 1,
 126      ReadWriteTextureTier2 = 2,
 127  };
 128  
 129  _MTL_ENUM(NS::UInteger, ArgumentBuffersTier) {
 130      ArgumentBuffersTier1 = 0,
 131      ArgumentBuffersTier2 = 1,
 132  };
 133  
 134  _MTL_ENUM(NS::UInteger, SparseTextureRegionAlignmentMode) {
 135      SparseTextureRegionAlignmentModeOutward = 0,
 136      SparseTextureRegionAlignmentModeInward = 1,
 137  };
 138  
 139  _MTL_ENUM(NS::Integer, SparsePageSize) {
 140      SparsePageSize16 = 101,
 141      SparsePageSize64 = 102,
 142      SparsePageSize256 = 103,
 143  };
 144  
 145  struct AccelerationStructureSizes
 146  {
 147      NS::UInteger accelerationStructureSize;
 148      NS::UInteger buildScratchBufferSize;
 149      NS::UInteger refitScratchBufferSize;
 150  } _MTL_PACKED;
 151  
 152  _MTL_ENUM(NS::UInteger, CounterSamplingPoint) {
 153      CounterSamplingPointAtStageBoundary = 0,
 154      CounterSamplingPointAtDrawBoundary = 1,
 155      CounterSamplingPointAtDispatchBoundary = 2,
 156      CounterSamplingPointAtTileDispatchBoundary = 3,
 157      CounterSamplingPointAtBlitBoundary = 4,
 158  };
 159  
 160  struct SizeAndAlign
 161  {
 162      NS::UInteger size;
 163      NS::UInteger align;
 164  } _MTL_PACKED;
 165  
 166  class ArgumentDescriptor : public NS::Copying<ArgumentDescriptor>
 167  {
 168  public:
 169      static class ArgumentDescriptor* alloc();
 170  
 171      class ArgumentDescriptor*        init();
 172  
 173      static class ArgumentDescriptor* argumentDescriptor();
 174  
 175      MTL::DataType                    dataType() const;
 176      void                             setDataType(MTL::DataType dataType);
 177  
 178      NS::UInteger                     index() const;
 179      void                             setIndex(NS::UInteger index);
 180  
 181      NS::UInteger                     arrayLength() const;
 182      void                             setArrayLength(NS::UInteger arrayLength);
 183  
 184      MTL::BindingAccess               access() const;
 185      void                             setAccess(MTL::BindingAccess access);
 186  
 187      MTL::TextureType                 textureType() const;
 188      void                             setTextureType(MTL::TextureType textureType);
 189  
 190      NS::UInteger                     constantBlockAlignment() const;
 191      void                             setConstantBlockAlignment(NS::UInteger constantBlockAlignment);
 192  };
 193  
 194  class Architecture : public NS::Copying<Architecture>
 195  {
 196  public:
 197      static class Architecture* alloc();
 198  
 199      class Architecture*        init();
 200  
 201      NS::String*                name() const;
 202  };
 203  
 204  using DeviceNotificationName = NS::String*;
 205  _MTL_CONST(DeviceNotificationName, DeviceWasAddedNotification);
 206  _MTL_CONST(DeviceNotificationName, DeviceRemovalRequestedNotification);
 207  _MTL_CONST(DeviceNotificationName, DeviceWasRemovedNotification);
 208  _MTL_CONST(NS::ErrorUserInfoKey, CommandBufferEncoderInfoErrorKey);
 209  
 210  using DeviceNotificationHandlerBlock = void (^)(class Device* pDevice, DeviceNotificationName notifyName);
 211  
 212  using DeviceNotificationHandlerFunction = std::function<void(class Device* pDevice, DeviceNotificationName notifyName)>;
 213  
 214  using AutoreleasedComputePipelineReflection = class ComputePipelineReflection*;
 215  
 216  using AutoreleasedRenderPipelineReflection = class RenderPipelineReflection*;
 217  
 218  using NewLibraryCompletionHandler = void (^)(class Library*, NS::Error*);
 219  
 220  using NewLibraryCompletionHandlerFunction = std::function<void(class Library*, NS::Error*)>;
 221  
 222  using NewRenderPipelineStateCompletionHandler = void (^)(class RenderPipelineState*, NS::Error*);
 223  
 224  using NewRenderPipelineStateCompletionHandlerFunction = std::function<void(class RenderPipelineState*, NS::Error*)>;
 225  
 226  using NewRenderPipelineStateWithReflectionCompletionHandler = void (^)(class RenderPipelineState*, class RenderPipelineReflection*, NS::Error*);
 227  
 228  using NewRenderPipelineStateWithReflectionCompletionHandlerFunction = std::function<void(class RenderPipelineState*, class RenderPipelineReflection*, NS::Error*)>;
 229  
 230  using NewComputePipelineStateCompletionHandler = void (^)(class ComputePipelineState*, NS::Error*);
 231  
 232  using NewComputePipelineStateCompletionHandlerFunction = std::function<void(class ComputePipelineState*, NS::Error*)>;
 233  
 234  using NewComputePipelineStateWithReflectionCompletionHandler = void (^)(class ComputePipelineState*, class ComputePipelineReflection*, NS::Error*);
 235  
 236  using NewComputePipelineStateWithReflectionCompletionHandlerFunction = std::function<void(class ComputePipelineState*, class ComputePipelineReflection*, NS::Error*)>;
 237  
 238  using Timestamp = std::uint64_t;
 239  
 240  MTL::Device* CreateSystemDefaultDevice();
 241  
 242  NS::Array*   CopyAllDevices();
 243  
 244  NS::Array*   CopyAllDevicesWithObserver(NS::Object** pOutObserver, DeviceNotificationHandlerBlock handler);
 245  
 246  NS::Array*   CopyAllDevicesWithObserver(NS::Object** pOutObserver, const DeviceNotificationHandlerFunction& handler);
 247  
 248  void         RemoveDeviceObserver(const NS::Object* pObserver);
 249  
 250  class Device : public NS::Referencing<Device>
 251  {
 252  public:
 253      void                            newLibrary(const NS::String* pSource, const class CompileOptions* pOptions, const NewLibraryCompletionHandlerFunction& completionHandler);
 254  
 255      void                            newLibrary(const class StitchedLibraryDescriptor* pDescriptor, const MTL::NewLibraryCompletionHandlerFunction& completionHandler);
 256  
 257      void                            newRenderPipelineState(const class RenderPipelineDescriptor* pDescriptor, const NewRenderPipelineStateCompletionHandlerFunction& completionHandler);
 258  
 259      void                            newRenderPipelineState(const class RenderPipelineDescriptor* pDescriptor, PipelineOption options, const NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler);
 260  
 261      void                            newRenderPipelineState(const class TileRenderPipelineDescriptor* pDescriptor, PipelineOption options, const NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler);
 262  
 263      void                            newComputePipelineState(const class Function* pFunction, const NewComputePipelineStateCompletionHandlerFunction& completionHandler);
 264  
 265      void                            newComputePipelineState(const class Function* pFunction, PipelineOption options, const NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler);
 266  
 267      void                            newComputePipelineState(const class ComputePipelineDescriptor* pDescriptor, PipelineOption options, const NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler);
 268  
 269      bool                            isHeadless() const;
 270  
 271      NS::String*                     name() const;
 272  
 273      uint64_t                        registryID() const;
 274  
 275      class Architecture*             architecture() const;
 276  
 277      MTL::Size                       maxThreadsPerThreadgroup() const;
 278  
 279      bool                            lowPower() const;
 280  
 281      bool                            headless() const;
 282  
 283      bool                            removable() const;
 284  
 285      bool                            hasUnifiedMemory() const;
 286  
 287      uint64_t                        recommendedMaxWorkingSetSize() const;
 288  
 289      MTL::DeviceLocation             location() const;
 290  
 291      NS::UInteger                    locationNumber() const;
 292  
 293      uint64_t                        maxTransferRate() const;
 294  
 295      bool                            depth24Stencil8PixelFormatSupported() const;
 296  
 297      MTL::ReadWriteTextureTier       readWriteTextureSupport() const;
 298  
 299      MTL::ArgumentBuffersTier        argumentBuffersSupport() const;
 300  
 301      bool                            rasterOrderGroupsSupported() const;
 302  
 303      bool                            supports32BitFloatFiltering() const;
 304  
 305      bool                            supports32BitMSAA() const;
 306  
 307      bool                            supportsQueryTextureLOD() const;
 308  
 309      bool                            supportsBCTextureCompression() const;
 310  
 311      bool                            supportsPullModelInterpolation() const;
 312  
 313      bool                            barycentricCoordsSupported() const;
 314  
 315      bool                            supportsShaderBarycentricCoordinates() const;
 316  
 317      NS::UInteger                    currentAllocatedSize() const;
 318  
 319      class LogState*                 newLogState(const class LogStateDescriptor* descriptor, NS::Error** error);
 320  
 321      class CommandQueue*             newCommandQueue();
 322  
 323      class CommandQueue*             newCommandQueue(NS::UInteger maxCommandBufferCount);
 324  
 325      class CommandQueue*             newCommandQueue(const class CommandQueueDescriptor* descriptor);
 326  
 327      MTL::SizeAndAlign               heapTextureSizeAndAlign(const class TextureDescriptor* desc);
 328  
 329      MTL::SizeAndAlign               heapBufferSizeAndAlign(NS::UInteger length, MTL::ResourceOptions options);
 330  
 331      class Heap*                     newHeap(const class HeapDescriptor* descriptor);
 332  
 333      class Buffer*                   newBuffer(NS::UInteger length, MTL::ResourceOptions options);
 334  
 335      class Buffer*                   newBuffer(const void* pointer, NS::UInteger length, MTL::ResourceOptions options);
 336  
 337      class Buffer*                   newBuffer(const void* pointer, NS::UInteger length, MTL::ResourceOptions options, void (^deallocator)(void*, NS::UInteger));
 338  
 339      class DepthStencilState*        newDepthStencilState(const class DepthStencilDescriptor* descriptor);
 340  
 341      class Texture*                  newTexture(const class TextureDescriptor* descriptor);
 342  
 343      class Texture*                  newTexture(const class TextureDescriptor* descriptor, const IOSurfaceRef iosurface, NS::UInteger plane);
 344  
 345      class Texture*                  newSharedTexture(const class TextureDescriptor* descriptor);
 346  
 347      class Texture*                  newSharedTexture(const class SharedTextureHandle* sharedHandle);
 348  
 349      class SamplerState*             newSamplerState(const class SamplerDescriptor* descriptor);
 350  
 351      class Library*                  newDefaultLibrary();
 352  
 353      class Library*                  newDefaultLibrary(const NS::Bundle* bundle, NS::Error** error);
 354  
 355      class Library*                  newLibrary(const NS::String* filepath, NS::Error** error);
 356  
 357      class Library*                  newLibrary(const NS::URL* url, NS::Error** error);
 358  
 359      class Library*                  newLibrary(const dispatch_data_t data, NS::Error** error);
 360  
 361      class Library*                  newLibrary(const NS::String* source, const class CompileOptions* options, NS::Error** error);
 362  
 363      void                            newLibrary(const NS::String* source, const class CompileOptions* options, const MTL::NewLibraryCompletionHandler completionHandler);
 364  
 365      class Library*                  newLibrary(const class StitchedLibraryDescriptor* descriptor, NS::Error** error);
 366  
 367      void                            newLibrary(const class StitchedLibraryDescriptor* descriptor, const MTL::NewLibraryCompletionHandler completionHandler);
 368  
 369      class RenderPipelineState*      newRenderPipelineState(const class RenderPipelineDescriptor* descriptor, NS::Error** error);
 370  
 371      class RenderPipelineState*      newRenderPipelineState(const class RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error);
 372  
 373      void                            newRenderPipelineState(const class RenderPipelineDescriptor* descriptor, const MTL::NewRenderPipelineStateCompletionHandler completionHandler);
 374  
 375      void                            newRenderPipelineState(const class RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler);
 376  
 377      class ComputePipelineState*     newComputePipelineState(const class Function* computeFunction, NS::Error** error);
 378  
 379      class ComputePipelineState*     newComputePipelineState(const class Function* computeFunction, MTL::PipelineOption options, const MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error);
 380  
 381      void                            newComputePipelineState(const class Function* computeFunction, const MTL::NewComputePipelineStateCompletionHandler completionHandler);
 382  
 383      void                            newComputePipelineState(const class Function* computeFunction, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler);
 384  
 385      class ComputePipelineState*     newComputePipelineState(const class ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error);
 386  
 387      void                            newComputePipelineState(const class ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler);
 388  
 389      class Fence*                    newFence();
 390  
 391      bool                            supportsFeatureSet(MTL::FeatureSet featureSet);
 392  
 393      bool                            supportsFamily(MTL::GPUFamily gpuFamily);
 394  
 395      bool                            supportsTextureSampleCount(NS::UInteger sampleCount);
 396  
 397      NS::UInteger                    minimumLinearTextureAlignmentForPixelFormat(MTL::PixelFormat format);
 398  
 399      NS::UInteger                    minimumTextureBufferAlignmentForPixelFormat(MTL::PixelFormat format);
 400  
 401      class RenderPipelineState*      newRenderPipelineState(const class TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error);
 402  
 403      void                            newRenderPipelineState(const class TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler);
 404  
 405      class RenderPipelineState*      newRenderPipelineState(const class MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error);
 406  
 407      void                            newRenderPipelineState(const class MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler);
 408  
 409      NS::UInteger                    maxThreadgroupMemoryLength() const;
 410  
 411      NS::UInteger                    maxArgumentBufferSamplerCount() const;
 412  
 413      bool                            programmableSamplePositionsSupported() const;
 414  
 415      void                            getDefaultSamplePositions(MTL::SamplePosition* positions, NS::UInteger count);
 416  
 417      class ArgumentEncoder*          newArgumentEncoder(const NS::Array* arguments);
 418  
 419      bool                            supportsRasterizationRateMap(NS::UInteger layerCount);
 420  
 421      class RasterizationRateMap*     newRasterizationRateMap(const class RasterizationRateMapDescriptor* descriptor);
 422  
 423      class IndirectCommandBuffer*    newIndirectCommandBuffer(const class IndirectCommandBufferDescriptor* descriptor, NS::UInteger maxCount, MTL::ResourceOptions options);
 424  
 425      class Event*                    newEvent();
 426  
 427      class SharedEvent*              newSharedEvent();
 428  
 429      class SharedEvent*              newSharedEvent(const class SharedEventHandle* sharedEventHandle);
 430  
 431      uint64_t                        peerGroupID() const;
 432  
 433      uint32_t                        peerIndex() const;
 434  
 435      uint32_t                        peerCount() const;
 436  
 437      class IOFileHandle*             newIOHandle(const NS::URL* url, NS::Error** error);
 438  
 439      class IOCommandQueue*           newIOCommandQueue(const class IOCommandQueueDescriptor* descriptor, NS::Error** error);
 440  
 441      class IOFileHandle*             newIOHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error);
 442  
 443      class IOFileHandle*             newIOFileHandle(const NS::URL* url, NS::Error** error);
 444  
 445      class IOFileHandle*             newIOFileHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error);
 446  
 447      MTL::Size                       sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount);
 448  
 449      NS::UInteger                    sparseTileSizeInBytes() const;
 450  
 451      void                            convertSparsePixelRegions(const MTL::Region* pixelRegions, MTL::Region* tileRegions, MTL::Size tileSize, MTL::SparseTextureRegionAlignmentMode mode, NS::UInteger numRegions);
 452  
 453      void                            convertSparseTileRegions(const MTL::Region* tileRegions, MTL::Region* pixelRegions, MTL::Size tileSize, NS::UInteger numRegions);
 454  
 455      NS::UInteger                    sparseTileSizeInBytes(MTL::SparsePageSize sparsePageSize);
 456  
 457      MTL::Size                       sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount, MTL::SparsePageSize sparsePageSize);
 458  
 459      NS::UInteger                    maxBufferLength() const;
 460  
 461      NS::Array*                      counterSets() const;
 462  
 463      class CounterSampleBuffer*      newCounterSampleBuffer(const class CounterSampleBufferDescriptor* descriptor, NS::Error** error);
 464  
 465      void                            sampleTimestamps(MTL::Timestamp* cpuTimestamp, MTL::Timestamp* gpuTimestamp);
 466  
 467      class ArgumentEncoder*          newArgumentEncoder(const class BufferBinding* bufferBinding);
 468  
 469      bool                            supportsCounterSampling(MTL::CounterSamplingPoint samplingPoint);
 470  
 471      bool                            supportsVertexAmplificationCount(NS::UInteger count);
 472  
 473      bool                            supportsDynamicLibraries() const;
 474  
 475      bool                            supportsRenderDynamicLibraries() const;
 476  
 477      class DynamicLibrary*           newDynamicLibrary(const class Library* library, NS::Error** error);
 478  
 479      class DynamicLibrary*           newDynamicLibrary(const NS::URL* url, NS::Error** error);
 480  
 481      class BinaryArchive*            newBinaryArchive(const class BinaryArchiveDescriptor* descriptor, NS::Error** error);
 482  
 483      bool                            supportsRaytracing() const;
 484  
 485      MTL::AccelerationStructureSizes accelerationStructureSizes(const class AccelerationStructureDescriptor* descriptor);
 486  
 487      class AccelerationStructure*    newAccelerationStructure(NS::UInteger size);
 488  
 489      class AccelerationStructure*    newAccelerationStructure(const class AccelerationStructureDescriptor* descriptor);
 490  
 491      MTL::SizeAndAlign               heapAccelerationStructureSizeAndAlign(NS::UInteger size);
 492  
 493      MTL::SizeAndAlign               heapAccelerationStructureSizeAndAlign(const class AccelerationStructureDescriptor* descriptor);
 494  
 495      bool                            supportsFunctionPointers() const;
 496  
 497      bool                            supportsFunctionPointersFromRender() const;
 498  
 499      bool                            supportsRaytracingFromRender() const;
 500  
 501      bool                            supportsPrimitiveMotionBlur() const;
 502  
 503      bool                            shouldMaximizeConcurrentCompilation() const;
 504      void                            setShouldMaximizeConcurrentCompilation(bool shouldMaximizeConcurrentCompilation);
 505  
 506      NS::UInteger                    maximumConcurrentCompilationTaskCount() const;
 507  
 508      class ResidencySet*             newResidencySet(const class ResidencySetDescriptor* desc, NS::Error** error);
 509  };
 510  
 511  }
 512  
 513  // static method: alloc
 514  _MTL_INLINE MTL::ArgumentDescriptor* MTL::ArgumentDescriptor::alloc()
 515  {
 516      return NS::Object::alloc<MTL::ArgumentDescriptor>(_MTL_PRIVATE_CLS(MTLArgumentDescriptor));
 517  }
 518  
 519  // method: init
 520  _MTL_INLINE MTL::ArgumentDescriptor* MTL::ArgumentDescriptor::init()
 521  {
 522      return NS::Object::init<MTL::ArgumentDescriptor>();
 523  }
 524  
 525  // static method: argumentDescriptor
 526  _MTL_INLINE MTL::ArgumentDescriptor* MTL::ArgumentDescriptor::argumentDescriptor()
 527  {
 528      return Object::sendMessage<MTL::ArgumentDescriptor*>(_MTL_PRIVATE_CLS(MTLArgumentDescriptor), _MTL_PRIVATE_SEL(argumentDescriptor));
 529  }
 530  
 531  // property: dataType
 532  _MTL_INLINE MTL::DataType MTL::ArgumentDescriptor::dataType() const
 533  {
 534      return Object::sendMessage<MTL::DataType>(this, _MTL_PRIVATE_SEL(dataType));
 535  }
 536  
 537  _MTL_INLINE void MTL::ArgumentDescriptor::setDataType(MTL::DataType dataType)
 538  {
 539      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setDataType_), dataType);
 540  }
 541  
 542  // property: index
 543  _MTL_INLINE NS::UInteger MTL::ArgumentDescriptor::index() const
 544  {
 545      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(index));
 546  }
 547  
 548  _MTL_INLINE void MTL::ArgumentDescriptor::setIndex(NS::UInteger index)
 549  {
 550      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setIndex_), index);
 551  }
 552  
 553  // property: arrayLength
 554  _MTL_INLINE NS::UInteger MTL::ArgumentDescriptor::arrayLength() const
 555  {
 556      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(arrayLength));
 557  }
 558  
 559  _MTL_INLINE void MTL::ArgumentDescriptor::setArrayLength(NS::UInteger arrayLength)
 560  {
 561      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setArrayLength_), arrayLength);
 562  }
 563  
 564  // property: access
 565  _MTL_INLINE MTL::BindingAccess MTL::ArgumentDescriptor::access() const
 566  {
 567      return Object::sendMessage<MTL::BindingAccess>(this, _MTL_PRIVATE_SEL(access));
 568  }
 569  
 570  _MTL_INLINE void MTL::ArgumentDescriptor::setAccess(MTL::BindingAccess access)
 571  {
 572      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setAccess_), access);
 573  }
 574  
 575  // property: textureType
 576  _MTL_INLINE MTL::TextureType MTL::ArgumentDescriptor::textureType() const
 577  {
 578      return Object::sendMessage<MTL::TextureType>(this, _MTL_PRIVATE_SEL(textureType));
 579  }
 580  
 581  _MTL_INLINE void MTL::ArgumentDescriptor::setTextureType(MTL::TextureType textureType)
 582  {
 583      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setTextureType_), textureType);
 584  }
 585  
 586  // property: constantBlockAlignment
 587  _MTL_INLINE NS::UInteger MTL::ArgumentDescriptor::constantBlockAlignment() const
 588  {
 589      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(constantBlockAlignment));
 590  }
 591  
 592  _MTL_INLINE void MTL::ArgumentDescriptor::setConstantBlockAlignment(NS::UInteger constantBlockAlignment)
 593  {
 594      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setConstantBlockAlignment_), constantBlockAlignment);
 595  }
 596  
 597  // static method: alloc
 598  _MTL_INLINE MTL::Architecture* MTL::Architecture::alloc()
 599  {
 600      return NS::Object::alloc<MTL::Architecture>(_MTL_PRIVATE_CLS(MTLArchitecture));
 601  }
 602  
 603  // method: init
 604  _MTL_INLINE MTL::Architecture* MTL::Architecture::init()
 605  {
 606      return NS::Object::init<MTL::Architecture>();
 607  }
 608  
 609  // property: name
 610  _MTL_INLINE NS::String* MTL::Architecture::name() const
 611  {
 612      return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
 613  }
 614  
 615  _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceWasAddedNotification);
 616  _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceRemovalRequestedNotification);
 617  _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceWasRemovedNotification);
 618  _MTL_PRIVATE_DEF_CONST(NS::ErrorUserInfoKey, CommandBufferEncoderInfoErrorKey);
 619  
 620  #if defined(MTL_PRIVATE_IMPLEMENTATION)
 621  
 622  extern "C" MTL::Device* MTLCreateSystemDefaultDevice();
 623  
 624  extern "C" NS::Array*   MTLCopyAllDevices();
 625  
 626  extern "C" NS::Array*   MTLCopyAllDevicesWithObserver(NS::Object**, MTL::DeviceNotificationHandlerBlock);
 627  
 628  extern "C" void         MTLRemoveDeviceObserver(const NS::Object*);
 629  
 630  #include <TargetConditionals.h>
 631  
 632  _NS_EXPORT MTL::Device* MTL::CreateSystemDefaultDevice()
 633  {
 634      return ::MTLCreateSystemDefaultDevice();
 635  }
 636  
 637  _NS_EXPORT NS::Array* MTL::CopyAllDevices()
 638  {
 639  #if (defined __IPHONE_18) || (defined __MAC_10_11)
 640      return ::MTLCopyAllDevices();
 641  #else
 642      return nullptr;
 643  #endif // __IPHONE_18
 644  }
 645  
 646  _NS_EXPORT NS::Array* MTL::CopyAllDevicesWithObserver(NS::Object** pOutObserver, DeviceNotificationHandlerBlock handler)
 647  {
 648  #if TARGET_OS_OSX
 649      return ::MTLCopyAllDevicesWithObserver(pOutObserver, handler);
 650  #else
 651      (void)pOutObserver;
 652      (void)handler;
 653  
 654      return nullptr;
 655  #endif // TARGET_OS_OSX
 656  }
 657  
 658  _NS_EXPORT NS::Array* MTL::CopyAllDevicesWithObserver(NS::Object** pOutObserver, const DeviceNotificationHandlerFunction& handler)
 659  {
 660      __block DeviceNotificationHandlerFunction function = handler;
 661  
 662      return CopyAllDevicesWithObserver(pOutObserver, ^(Device* pDevice, DeviceNotificationName pNotificationName) { function(pDevice, pNotificationName); });
 663  }
 664  
 665  _NS_EXPORT void MTL::RemoveDeviceObserver(const NS::Object* pObserver)
 666  {
 667      (void)pObserver;
 668  #if TARGET_OS_OSX
 669      ::MTLRemoveDeviceObserver(pObserver);
 670  #endif // TARGET_OS_OSX
 671  }
 672  
 673  #endif // MTL_PRIVATE_IMPLEMENTATION
 674  
 675  _MTL_INLINE void MTL::Device::newLibrary(const NS::String* pSource, const CompileOptions* pOptions, const NewLibraryCompletionHandlerFunction& completionHandler)
 676  {
 677      __block NewLibraryCompletionHandlerFunction blockCompletionHandler = completionHandler;
 678  
 679      newLibrary(pSource, pOptions, ^(Library* pLibrary, NS::Error* pError) { blockCompletionHandler(pLibrary, pError); });
 680  }
 681  
 682  _MTL_INLINE void MTL::Device::newLibrary(const class StitchedLibraryDescriptor* pDescriptor, const MTL::NewLibraryCompletionHandlerFunction& completionHandler)
 683  {
 684      __block NewLibraryCompletionHandlerFunction blockCompletionHandler = completionHandler;
 685  
 686      newLibrary(pDescriptor, ^(Library* pLibrary, NS::Error* pError) { blockCompletionHandler(pLibrary, pError); });
 687  }
 688  
 689  _MTL_INLINE void MTL::Device::newRenderPipelineState(const RenderPipelineDescriptor* pDescriptor, const NewRenderPipelineStateCompletionHandlerFunction& completionHandler)
 690  {
 691      __block NewRenderPipelineStateCompletionHandlerFunction blockCompletionHandler = completionHandler;
 692  
 693      newRenderPipelineState(pDescriptor, ^(RenderPipelineState* pPipelineState, NS::Error* pError) { blockCompletionHandler(pPipelineState, pError); });
 694  }
 695  
 696  _MTL_INLINE void MTL::Device::newRenderPipelineState(const RenderPipelineDescriptor* pDescriptor, PipelineOption options, const NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler)
 697  {
 698      __block NewRenderPipelineStateWithReflectionCompletionHandlerFunction blockCompletionHandler = completionHandler;
 699  
 700      newRenderPipelineState(pDescriptor, options, ^(RenderPipelineState* pPipelineState, class RenderPipelineReflection* pReflection, NS::Error* pError) { blockCompletionHandler(pPipelineState, pReflection, pError); });
 701  }
 702  
 703  _MTL_INLINE void MTL::Device::newRenderPipelineState(const TileRenderPipelineDescriptor* pDescriptor, PipelineOption options, const NewRenderPipelineStateWithReflectionCompletionHandlerFunction& completionHandler)
 704  {
 705      __block NewRenderPipelineStateWithReflectionCompletionHandlerFunction blockCompletionHandler = completionHandler;
 706  
 707      newRenderPipelineState(pDescriptor, options, ^(RenderPipelineState* pPipelineState, class RenderPipelineReflection* pReflection, NS::Error* pError) { blockCompletionHandler(pPipelineState, pReflection, pError); });
 708  }
 709  
 710  _MTL_INLINE void MTL::Device::newComputePipelineState(const class Function* pFunction, const NewComputePipelineStateCompletionHandlerFunction& completionHandler)
 711  {
 712      __block NewComputePipelineStateCompletionHandlerFunction blockCompletionHandler = completionHandler;
 713  
 714      newComputePipelineState(pFunction, ^(ComputePipelineState* pPipelineState, NS::Error* pError) { blockCompletionHandler(pPipelineState, pError); });
 715  }
 716  
 717  _MTL_INLINE void MTL::Device::newComputePipelineState(const Function* pFunction, PipelineOption options, const NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler)
 718  {
 719      __block NewComputePipelineStateWithReflectionCompletionHandlerFunction blockCompletionHandler = completionHandler;
 720  
 721      newComputePipelineState(pFunction, options, ^(ComputePipelineState* pPipelineState, ComputePipelineReflection* pReflection, NS::Error* pError) { blockCompletionHandler(pPipelineState, pReflection, pError); });
 722  }
 723  
 724  _MTL_INLINE void MTL::Device::newComputePipelineState(const ComputePipelineDescriptor* pDescriptor, PipelineOption options, const NewComputePipelineStateWithReflectionCompletionHandlerFunction& completionHandler)
 725  {
 726      __block NewComputePipelineStateWithReflectionCompletionHandlerFunction blockCompletionHandler = completionHandler;
 727  
 728      newComputePipelineState(pDescriptor, options, ^(ComputePipelineState* pPipelineState, ComputePipelineReflection* pReflection, NS::Error* pError) { blockCompletionHandler(pPipelineState, pReflection, pError); });
 729  }
 730  
 731  _MTL_INLINE bool MTL::Device::isHeadless() const
 732  {
 733      return headless();
 734  }
 735  
 736  // property: name
 737  _MTL_INLINE NS::String* MTL::Device::name() const
 738  {
 739      return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
 740  }
 741  
 742  // property: registryID
 743  _MTL_INLINE uint64_t MTL::Device::registryID() const
 744  {
 745      return Object::sendMessage<uint64_t>(this, _MTL_PRIVATE_SEL(registryID));
 746  }
 747  
 748  // property: architecture
 749  _MTL_INLINE MTL::Architecture* MTL::Device::architecture() const
 750  {
 751      return Object::sendMessage<MTL::Architecture*>(this, _MTL_PRIVATE_SEL(architecture));
 752  }
 753  
 754  // property: maxThreadsPerThreadgroup
 755  _MTL_INLINE MTL::Size MTL::Device::maxThreadsPerThreadgroup() const
 756  {
 757      return Object::sendMessage<MTL::Size>(this, _MTL_PRIVATE_SEL(maxThreadsPerThreadgroup));
 758  }
 759  
 760  // property: lowPower
 761  _MTL_INLINE bool MTL::Device::lowPower() const
 762  {
 763      return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isLowPower));
 764  }
 765  
 766  // property: headless
 767  _MTL_INLINE bool MTL::Device::headless() const
 768  {
 769      return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isHeadless));
 770  }
 771  
 772  // property: removable
 773  _MTL_INLINE bool MTL::Device::removable() const
 774  {
 775      return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(isRemovable));
 776  }
 777  
 778  // property: hasUnifiedMemory
 779  _MTL_INLINE bool MTL::Device::hasUnifiedMemory() const
 780  {
 781      return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(hasUnifiedMemory));
 782  }
 783  
 784  // property: recommendedMaxWorkingSetSize
 785  _MTL_INLINE uint64_t MTL::Device::recommendedMaxWorkingSetSize() const
 786  {
 787      return Object::sendMessage<uint64_t>(this, _MTL_PRIVATE_SEL(recommendedMaxWorkingSetSize));
 788  }
 789  
 790  // property: location
 791  _MTL_INLINE MTL::DeviceLocation MTL::Device::location() const
 792  {
 793      return Object::sendMessage<MTL::DeviceLocation>(this, _MTL_PRIVATE_SEL(location));
 794  }
 795  
 796  // property: locationNumber
 797  _MTL_INLINE NS::UInteger MTL::Device::locationNumber() const
 798  {
 799      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(locationNumber));
 800  }
 801  
 802  // property: maxTransferRate
 803  _MTL_INLINE uint64_t MTL::Device::maxTransferRate() const
 804  {
 805      return Object::sendMessage<uint64_t>(this, _MTL_PRIVATE_SEL(maxTransferRate));
 806  }
 807  
 808  // property: depth24Stencil8PixelFormatSupported
 809  _MTL_INLINE bool MTL::Device::depth24Stencil8PixelFormatSupported() const
 810  {
 811      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(isDepth24Stencil8PixelFormatSupported));
 812  }
 813  
 814  // property: readWriteTextureSupport
 815  _MTL_INLINE MTL::ReadWriteTextureTier MTL::Device::readWriteTextureSupport() const
 816  {
 817      return Object::sendMessage<MTL::ReadWriteTextureTier>(this, _MTL_PRIVATE_SEL(readWriteTextureSupport));
 818  }
 819  
 820  // property: argumentBuffersSupport
 821  _MTL_INLINE MTL::ArgumentBuffersTier MTL::Device::argumentBuffersSupport() const
 822  {
 823      return Object::sendMessage<MTL::ArgumentBuffersTier>(this, _MTL_PRIVATE_SEL(argumentBuffersSupport));
 824  }
 825  
 826  // property: rasterOrderGroupsSupported
 827  _MTL_INLINE bool MTL::Device::rasterOrderGroupsSupported() const
 828  {
 829      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(areRasterOrderGroupsSupported));
 830  }
 831  
 832  // property: supports32BitFloatFiltering
 833  _MTL_INLINE bool MTL::Device::supports32BitFloatFiltering() const
 834  {
 835      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supports32BitFloatFiltering));
 836  }
 837  
 838  // property: supports32BitMSAA
 839  _MTL_INLINE bool MTL::Device::supports32BitMSAA() const
 840  {
 841      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supports32BitMSAA));
 842  }
 843  
 844  // property: supportsQueryTextureLOD
 845  _MTL_INLINE bool MTL::Device::supportsQueryTextureLOD() const
 846  {
 847      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsQueryTextureLOD));
 848  }
 849  
 850  // property: supportsBCTextureCompression
 851  _MTL_INLINE bool MTL::Device::supportsBCTextureCompression() const
 852  {
 853      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsBCTextureCompression));
 854  }
 855  
 856  // property: supportsPullModelInterpolation
 857  _MTL_INLINE bool MTL::Device::supportsPullModelInterpolation() const
 858  {
 859      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsPullModelInterpolation));
 860  }
 861  
 862  // property: barycentricCoordsSupported
 863  _MTL_INLINE bool MTL::Device::barycentricCoordsSupported() const
 864  {
 865      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(areBarycentricCoordsSupported));
 866  }
 867  
 868  // property: supportsShaderBarycentricCoordinates
 869  _MTL_INLINE bool MTL::Device::supportsShaderBarycentricCoordinates() const
 870  {
 871      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsShaderBarycentricCoordinates));
 872  }
 873  
 874  // property: currentAllocatedSize
 875  _MTL_INLINE NS::UInteger MTL::Device::currentAllocatedSize() const
 876  {
 877      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(currentAllocatedSize));
 878  }
 879  
 880  // method: newLogStateWithDescriptor:error:
 881  _MTL_INLINE MTL::LogState* MTL::Device::newLogState(const MTL::LogStateDescriptor* descriptor, NS::Error** error)
 882  {
 883      return Object::sendMessage<MTL::LogState*>(this, _MTL_PRIVATE_SEL(newLogStateWithDescriptor_error_), descriptor, error);
 884  }
 885  
 886  // method: newCommandQueue
 887  _MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue()
 888  {
 889      return Object::sendMessage<MTL::CommandQueue*>(this, _MTL_PRIVATE_SEL(newCommandQueue));
 890  }
 891  
 892  // method: newCommandQueueWithMaxCommandBufferCount:
 893  _MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue(NS::UInteger maxCommandBufferCount)
 894  {
 895      return Object::sendMessage<MTL::CommandQueue*>(this, _MTL_PRIVATE_SEL(newCommandQueueWithMaxCommandBufferCount_), maxCommandBufferCount);
 896  }
 897  
 898  // method: newCommandQueueWithDescriptor:
 899  _MTL_INLINE MTL::CommandQueue* MTL::Device::newCommandQueue(const MTL::CommandQueueDescriptor* descriptor)
 900  {
 901      return Object::sendMessage<MTL::CommandQueue*>(this, _MTL_PRIVATE_SEL(newCommandQueueWithDescriptor_), descriptor);
 902  }
 903  
 904  // method: heapTextureSizeAndAlignWithDescriptor:
 905  _MTL_INLINE MTL::SizeAndAlign MTL::Device::heapTextureSizeAndAlign(const MTL::TextureDescriptor* desc)
 906  {
 907      return Object::sendMessage<MTL::SizeAndAlign>(this, _MTL_PRIVATE_SEL(heapTextureSizeAndAlignWithDescriptor_), desc);
 908  }
 909  
 910  // method: heapBufferSizeAndAlignWithLength:options:
 911  _MTL_INLINE MTL::SizeAndAlign MTL::Device::heapBufferSizeAndAlign(NS::UInteger length, MTL::ResourceOptions options)
 912  {
 913      return Object::sendMessage<MTL::SizeAndAlign>(this, _MTL_PRIVATE_SEL(heapBufferSizeAndAlignWithLength_options_), length, options);
 914  }
 915  
 916  // method: newHeapWithDescriptor:
 917  _MTL_INLINE MTL::Heap* MTL::Device::newHeap(const MTL::HeapDescriptor* descriptor)
 918  {
 919      return Object::sendMessage<MTL::Heap*>(this, _MTL_PRIVATE_SEL(newHeapWithDescriptor_), descriptor);
 920  }
 921  
 922  // method: newBufferWithLength:options:
 923  _MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(NS::UInteger length, MTL::ResourceOptions options)
 924  {
 925      return Object::sendMessage<MTL::Buffer*>(this, _MTL_PRIVATE_SEL(newBufferWithLength_options_), length, options);
 926  }
 927  
 928  // method: newBufferWithBytes:length:options:
 929  _MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(const void* pointer, NS::UInteger length, MTL::ResourceOptions options)
 930  {
 931      return Object::sendMessage<MTL::Buffer*>(this, _MTL_PRIVATE_SEL(newBufferWithBytes_length_options_), pointer, length, options);
 932  }
 933  
 934  // method: newBufferWithBytesNoCopy:length:options:deallocator:
 935  _MTL_INLINE MTL::Buffer* MTL::Device::newBuffer(const void* pointer, NS::UInteger length, MTL::ResourceOptions options, void (^deallocator)(void*, NS::UInteger))
 936  {
 937      return Object::sendMessage<MTL::Buffer*>(this, _MTL_PRIVATE_SEL(newBufferWithBytesNoCopy_length_options_deallocator_), pointer, length, options, deallocator);
 938  }
 939  
 940  // method: newDepthStencilStateWithDescriptor:
 941  _MTL_INLINE MTL::DepthStencilState* MTL::Device::newDepthStencilState(const MTL::DepthStencilDescriptor* descriptor)
 942  {
 943      return Object::sendMessage<MTL::DepthStencilState*>(this, _MTL_PRIVATE_SEL(newDepthStencilStateWithDescriptor_), descriptor);
 944  }
 945  
 946  // method: newTextureWithDescriptor:
 947  _MTL_INLINE MTL::Texture* MTL::Device::newTexture(const MTL::TextureDescriptor* descriptor)
 948  {
 949      return Object::sendMessage<MTL::Texture*>(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_), descriptor);
 950  }
 951  
 952  // method: newTextureWithDescriptor:iosurface:plane:
 953  _MTL_INLINE MTL::Texture* MTL::Device::newTexture(const MTL::TextureDescriptor* descriptor, const IOSurfaceRef iosurface, NS::UInteger plane)
 954  {
 955      return Object::sendMessage<MTL::Texture*>(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_iosurface_plane_), descriptor, iosurface, plane);
 956  }
 957  
 958  // method: newSharedTextureWithDescriptor:
 959  _MTL_INLINE MTL::Texture* MTL::Device::newSharedTexture(const MTL::TextureDescriptor* descriptor)
 960  {
 961      return Object::sendMessage<MTL::Texture*>(this, _MTL_PRIVATE_SEL(newSharedTextureWithDescriptor_), descriptor);
 962  }
 963  
 964  // method: newSharedTextureWithHandle:
 965  _MTL_INLINE MTL::Texture* MTL::Device::newSharedTexture(const MTL::SharedTextureHandle* sharedHandle)
 966  {
 967      return Object::sendMessage<MTL::Texture*>(this, _MTL_PRIVATE_SEL(newSharedTextureWithHandle_), sharedHandle);
 968  }
 969  
 970  // method: newSamplerStateWithDescriptor:
 971  _MTL_INLINE MTL::SamplerState* MTL::Device::newSamplerState(const MTL::SamplerDescriptor* descriptor)
 972  {
 973      return Object::sendMessage<MTL::SamplerState*>(this, _MTL_PRIVATE_SEL(newSamplerStateWithDescriptor_), descriptor);
 974  }
 975  
 976  // method: newDefaultLibrary
 977  _MTL_INLINE MTL::Library* MTL::Device::newDefaultLibrary()
 978  {
 979      return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(newDefaultLibrary));
 980  }
 981  
 982  // method: newDefaultLibraryWithBundle:error:
 983  _MTL_INLINE MTL::Library* MTL::Device::newDefaultLibrary(const NS::Bundle* bundle, NS::Error** error)
 984  {
 985      return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(newDefaultLibraryWithBundle_error_), bundle, error);
 986  }
 987  
 988  // method: newLibraryWithFile:error:
 989  _MTL_INLINE MTL::Library* MTL::Device::newLibrary(const NS::String* filepath, NS::Error** error)
 990  {
 991      return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(newLibraryWithFile_error_), filepath, error);
 992  }
 993  
 994  // method: newLibraryWithURL:error:
 995  _MTL_INLINE MTL::Library* MTL::Device::newLibrary(const NS::URL* url, NS::Error** error)
 996  {
 997      return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(newLibraryWithURL_error_), url, error);
 998  }
 999  
1000  // method: newLibraryWithData:error:
1001  _MTL_INLINE MTL::Library* MTL::Device::newLibrary(const dispatch_data_t data, NS::Error** error)
1002  {
1003      return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(newLibraryWithData_error_), data, error);
1004  }
1005  
1006  // method: newLibraryWithSource:options:error:
1007  _MTL_INLINE MTL::Library* MTL::Device::newLibrary(const NS::String* source, const MTL::CompileOptions* options, NS::Error** error)
1008  {
1009      return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(newLibraryWithSource_options_error_), source, options, error);
1010  }
1011  
1012  // method: newLibraryWithSource:options:completionHandler:
1013  _MTL_INLINE void MTL::Device::newLibrary(const NS::String* source, const MTL::CompileOptions* options, const MTL::NewLibraryCompletionHandler completionHandler)
1014  {
1015      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newLibraryWithSource_options_completionHandler_), source, options, completionHandler);
1016  }
1017  
1018  // method: newLibraryWithStitchedDescriptor:error:
1019  _MTL_INLINE MTL::Library* MTL::Device::newLibrary(const MTL::StitchedLibraryDescriptor* descriptor, NS::Error** error)
1020  {
1021      return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(newLibraryWithStitchedDescriptor_error_), descriptor, error);
1022  }
1023  
1024  // method: newLibraryWithStitchedDescriptor:completionHandler:
1025  _MTL_INLINE void MTL::Device::newLibrary(const MTL::StitchedLibraryDescriptor* descriptor, const MTL::NewLibraryCompletionHandler completionHandler)
1026  {
1027      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newLibraryWithStitchedDescriptor_completionHandler_), descriptor, completionHandler);
1028  }
1029  
1030  // method: newRenderPipelineStateWithDescriptor:error:
1031  _MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, NS::Error** error)
1032  {
1033      return Object::sendMessage<MTL::RenderPipelineState*>(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_error_), descriptor, error);
1034  }
1035  
1036  // method: newRenderPipelineStateWithDescriptor:options:reflection:error:
1037  _MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error)
1038  {
1039      return Object::sendMessage<MTL::RenderPipelineState*>(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_options_reflection_error_), descriptor, options, reflection, error);
1040  }
1041  
1042  // method: newRenderPipelineStateWithDescriptor:completionHandler:
1043  _MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, const MTL::NewRenderPipelineStateCompletionHandler completionHandler)
1044  {
1045      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_completionHandler_), descriptor, completionHandler);
1046  }
1047  
1048  // method: newRenderPipelineStateWithDescriptor:options:completionHandler:
1049  _MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::RenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler)
1050  {
1051      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithDescriptor_options_completionHandler_), descriptor, options, completionHandler);
1052  }
1053  
1054  // method: newComputePipelineStateWithFunction:error:
1055  _MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(const MTL::Function* computeFunction, NS::Error** error)
1056  {
1057      return Object::sendMessage<MTL::ComputePipelineState*>(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithFunction_error_), computeFunction, error);
1058  }
1059  
1060  // method: newComputePipelineStateWithFunction:options:reflection:error:
1061  _MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(const MTL::Function* computeFunction, MTL::PipelineOption options, const MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error)
1062  {
1063      return Object::sendMessage<MTL::ComputePipelineState*>(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithFunction_options_reflection_error_), computeFunction, options, reflection, error);
1064  }
1065  
1066  // method: newComputePipelineStateWithFunction:completionHandler:
1067  _MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::Function* computeFunction, const MTL::NewComputePipelineStateCompletionHandler completionHandler)
1068  {
1069      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithFunction_completionHandler_), computeFunction, completionHandler);
1070  }
1071  
1072  // method: newComputePipelineStateWithFunction:options:completionHandler:
1073  _MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::Function* computeFunction, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler)
1074  {
1075      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithFunction_options_completionHandler_), computeFunction, options, completionHandler);
1076  }
1077  
1078  // method: newComputePipelineStateWithDescriptor:options:reflection:error:
1079  _MTL_INLINE MTL::ComputePipelineState* MTL::Device::newComputePipelineState(const MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedComputePipelineReflection* reflection, NS::Error** error)
1080  {
1081      return Object::sendMessage<MTL::ComputePipelineState*>(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_options_reflection_error_), descriptor, options, reflection, error);
1082  }
1083  
1084  // method: newComputePipelineStateWithDescriptor:options:completionHandler:
1085  _MTL_INLINE void MTL::Device::newComputePipelineState(const MTL::ComputePipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewComputePipelineStateWithReflectionCompletionHandler completionHandler)
1086  {
1087      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newComputePipelineStateWithDescriptor_options_completionHandler_), descriptor, options, completionHandler);
1088  }
1089  
1090  // method: newFence
1091  _MTL_INLINE MTL::Fence* MTL::Device::newFence()
1092  {
1093      return Object::sendMessage<MTL::Fence*>(this, _MTL_PRIVATE_SEL(newFence));
1094  }
1095  
1096  // method: supportsFeatureSet:
1097  _MTL_INLINE bool MTL::Device::supportsFeatureSet(MTL::FeatureSet featureSet)
1098  {
1099      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsFeatureSet_), featureSet);
1100  }
1101  
1102  // method: supportsFamily:
1103  _MTL_INLINE bool MTL::Device::supportsFamily(MTL::GPUFamily gpuFamily)
1104  {
1105      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsFamily_), gpuFamily);
1106  }
1107  
1108  // method: supportsTextureSampleCount:
1109  _MTL_INLINE bool MTL::Device::supportsTextureSampleCount(NS::UInteger sampleCount)
1110  {
1111      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsTextureSampleCount_), sampleCount);
1112  }
1113  
1114  // method: minimumLinearTextureAlignmentForPixelFormat:
1115  _MTL_INLINE NS::UInteger MTL::Device::minimumLinearTextureAlignmentForPixelFormat(MTL::PixelFormat format)
1116  {
1117      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(minimumLinearTextureAlignmentForPixelFormat_), format);
1118  }
1119  
1120  // method: minimumTextureBufferAlignmentForPixelFormat:
1121  _MTL_INLINE NS::UInteger MTL::Device::minimumTextureBufferAlignmentForPixelFormat(MTL::PixelFormat format)
1122  {
1123      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(minimumTextureBufferAlignmentForPixelFormat_), format);
1124  }
1125  
1126  // method: newRenderPipelineStateWithTileDescriptor:options:reflection:error:
1127  _MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(const MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error)
1128  {
1129      return Object::sendMessage<MTL::RenderPipelineState*>(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithTileDescriptor_options_reflection_error_), descriptor, options, reflection, error);
1130  }
1131  
1132  // method: newRenderPipelineStateWithTileDescriptor:options:completionHandler:
1133  _MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::TileRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler)
1134  {
1135      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithTileDescriptor_options_completionHandler_), descriptor, options, completionHandler);
1136  }
1137  
1138  // method: newRenderPipelineStateWithMeshDescriptor:options:reflection:error:
1139  _MTL_INLINE MTL::RenderPipelineState* MTL::Device::newRenderPipelineState(const MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::AutoreleasedRenderPipelineReflection* reflection, NS::Error** error)
1140  {
1141      return Object::sendMessage<MTL::RenderPipelineState*>(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithMeshDescriptor_options_reflection_error_), descriptor, options, reflection, error);
1142  }
1143  
1144  // method: newRenderPipelineStateWithMeshDescriptor:options:completionHandler:
1145  _MTL_INLINE void MTL::Device::newRenderPipelineState(const MTL::MeshRenderPipelineDescriptor* descriptor, MTL::PipelineOption options, const MTL::NewRenderPipelineStateWithReflectionCompletionHandler completionHandler)
1146  {
1147      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(newRenderPipelineStateWithMeshDescriptor_options_completionHandler_), descriptor, options, completionHandler);
1148  }
1149  
1150  // property: maxThreadgroupMemoryLength
1151  _MTL_INLINE NS::UInteger MTL::Device::maxThreadgroupMemoryLength() const
1152  {
1153      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(maxThreadgroupMemoryLength));
1154  }
1155  
1156  // property: maxArgumentBufferSamplerCount
1157  _MTL_INLINE NS::UInteger MTL::Device::maxArgumentBufferSamplerCount() const
1158  {
1159      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(maxArgumentBufferSamplerCount));
1160  }
1161  
1162  // property: programmableSamplePositionsSupported
1163  _MTL_INLINE bool MTL::Device::programmableSamplePositionsSupported() const
1164  {
1165      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(areProgrammableSamplePositionsSupported));
1166  }
1167  
1168  // method: getDefaultSamplePositions:count:
1169  _MTL_INLINE void MTL::Device::getDefaultSamplePositions(MTL::SamplePosition* positions, NS::UInteger count)
1170  {
1171      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(getDefaultSamplePositions_count_), positions, count);
1172  }
1173  
1174  // method: newArgumentEncoderWithArguments:
1175  _MTL_INLINE MTL::ArgumentEncoder* MTL::Device::newArgumentEncoder(const NS::Array* arguments)
1176  {
1177      return Object::sendMessage<MTL::ArgumentEncoder*>(this, _MTL_PRIVATE_SEL(newArgumentEncoderWithArguments_), arguments);
1178  }
1179  
1180  // method: supportsRasterizationRateMapWithLayerCount:
1181  _MTL_INLINE bool MTL::Device::supportsRasterizationRateMap(NS::UInteger layerCount)
1182  {
1183      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsRasterizationRateMapWithLayerCount_), layerCount);
1184  }
1185  
1186  // method: newRasterizationRateMapWithDescriptor:
1187  _MTL_INLINE MTL::RasterizationRateMap* MTL::Device::newRasterizationRateMap(const MTL::RasterizationRateMapDescriptor* descriptor)
1188  {
1189      return Object::sendMessage<MTL::RasterizationRateMap*>(this, _MTL_PRIVATE_SEL(newRasterizationRateMapWithDescriptor_), descriptor);
1190  }
1191  
1192  // method: newIndirectCommandBufferWithDescriptor:maxCommandCount:options:
1193  _MTL_INLINE MTL::IndirectCommandBuffer* MTL::Device::newIndirectCommandBuffer(const MTL::IndirectCommandBufferDescriptor* descriptor, NS::UInteger maxCount, MTL::ResourceOptions options)
1194  {
1195      return Object::sendMessage<MTL::IndirectCommandBuffer*>(this, _MTL_PRIVATE_SEL(newIndirectCommandBufferWithDescriptor_maxCommandCount_options_), descriptor, maxCount, options);
1196  }
1197  
1198  // method: newEvent
1199  _MTL_INLINE MTL::Event* MTL::Device::newEvent()
1200  {
1201      return Object::sendMessage<MTL::Event*>(this, _MTL_PRIVATE_SEL(newEvent));
1202  }
1203  
1204  // method: newSharedEvent
1205  _MTL_INLINE MTL::SharedEvent* MTL::Device::newSharedEvent()
1206  {
1207      return Object::sendMessage<MTL::SharedEvent*>(this, _MTL_PRIVATE_SEL(newSharedEvent));
1208  }
1209  
1210  // method: newSharedEventWithHandle:
1211  _MTL_INLINE MTL::SharedEvent* MTL::Device::newSharedEvent(const MTL::SharedEventHandle* sharedEventHandle)
1212  {
1213      return Object::sendMessage<MTL::SharedEvent*>(this, _MTL_PRIVATE_SEL(newSharedEventWithHandle_), sharedEventHandle);
1214  }
1215  
1216  // property: peerGroupID
1217  _MTL_INLINE uint64_t MTL::Device::peerGroupID() const
1218  {
1219      return Object::sendMessage<uint64_t>(this, _MTL_PRIVATE_SEL(peerGroupID));
1220  }
1221  
1222  // property: peerIndex
1223  _MTL_INLINE uint32_t MTL::Device::peerIndex() const
1224  {
1225      return Object::sendMessage<uint32_t>(this, _MTL_PRIVATE_SEL(peerIndex));
1226  }
1227  
1228  // property: peerCount
1229  _MTL_INLINE uint32_t MTL::Device::peerCount() const
1230  {
1231      return Object::sendMessage<uint32_t>(this, _MTL_PRIVATE_SEL(peerCount));
1232  }
1233  
1234  // method: newIOHandleWithURL:error:
1235  _MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOHandle(const NS::URL* url, NS::Error** error)
1236  {
1237      return Object::sendMessage<MTL::IOFileHandle*>(this, _MTL_PRIVATE_SEL(newIOHandleWithURL_error_), url, error);
1238  }
1239  
1240  // method: newIOCommandQueueWithDescriptor:error:
1241  _MTL_INLINE MTL::IOCommandQueue* MTL::Device::newIOCommandQueue(const MTL::IOCommandQueueDescriptor* descriptor, NS::Error** error)
1242  {
1243      return Object::sendMessage<MTL::IOCommandQueue*>(this, _MTL_PRIVATE_SEL(newIOCommandQueueWithDescriptor_error_), descriptor, error);
1244  }
1245  
1246  // method: newIOHandleWithURL:compressionMethod:error:
1247  _MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error)
1248  {
1249      return Object::sendMessage<MTL::IOFileHandle*>(this, _MTL_PRIVATE_SEL(newIOHandleWithURL_compressionMethod_error_), url, compressionMethod, error);
1250  }
1251  
1252  // method: newIOFileHandleWithURL:error:
1253  _MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(const NS::URL* url, NS::Error** error)
1254  {
1255      return Object::sendMessage<MTL::IOFileHandle*>(this, _MTL_PRIVATE_SEL(newIOFileHandleWithURL_error_), url, error);
1256  }
1257  
1258  // method: newIOFileHandleWithURL:compressionMethod:error:
1259  _MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error)
1260  {
1261      return Object::sendMessage<MTL::IOFileHandle*>(this, _MTL_PRIVATE_SEL(newIOFileHandleWithURL_compressionMethod_error_), url, compressionMethod, error);
1262  }
1263  
1264  // method: sparseTileSizeWithTextureType:pixelFormat:sampleCount:
1265  _MTL_INLINE MTL::Size MTL::Device::sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount)
1266  {
1267      return Object::sendMessage<MTL::Size>(this, _MTL_PRIVATE_SEL(sparseTileSizeWithTextureType_pixelFormat_sampleCount_), textureType, pixelFormat, sampleCount);
1268  }
1269  
1270  // property: sparseTileSizeInBytes
1271  _MTL_INLINE NS::UInteger MTL::Device::sparseTileSizeInBytes() const
1272  {
1273      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(sparseTileSizeInBytes));
1274  }
1275  
1276  // method: convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:
1277  _MTL_INLINE void MTL::Device::convertSparsePixelRegions(const MTL::Region* pixelRegions, MTL::Region* tileRegions, MTL::Size tileSize, MTL::SparseTextureRegionAlignmentMode mode, NS::UInteger numRegions)
1278  {
1279      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(convertSparsePixelRegions_toTileRegions_withTileSize_alignmentMode_numRegions_), pixelRegions, tileRegions, tileSize, mode, numRegions);
1280  }
1281  
1282  // method: convertSparseTileRegions:toPixelRegions:withTileSize:numRegions:
1283  _MTL_INLINE void MTL::Device::convertSparseTileRegions(const MTL::Region* tileRegions, MTL::Region* pixelRegions, MTL::Size tileSize, NS::UInteger numRegions)
1284  {
1285      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(convertSparseTileRegions_toPixelRegions_withTileSize_numRegions_), tileRegions, pixelRegions, tileSize, numRegions);
1286  }
1287  
1288  // method: sparseTileSizeInBytesForSparsePageSize:
1289  _MTL_INLINE NS::UInteger MTL::Device::sparseTileSizeInBytes(MTL::SparsePageSize sparsePageSize)
1290  {
1291      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(sparseTileSizeInBytesForSparsePageSize_), sparsePageSize);
1292  }
1293  
1294  // method: sparseTileSizeWithTextureType:pixelFormat:sampleCount:sparsePageSize:
1295  _MTL_INLINE MTL::Size MTL::Device::sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount, MTL::SparsePageSize sparsePageSize)
1296  {
1297      return Object::sendMessage<MTL::Size>(this, _MTL_PRIVATE_SEL(sparseTileSizeWithTextureType_pixelFormat_sampleCount_sparsePageSize_), textureType, pixelFormat, sampleCount, sparsePageSize);
1298  }
1299  
1300  // property: maxBufferLength
1301  _MTL_INLINE NS::UInteger MTL::Device::maxBufferLength() const
1302  {
1303      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(maxBufferLength));
1304  }
1305  
1306  // property: counterSets
1307  _MTL_INLINE NS::Array* MTL::Device::counterSets() const
1308  {
1309      return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(counterSets));
1310  }
1311  
1312  // method: newCounterSampleBufferWithDescriptor:error:
1313  _MTL_INLINE MTL::CounterSampleBuffer* MTL::Device::newCounterSampleBuffer(const MTL::CounterSampleBufferDescriptor* descriptor, NS::Error** error)
1314  {
1315      return Object::sendMessage<MTL::CounterSampleBuffer*>(this, _MTL_PRIVATE_SEL(newCounterSampleBufferWithDescriptor_error_), descriptor, error);
1316  }
1317  
1318  // method: sampleTimestamps:gpuTimestamp:
1319  _MTL_INLINE void MTL::Device::sampleTimestamps(MTL::Timestamp* cpuTimestamp, MTL::Timestamp* gpuTimestamp)
1320  {
1321      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(sampleTimestamps_gpuTimestamp_), cpuTimestamp, gpuTimestamp);
1322  }
1323  
1324  // method: newArgumentEncoderWithBufferBinding:
1325  _MTL_INLINE MTL::ArgumentEncoder* MTL::Device::newArgumentEncoder(const MTL::BufferBinding* bufferBinding)
1326  {
1327      return Object::sendMessage<MTL::ArgumentEncoder*>(this, _MTL_PRIVATE_SEL(newArgumentEncoderWithBufferBinding_), bufferBinding);
1328  }
1329  
1330  // method: supportsCounterSampling:
1331  _MTL_INLINE bool MTL::Device::supportsCounterSampling(MTL::CounterSamplingPoint samplingPoint)
1332  {
1333      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsCounterSampling_), samplingPoint);
1334  }
1335  
1336  // method: supportsVertexAmplificationCount:
1337  _MTL_INLINE bool MTL::Device::supportsVertexAmplificationCount(NS::UInteger count)
1338  {
1339      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsVertexAmplificationCount_), count);
1340  }
1341  
1342  // property: supportsDynamicLibraries
1343  _MTL_INLINE bool MTL::Device::supportsDynamicLibraries() const
1344  {
1345      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsDynamicLibraries));
1346  }
1347  
1348  // property: supportsRenderDynamicLibraries
1349  _MTL_INLINE bool MTL::Device::supportsRenderDynamicLibraries() const
1350  {
1351      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsRenderDynamicLibraries));
1352  }
1353  
1354  // method: newDynamicLibrary:error:
1355  _MTL_INLINE MTL::DynamicLibrary* MTL::Device::newDynamicLibrary(const MTL::Library* library, NS::Error** error)
1356  {
1357      return Object::sendMessage<MTL::DynamicLibrary*>(this, _MTL_PRIVATE_SEL(newDynamicLibrary_error_), library, error);
1358  }
1359  
1360  // method: newDynamicLibraryWithURL:error:
1361  _MTL_INLINE MTL::DynamicLibrary* MTL::Device::newDynamicLibrary(const NS::URL* url, NS::Error** error)
1362  {
1363      return Object::sendMessage<MTL::DynamicLibrary*>(this, _MTL_PRIVATE_SEL(newDynamicLibraryWithURL_error_), url, error);
1364  }
1365  
1366  // method: newBinaryArchiveWithDescriptor:error:
1367  _MTL_INLINE MTL::BinaryArchive* MTL::Device::newBinaryArchive(const MTL::BinaryArchiveDescriptor* descriptor, NS::Error** error)
1368  {
1369      return Object::sendMessage<MTL::BinaryArchive*>(this, _MTL_PRIVATE_SEL(newBinaryArchiveWithDescriptor_error_), descriptor, error);
1370  }
1371  
1372  // property: supportsRaytracing
1373  _MTL_INLINE bool MTL::Device::supportsRaytracing() const
1374  {
1375      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsRaytracing));
1376  }
1377  
1378  // method: accelerationStructureSizesWithDescriptor:
1379  _MTL_INLINE MTL::AccelerationStructureSizes MTL::Device::accelerationStructureSizes(const MTL::AccelerationStructureDescriptor* descriptor)
1380  {
1381      return Object::sendMessage<MTL::AccelerationStructureSizes>(this, _MTL_PRIVATE_SEL(accelerationStructureSizesWithDescriptor_), descriptor);
1382  }
1383  
1384  // method: newAccelerationStructureWithSize:
1385  _MTL_INLINE MTL::AccelerationStructure* MTL::Device::newAccelerationStructure(NS::UInteger size)
1386  {
1387      return Object::sendMessage<MTL::AccelerationStructure*>(this, _MTL_PRIVATE_SEL(newAccelerationStructureWithSize_), size);
1388  }
1389  
1390  // method: newAccelerationStructureWithDescriptor:
1391  _MTL_INLINE MTL::AccelerationStructure* MTL::Device::newAccelerationStructure(const MTL::AccelerationStructureDescriptor* descriptor)
1392  {
1393      return Object::sendMessage<MTL::AccelerationStructure*>(this, _MTL_PRIVATE_SEL(newAccelerationStructureWithDescriptor_), descriptor);
1394  }
1395  
1396  // method: heapAccelerationStructureSizeAndAlignWithSize:
1397  _MTL_INLINE MTL::SizeAndAlign MTL::Device::heapAccelerationStructureSizeAndAlign(NS::UInteger size)
1398  {
1399      return Object::sendMessage<MTL::SizeAndAlign>(this, _MTL_PRIVATE_SEL(heapAccelerationStructureSizeAndAlignWithSize_), size);
1400  }
1401  
1402  // method: heapAccelerationStructureSizeAndAlignWithDescriptor:
1403  _MTL_INLINE MTL::SizeAndAlign MTL::Device::heapAccelerationStructureSizeAndAlign(const MTL::AccelerationStructureDescriptor* descriptor)
1404  {
1405      return Object::sendMessage<MTL::SizeAndAlign>(this, _MTL_PRIVATE_SEL(heapAccelerationStructureSizeAndAlignWithDescriptor_), descriptor);
1406  }
1407  
1408  // property: supportsFunctionPointers
1409  _MTL_INLINE bool MTL::Device::supportsFunctionPointers() const
1410  {
1411      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsFunctionPointers));
1412  }
1413  
1414  // property: supportsFunctionPointersFromRender
1415  _MTL_INLINE bool MTL::Device::supportsFunctionPointersFromRender() const
1416  {
1417      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsFunctionPointersFromRender));
1418  }
1419  
1420  // property: supportsRaytracingFromRender
1421  _MTL_INLINE bool MTL::Device::supportsRaytracingFromRender() const
1422  {
1423      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsRaytracingFromRender));
1424  }
1425  
1426  // property: supportsPrimitiveMotionBlur
1427  _MTL_INLINE bool MTL::Device::supportsPrimitiveMotionBlur() const
1428  {
1429      return Object::sendMessageSafe<bool>(this, _MTL_PRIVATE_SEL(supportsPrimitiveMotionBlur));
1430  }
1431  
1432  // property: shouldMaximizeConcurrentCompilation
1433  _MTL_INLINE bool MTL::Device::shouldMaximizeConcurrentCompilation() const
1434  {
1435      return Object::sendMessage<bool>(this, _MTL_PRIVATE_SEL(shouldMaximizeConcurrentCompilation));
1436  }
1437  
1438  _MTL_INLINE void MTL::Device::setShouldMaximizeConcurrentCompilation(bool shouldMaximizeConcurrentCompilation)
1439  {
1440      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setShouldMaximizeConcurrentCompilation_), shouldMaximizeConcurrentCompilation);
1441  }
1442  
1443  // property: maximumConcurrentCompilationTaskCount
1444  _MTL_INLINE NS::UInteger MTL::Device::maximumConcurrentCompilationTaskCount() const
1445  {
1446      return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(maximumConcurrentCompilationTaskCount));
1447  }
1448  
1449  // method: newResidencySetWithDescriptor:error:
1450  _MTL_INLINE MTL::ResidencySet* MTL::Device::newResidencySet(const MTL::ResidencySetDescriptor* desc, NS::Error** error)
1451  {
1452      return Object::sendMessage<MTL::ResidencySet*>(this, _MTL_PRIVATE_SEL(newResidencySetWithDescriptor_error_), desc, error);
1453  }