From c8d3b6a79dadd9b1bf570bdddfeff7563db7bdb9 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Sat, 27 Jan 2024 12:08:04 +0000 Subject: [PATCH] Apple metal-cpp update to MacOS SDK 14.2 --- renderdoc/driver/metal/official/metal-cpp.h | 2312 ++++++++++++++++++- util/test/demos/apple/official/metal-cpp.h | 2312 ++++++++++++++++++- 2 files changed, 4514 insertions(+), 110 deletions(-) diff --git a/renderdoc/driver/metal/official/metal-cpp.h b/renderdoc/driver/metal/official/metal-cpp.h index 87b6f1443..1a3acddcc 100644 --- a/renderdoc/driver/metal/official/metal-cpp.h +++ b/renderdoc/driver/metal/official/metal-cpp.h @@ -1,7 +1,7 @@ // // metal-cpp.h // -// Autogenerated on April 10, 2023. +// Autogenerated from commit 9c6e07c61e9642cd343988e9f7840543d2132387. // // Copyright 2020-2023 Apple Inc. // @@ -602,8 +602,8 @@ namespace NS { using TimeInterval = double; -using Integer = std::int64_t; -using UInteger = std::uint64_t; +using Integer = std::int64_t; // RD: intptr_t -> int64_t +using UInteger = std::uint64_t; // RD: intptr_t -> int64_t const Integer IntegerMax = INTPTR_MAX; const Integer IntegerMin = INTPTR_MIN; @@ -808,7 +808,7 @@ _NS_INLINE _Ret NS::Object::sendMessageSafe(const void* pObj, SEL selector, _Arg if constexpr (!std::is_void<_Ret>::value) { - return 0; + return _Ret(0); } } @@ -2823,7 +2823,7 @@ _NS_INLINE NS::SharedPtr<_Class>::SharedPtr() } template -_NS_INLINE NS::SharedPtr<_Class>::~SharedPtr() +_NS_INLINE NS::SharedPtr<_Class>::~SharedPtr<_Class>() { if (m_pObject) { @@ -3349,7 +3349,7 @@ namespace NS::Private::Selector #define _MTL_CONST(type, name) _NS_CONST(type, name) #define _MTL_ENUM(type, name) _NS_ENUM(type, name) -#define _MTL_OPTIONS(type, name) _NS_ENUM(type, name) +#define _MTL_OPTIONS(type, name) _NS_ENUM(type, name) // RD: _NS_OPTIONS -> _NS_ENUM #define _MTL_VALIDATE_SIZE(ns, name) _NS_VALIDATE_SIZE(ns, name) #define _MTL_VALIDATE_ENUM(ns, name) _NS_VALIDATE_ENUM(ns, name) @@ -3399,7 +3399,7 @@ namespace MTL::Private } } // MTL::Private -#if defined(__MAC_10_16) || defined(__MAC_11_0) || defined(__MAC_12_0) || defined(__MAC_13_0) || defined(__IPHONE_14_0) || defined(__IPHONE_15_0) || defined(__IPHONE_16_0) || defined(__TVOS_14_0) || defined(__TVOS_15_0) || defined(__TVOS_16_0) +#if defined(__MAC_10_16) || defined(__MAC_11_0) || defined(__MAC_12_0) || defined(__MAC_13_0) || defined(__MAC_14_0) || defined(__IPHONE_14_0) || defined(__IPHONE_15_0) || defined(__IPHONE_16_0) || defined(__IPHONE_17_0) || defined(__TVOS_14_0) || defined(__TVOS_15_0) || defined(__TVOS_16_0) || defined(__TVOS_17_0) #define _MTL_PRIVATE_DEF_STR(type, symbol) \ _MTL_EXTERN type const MTL##symbol _MTL_PRIVATE_IMPORT; \ @@ -3425,7 +3425,7 @@ namespace MTL::Private #define _MTL_PRIVATE_DEF_WEAK_CONST(type, symbol) _MTL_PRIVATE_DEF_CONST(type, symbol) -#endif // defined(__MAC_10_16) || defined(__MAC_11_0) || defined(__MAC_12_0) || defined(__MAC_13_0) || defined(__IPHONE_14_0) || defined(__IPHONE_15_0) || defined(__IPHONE_16_0) || defined(__TVOS_14_0) || defined(__TVOS_15_0) || defined(__TVOS_16_0) +#endif // defined(__MAC_10_16) || defined(__MAC_11_0) || defined(__MAC_12_0) || defined(__MAC_13_0) || defined(__MAC_14_0) || defined(__IPHONE_14_0) || defined(__IPHONE_15_0) || defined(__IPHONE_16_0) || defined(__IPHONE_17_0) || defined(__TVOS_14_0) || defined(__TVOS_15_0) || defined(__TVOS_16_0) || defined(__TVOS_17_0) #else @@ -3479,14 +3479,17 @@ namespace MTL::Private::Class { _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureBoundingBoxGeometryDescriptor); +_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureCurveGeometryDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureGeometryDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor); +_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionTriangleGeometryDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassSampleBufferAttachmentDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureTriangleGeometryDescriptor); +_MTL_PRIVATE_DEF_CLS(MTLArchitecture); _MTL_PRIVATE_DEF_CLS(MTLArgument); _MTL_PRIVATE_DEF_CLS(MTLArgumentDescriptor); _MTL_PRIVATE_DEF_CLS(MTLArrayType); @@ -3520,6 +3523,7 @@ _MTL_PRIVATE_DEF_CLS(MTLFunctionStitchingInputNode); _MTL_PRIVATE_DEF_CLS(MTLHeapDescriptor); _MTL_PRIVATE_DEF_CLS(MTLIOCommandQueueDescriptor); _MTL_PRIVATE_DEF_CLS(MTLIndirectCommandBufferDescriptor); +_MTL_PRIVATE_DEF_CLS(MTLIndirectInstanceAccelerationStructureDescriptor); _MTL_PRIVATE_DEF_CLS(MTLInstanceAccelerationStructureDescriptor); _MTL_PRIVATE_DEF_CLS(MTLIntersectionFunctionDescriptor); _MTL_PRIVATE_DEF_CLS(MTLIntersectionFunctionTableDescriptor); @@ -3684,6 +3688,8 @@ _MTL_PRIVATE_DEF_SEL(allowReferencingUndefinedSymbols, "allowReferencingUndefinedSymbols"); _MTL_PRIVATE_DEF_SEL(alphaBlendOperation, "alphaBlendOperation"); +_MTL_PRIVATE_DEF_SEL(architecture, + "architecture"); _MTL_PRIVATE_DEF_SEL(areBarycentricCoordsSupported, "areBarycentricCoordsSupported"); _MTL_PRIVATE_DEF_SEL(areProgrammableSamplePositionsSupported, @@ -3814,6 +3820,18 @@ _MTL_PRIVATE_DEF_SEL(contents, "contents"); _MTL_PRIVATE_DEF_SEL(controlDependencies, "controlDependencies"); +_MTL_PRIVATE_DEF_SEL(controlPointBuffer, + "controlPointBuffer"); +_MTL_PRIVATE_DEF_SEL(controlPointBufferOffset, + "controlPointBufferOffset"); +_MTL_PRIVATE_DEF_SEL(controlPointBuffers, + "controlPointBuffers"); +_MTL_PRIVATE_DEF_SEL(controlPointCount, + "controlPointCount"); +_MTL_PRIVATE_DEF_SEL(controlPointFormat, + "controlPointFormat"); +_MTL_PRIVATE_DEF_SEL(controlPointStride, + "controlPointStride"); _MTL_PRIVATE_DEF_SEL(convertSparsePixelRegions_toTileRegions_withTileSize_alignmentMode_numRegions_, "convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:"); _MTL_PRIVATE_DEF_SEL(convertSparseTileRegions_toPixelRegions_withTileSize_numRegions_, @@ -3854,6 +3872,12 @@ _MTL_PRIVATE_DEF_SEL(cpuCacheMode, "cpuCacheMode"); _MTL_PRIVATE_DEF_SEL(currentAllocatedSize, "currentAllocatedSize"); +_MTL_PRIVATE_DEF_SEL(curveBasis, + "curveBasis"); +_MTL_PRIVATE_DEF_SEL(curveEndCaps, + "curveEndCaps"); +_MTL_PRIVATE_DEF_SEL(curveType, + "curveType"); _MTL_PRIVATE_DEF_SEL(data, "data"); _MTL_PRIVATE_DEF_SEL(dataSize, @@ -4124,6 +4148,10 @@ _MTL_PRIVATE_DEF_SEL(installName, "installName"); _MTL_PRIVATE_DEF_SEL(instanceCount, "instanceCount"); +_MTL_PRIVATE_DEF_SEL(instanceCountBuffer, + "instanceCountBuffer"); +_MTL_PRIVATE_DEF_SEL(instanceCountBufferOffset, + "instanceCountBufferOffset"); _MTL_PRIVATE_DEF_SEL(instanceDescriptorBuffer, "instanceDescriptorBuffer"); _MTL_PRIVATE_DEF_SEL(instanceDescriptorBufferOffset, @@ -4258,8 +4286,20 @@ _MTL_PRIVATE_DEF_SEL(maxFragmentBufferBindCount, "maxFragmentBufferBindCount"); _MTL_PRIVATE_DEF_SEL(maxFragmentCallStackDepth, "maxFragmentCallStackDepth"); +_MTL_PRIVATE_DEF_SEL(maxInstanceCount, + "maxInstanceCount"); _MTL_PRIVATE_DEF_SEL(maxKernelBufferBindCount, "maxKernelBufferBindCount"); +_MTL_PRIVATE_DEF_SEL(maxKernelThreadgroupMemoryBindCount, + "maxKernelThreadgroupMemoryBindCount"); +_MTL_PRIVATE_DEF_SEL(maxMeshBufferBindCount, + "maxMeshBufferBindCount"); +_MTL_PRIVATE_DEF_SEL(maxMotionTransformCount, + "maxMotionTransformCount"); +_MTL_PRIVATE_DEF_SEL(maxObjectBufferBindCount, + "maxObjectBufferBindCount"); +_MTL_PRIVATE_DEF_SEL(maxObjectThreadgroupMemoryBindCount, + "maxObjectThreadgroupMemoryBindCount"); _MTL_PRIVATE_DEF_SEL(maxSampleCount, "maxSampleCount"); _MTL_PRIVATE_DEF_SEL(maxTessellationFactor, @@ -4304,6 +4344,8 @@ _MTL_PRIVATE_DEF_SEL(meshBuffers, "meshBuffers"); _MTL_PRIVATE_DEF_SEL(meshFunction, "meshFunction"); +_MTL_PRIVATE_DEF_SEL(meshLinkedFunctions, + "meshLinkedFunctions"); _MTL_PRIVATE_DEF_SEL(meshThreadExecutionWidth, "meshThreadExecutionWidth"); _MTL_PRIVATE_DEF_SEL(meshThreadgroupSizeIsMultipleOfThreadExecutionWidth, @@ -4334,6 +4376,10 @@ _MTL_PRIVATE_DEF_SEL(motionTransformBufferOffset, "motionTransformBufferOffset"); _MTL_PRIVATE_DEF_SEL(motionTransformCount, "motionTransformCount"); +_MTL_PRIVATE_DEF_SEL(motionTransformCountBuffer, + "motionTransformCountBuffer"); +_MTL_PRIVATE_DEF_SEL(motionTransformCountBufferOffset, + "motionTransformCountBufferOffset"); _MTL_PRIVATE_DEF_SEL(moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_, "moveTextureMappingsFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); _MTL_PRIVATE_DEF_SEL(mutability, @@ -4420,6 +4466,10 @@ _MTL_PRIVATE_DEF_SEL(newHeapWithDescriptor_, "newHeapWithDescriptor:"); _MTL_PRIVATE_DEF_SEL(newIOCommandQueueWithDescriptor_error_, "newIOCommandQueueWithDescriptor:error:"); +_MTL_PRIVATE_DEF_SEL(newIOFileHandleWithURL_compressionMethod_error_, + "newIOFileHandleWithURL:compressionMethod:error:"); +_MTL_PRIVATE_DEF_SEL(newIOFileHandleWithURL_error_, + "newIOFileHandleWithURL:error:"); _MTL_PRIVATE_DEF_SEL(newIOHandleWithURL_compressionMethod_error_, "newIOHandleWithURL:compressionMethod:error:"); _MTL_PRIVATE_DEF_SEL(newIOHandleWithURL_error_, @@ -4520,6 +4570,8 @@ _MTL_PRIVATE_DEF_SEL(objectBuffers, "objectBuffers"); _MTL_PRIVATE_DEF_SEL(objectFunction, "objectFunction"); +_MTL_PRIVATE_DEF_SEL(objectLinkedFunctions, + "objectLinkedFunctions"); _MTL_PRIVATE_DEF_SEL(objectPayloadAlignment, "objectPayloadAlignment"); _MTL_PRIVATE_DEF_SEL(objectPayloadDataSize, @@ -4618,6 +4670,16 @@ _MTL_PRIVATE_DEF_SEL(pushDebugGroup_, "pushDebugGroup:"); _MTL_PRIVATE_DEF_SEL(rAddressMode, "rAddressMode"); +_MTL_PRIVATE_DEF_SEL(radiusBuffer, + "radiusBuffer"); +_MTL_PRIVATE_DEF_SEL(radiusBufferOffset, + "radiusBufferOffset"); +_MTL_PRIVATE_DEF_SEL(radiusBuffers, + "radiusBuffers"); +_MTL_PRIVATE_DEF_SEL(radiusFormat, + "radiusFormat"); +_MTL_PRIVATE_DEF_SEL(radiusStride, + "radiusStride"); _MTL_PRIVATE_DEF_SEL(rasterSampleCount, "rasterSampleCount"); _MTL_PRIVATE_DEF_SEL(rasterizationRateMap, @@ -4714,6 +4776,10 @@ _MTL_PRIVATE_DEF_SEL(scratchBufferAllocator, "scratchBufferAllocator"); _MTL_PRIVATE_DEF_SEL(screenSize, "screenSize"); +_MTL_PRIVATE_DEF_SEL(segmentControlPointCount, + "segmentControlPointCount"); +_MTL_PRIVATE_DEF_SEL(segmentCount, + "segmentCount"); _MTL_PRIVATE_DEF_SEL(serializeToURL_error_, "serializeToURL:error:"); _MTL_PRIVATE_DEF_SEL(setAccelerationStructure_atBufferIndex_, @@ -4774,14 +4840,22 @@ _MTL_PRIVATE_DEF_SEL(setBuffer_, "setBuffer:"); _MTL_PRIVATE_DEF_SEL(setBuffer_offset_atIndex_, "setBuffer:offset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setBuffer_offset_attributeStride_atIndex_, + "setBuffer:offset:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setBufferIndex_, "setBufferIndex:"); _MTL_PRIVATE_DEF_SEL(setBufferOffset_atIndex_, "setBufferOffset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setBufferOffset_attributeStride_atIndex_, + "setBufferOffset:attributeStride:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setBuffers_offsets_attributeStrides_withRange_, + "setBuffers:offsets:attributeStrides:withRange:"); _MTL_PRIVATE_DEF_SEL(setBuffers_offsets_withRange_, "setBuffers:offsets:withRange:"); _MTL_PRIVATE_DEF_SEL(setBytes_length_atIndex_, "setBytes:length:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setBytes_length_attributeStride_atIndex_, + "setBytes:length:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setCaptureObject_, "setCaptureObject:"); _MTL_PRIVATE_DEF_SEL(setClearColor_, @@ -4822,12 +4896,30 @@ _MTL_PRIVATE_DEF_SEL(setConstantValues_type_withRange_, "setConstantValues:type:withRange:"); _MTL_PRIVATE_DEF_SEL(setControlDependencies_, "setControlDependencies:"); +_MTL_PRIVATE_DEF_SEL(setControlPointBuffer_, + "setControlPointBuffer:"); +_MTL_PRIVATE_DEF_SEL(setControlPointBufferOffset_, + "setControlPointBufferOffset:"); +_MTL_PRIVATE_DEF_SEL(setControlPointBuffers_, + "setControlPointBuffers:"); +_MTL_PRIVATE_DEF_SEL(setControlPointCount_, + "setControlPointCount:"); +_MTL_PRIVATE_DEF_SEL(setControlPointFormat_, + "setControlPointFormat:"); +_MTL_PRIVATE_DEF_SEL(setControlPointStride_, + "setControlPointStride:"); _MTL_PRIVATE_DEF_SEL(setCounterSet_, "setCounterSet:"); _MTL_PRIVATE_DEF_SEL(setCpuCacheMode_, "setCpuCacheMode:"); _MTL_PRIVATE_DEF_SEL(setCullMode_, "setCullMode:"); +_MTL_PRIVATE_DEF_SEL(setCurveBasis_, + "setCurveBasis:"); +_MTL_PRIVATE_DEF_SEL(setCurveEndCaps_, + "setCurveEndCaps:"); +_MTL_PRIVATE_DEF_SEL(setCurveType_, + "setCurveType:"); _MTL_PRIVATE_DEF_SEL(setDataType_, "setDataType:"); _MTL_PRIVATE_DEF_SEL(setDefaultCaptureScope_, @@ -4974,6 +5066,10 @@ _MTL_PRIVATE_DEF_SEL(setInstallName_, "setInstallName:"); _MTL_PRIVATE_DEF_SEL(setInstanceCount_, "setInstanceCount:"); +_MTL_PRIVATE_DEF_SEL(setInstanceCountBuffer_, + "setInstanceCountBuffer:"); +_MTL_PRIVATE_DEF_SEL(setInstanceCountBufferOffset_, + "setInstanceCountBufferOffset:"); _MTL_PRIVATE_DEF_SEL(setInstanceDescriptorBuffer_, "setInstanceDescriptorBuffer:"); _MTL_PRIVATE_DEF_SEL(setInstanceDescriptorBufferOffset_, @@ -4996,6 +5092,8 @@ _MTL_PRIVATE_DEF_SEL(setIntersectionFunctionTables_withRange_, "setIntersectionFunctionTables:withRange:"); _MTL_PRIVATE_DEF_SEL(setKernelBuffer_offset_atIndex_, "setKernelBuffer:offset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setKernelBuffer_offset_attributeStride_atIndex_, + "setKernelBuffer:offset:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setLabel_, "setLabel:"); _MTL_PRIVATE_DEF_SEL(setLanguageVersion_, @@ -5032,8 +5130,20 @@ _MTL_PRIVATE_DEF_SEL(setMaxFragmentBufferBindCount_, "setMaxFragmentBufferBindCount:"); _MTL_PRIVATE_DEF_SEL(setMaxFragmentCallStackDepth_, "setMaxFragmentCallStackDepth:"); +_MTL_PRIVATE_DEF_SEL(setMaxInstanceCount_, + "setMaxInstanceCount:"); _MTL_PRIVATE_DEF_SEL(setMaxKernelBufferBindCount_, "setMaxKernelBufferBindCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxKernelThreadgroupMemoryBindCount_, + "setMaxKernelThreadgroupMemoryBindCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxMeshBufferBindCount_, + "setMaxMeshBufferBindCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxMotionTransformCount_, + "setMaxMotionTransformCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxObjectBufferBindCount_, + "setMaxObjectBufferBindCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxObjectThreadgroupMemoryBindCount_, + "setMaxObjectThreadgroupMemoryBindCount:"); _MTL_PRIVATE_DEF_SEL(setMaxTessellationFactor_, "setMaxTessellationFactor:"); _MTL_PRIVATE_DEF_SEL(setMaxTotalThreadgroupsPerMeshGrid_, @@ -5060,6 +5170,8 @@ _MTL_PRIVATE_DEF_SEL(setMeshBytes_length_atIndex_, "setMeshBytes:length:atIndex:"); _MTL_PRIVATE_DEF_SEL(setMeshFunction_, "setMeshFunction:"); +_MTL_PRIVATE_DEF_SEL(setMeshLinkedFunctions_, + "setMeshLinkedFunctions:"); _MTL_PRIVATE_DEF_SEL(setMeshSamplerState_atIndex_, "setMeshSamplerState:atIndex:"); _MTL_PRIVATE_DEF_SEL(setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex_, @@ -5096,6 +5208,10 @@ _MTL_PRIVATE_DEF_SEL(setMotionTransformBufferOffset_, "setMotionTransformBufferOffset:"); _MTL_PRIVATE_DEF_SEL(setMotionTransformCount_, "setMotionTransformCount:"); +_MTL_PRIVATE_DEF_SEL(setMotionTransformCountBuffer_, + "setMotionTransformCountBuffer:"); +_MTL_PRIVATE_DEF_SEL(setMotionTransformCountBufferOffset_, + "setMotionTransformCountBufferOffset:"); _MTL_PRIVATE_DEF_SEL(setMutability_, "setMutability:"); _MTL_PRIVATE_DEF_SEL(setName_, @@ -5116,6 +5232,8 @@ _MTL_PRIVATE_DEF_SEL(setObjectBytes_length_atIndex_, "setObjectBytes:length:atIndex:"); _MTL_PRIVATE_DEF_SEL(setObjectFunction_, "setObjectFunction:"); +_MTL_PRIVATE_DEF_SEL(setObjectLinkedFunctions_, + "setObjectLinkedFunctions:"); _MTL_PRIVATE_DEF_SEL(setObjectSamplerState_atIndex_, "setObjectSamplerState:atIndex:"); _MTL_PRIVATE_DEF_SEL(setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex_, @@ -5136,6 +5254,10 @@ _MTL_PRIVATE_DEF_SEL(setOffset_, "setOffset:"); _MTL_PRIVATE_DEF_SEL(setOpaque_, "setOpaque:"); +_MTL_PRIVATE_DEF_SEL(setOpaqueCurveIntersectionFunctionWithSignature_atIndex_, + "setOpaqueCurveIntersectionFunctionWithSignature:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setOpaqueCurveIntersectionFunctionWithSignature_withRange_, + "setOpaqueCurveIntersectionFunctionWithSignature:withRange:"); _MTL_PRIVATE_DEF_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_atIndex_, "setOpaqueTriangleIntersectionFunctionWithSignature:atIndex:"); _MTL_PRIVATE_DEF_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_withRange_, @@ -5174,6 +5296,16 @@ _MTL_PRIVATE_DEF_SEL(setPurgeableState_, "setPurgeableState:"); _MTL_PRIVATE_DEF_SEL(setRAddressMode_, "setRAddressMode:"); +_MTL_PRIVATE_DEF_SEL(setRadiusBuffer_, + "setRadiusBuffer:"); +_MTL_PRIVATE_DEF_SEL(setRadiusBufferOffset_, + "setRadiusBufferOffset:"); +_MTL_PRIVATE_DEF_SEL(setRadiusBuffers_, + "setRadiusBuffers:"); +_MTL_PRIVATE_DEF_SEL(setRadiusFormat_, + "setRadiusFormat:"); +_MTL_PRIVATE_DEF_SEL(setRadiusStride_, + "setRadiusStride:"); _MTL_PRIVATE_DEF_SEL(setRasterSampleCount_, "setRasterSampleCount:"); _MTL_PRIVATE_DEF_SEL(setRasterizationEnabled_, @@ -5232,6 +5364,10 @@ _MTL_PRIVATE_DEF_SEL(setScratchBufferAllocator_, "setScratchBufferAllocator:"); _MTL_PRIVATE_DEF_SEL(setScreenSize_, "setScreenSize:"); +_MTL_PRIVATE_DEF_SEL(setSegmentControlPointCount_, + "setSegmentControlPointCount:"); +_MTL_PRIVATE_DEF_SEL(setSegmentCount_, + "setSegmentCount:"); _MTL_PRIVATE_DEF_SEL(setShouldMaximizeConcurrentCompilation_, "setShouldMaximizeConcurrentCompilation:"); _MTL_PRIVATE_DEF_SEL(setSignaledValue_, @@ -5298,6 +5434,8 @@ _MTL_PRIVATE_DEF_SEL(setSupportAddingVertexBinaryFunctions_, "setSupportAddingVertexBinaryFunctions:"); _MTL_PRIVATE_DEF_SEL(setSupportArgumentBuffers_, "setSupportArgumentBuffers:"); +_MTL_PRIVATE_DEF_SEL(setSupportDynamicAttributeStride_, + "setSupportDynamicAttributeStride:"); _MTL_PRIVATE_DEF_SEL(setSupportIndirectCommandBuffers_, "setSupportIndirectCommandBuffers:"); _MTL_PRIVATE_DEF_SEL(setSupportRayTracing_, @@ -5402,16 +5540,24 @@ _MTL_PRIVATE_DEF_SEL(setVertexBuffer_, "setVertexBuffer:"); _MTL_PRIVATE_DEF_SEL(setVertexBuffer_offset_atIndex_, "setVertexBuffer:offset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setVertexBuffer_offset_attributeStride_atIndex_, + "setVertexBuffer:offset:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_, "setVertexBufferOffset:"); _MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_atIndex_, "setVertexBufferOffset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_attributeStride_atIndex_, + "setVertexBufferOffset:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setVertexBuffers_, "setVertexBuffers:"); +_MTL_PRIVATE_DEF_SEL(setVertexBuffers_offsets_attributeStrides_withRange_, + "setVertexBuffers:offsets:attributeStrides:withRange:"); _MTL_PRIVATE_DEF_SEL(setVertexBuffers_offsets_withRange_, "setVertexBuffers:offsets:withRange:"); _MTL_PRIVATE_DEF_SEL(setVertexBytes_length_atIndex_, "setVertexBytes:length:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setVertexBytes_length_attributeStride_atIndex_, + "setVertexBytes:length:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setVertexDescriptor_, "setVertexDescriptor:"); _MTL_PRIVATE_DEF_SEL(setVertexFormat_, @@ -5550,6 +5696,8 @@ _MTL_PRIVATE_DEF_SEL(supportAddingVertexBinaryFunctions, "supportAddingVertexBinaryFunctions"); _MTL_PRIVATE_DEF_SEL(supportArgumentBuffers, "supportArgumentBuffers"); +_MTL_PRIVATE_DEF_SEL(supportDynamicAttributeStride, + "supportDynamicAttributeStride"); _MTL_PRIVATE_DEF_SEL(supportIndirectCommandBuffers, "supportIndirectCommandBuffers"); _MTL_PRIVATE_DEF_SEL(supportRayTracing, @@ -5758,7 +5906,7 @@ _MTL_PRIVATE_DEF_SEL(writeMask, namespace MTL { -class Drawable; +class Drawable; // RD: forward declare Drawable using DrawablePresentedHandler = void (^)(class Drawable*); using DrawablePresentedHandlerFunction = std::function; @@ -5868,6 +6016,8 @@ _MTL_ENUM(NS::UInteger, PixelFormat) { PixelFormatRG11B10Float = 92, PixelFormatRGB9E5Float = 93, PixelFormatBGR10A2Unorm = 94, + PixelFormatBGR10_XR = 554, + PixelFormatBGR10_XR_sRGB = 555, PixelFormatRG32Uint = 103, PixelFormatRG32Sint = 104, PixelFormatRG32Float = 105, @@ -5876,6 +6026,8 @@ _MTL_ENUM(NS::UInteger, PixelFormat) { PixelFormatRGBA16Uint = 113, PixelFormatRGBA16Sint = 114, PixelFormatRGBA16Float = 115, + PixelFormatBGRA10_XR = 552, + PixelFormatBGRA10_XR_sRGB = 553, PixelFormatRGBA32Uint = 123, PixelFormatRGBA32Sint = 124, PixelFormatRGBA32Float = 125, @@ -5962,10 +6114,6 @@ _MTL_ENUM(NS::UInteger, PixelFormat) { PixelFormatDepth32Float_Stencil8 = 260, PixelFormatX32_Stencil8 = 261, PixelFormatX24_Stencil8 = 262, - PixelFormatBGRA10_XR = 552, - PixelFormatBGRA10_XR_sRGB = 553, - PixelFormatBGR10_XR = 554, - PixelFormatBGR10_XR_sRGB = 555, }; } @@ -6000,17 +6148,17 @@ _MTL_ENUM(NS::UInteger, HazardTrackingMode) { }; _MTL_OPTIONS(NS::UInteger, ResourceOptions) { - ResourceStorageModeShared = 0, - ResourceHazardTrackingModeDefault = 0, ResourceCPUCacheModeDefaultCache = 0, - ResourceOptionCPUCacheModeDefault = 0, ResourceCPUCacheModeWriteCombined = 1, - ResourceOptionCPUCacheModeWriteCombined = 1, + ResourceStorageModeShared = 0, ResourceStorageModeManaged = 16, ResourceStorageModePrivate = 32, ResourceStorageModeMemoryless = 48, + ResourceHazardTrackingModeDefault = 0, ResourceHazardTrackingModeUntracked = 256, ResourceHazardTrackingModeTracked = 512, + ResourceOptionCPUCacheModeDefault = 0, + ResourceOptionCPUCacheModeWriteCombined = 1, }; class Resource : public NS::Referencing @@ -6302,6 +6450,7 @@ _MTL_OPTIONS(NS::UInteger, TextureUsage) { TextureUsageShaderWrite = 2, TextureUsageRenderTarget = 4, TextureUsagePixelFormatView = 16, + TextureUsageShaderAtomic = 32, }; _MTL_ENUM(NS::Integer, TextureCompressionType) { @@ -7125,6 +7274,8 @@ _MTL_ENUM(NS::UInteger, AttributeFormat) { AttributeFormatUShortNormalized = 51, AttributeFormatShortNormalized = 52, AttributeFormatHalf = 53, + AttributeFormatFloatRG11B10 = 54, + AttributeFormatFloatRGB9E5 = 55, }; _MTL_ENUM(NS::UInteger, IndexType) { @@ -7736,6 +7887,140 @@ public: static MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* descriptor(); }; +_MTL_ENUM(NS::Integer, CurveType) { + CurveTypeRound = 0, + CurveTypeFlat = 1, +}; + +_MTL_ENUM(NS::Integer, CurveBasis) { + CurveBasisBSpline = 0, + CurveBasisCatmullRom = 1, + CurveBasisLinear = 2, + CurveBasisBezier = 3, +}; + +_MTL_ENUM(NS::Integer, CurveEndCaps) { + CurveEndCapsNone = 0, + CurveEndCapsDisk = 1, + CurveEndCapsSphere = 2, +}; + +class AccelerationStructureCurveGeometryDescriptor : public NS::Copying +{ +public: + static class AccelerationStructureCurveGeometryDescriptor* alloc(); + + class AccelerationStructureCurveGeometryDescriptor* init(); + + class Buffer* controlPointBuffer() const; + void setControlPointBuffer(const class Buffer* controlPointBuffer); + + NS::UInteger controlPointBufferOffset() const; + void setControlPointBufferOffset(NS::UInteger controlPointBufferOffset); + + NS::UInteger controlPointCount() const; + void setControlPointCount(NS::UInteger controlPointCount); + + NS::UInteger controlPointStride() const; + void setControlPointStride(NS::UInteger controlPointStride); + + MTL::AttributeFormat controlPointFormat() const; + void setControlPointFormat(MTL::AttributeFormat controlPointFormat); + + class Buffer* radiusBuffer() const; + void setRadiusBuffer(const class Buffer* radiusBuffer); + + NS::UInteger radiusBufferOffset() const; + void setRadiusBufferOffset(NS::UInteger radiusBufferOffset); + + MTL::AttributeFormat radiusFormat() const; + void setRadiusFormat(MTL::AttributeFormat radiusFormat); + + NS::UInteger radiusStride() const; + void setRadiusStride(NS::UInteger radiusStride); + + class Buffer* indexBuffer() const; + void setIndexBuffer(const class Buffer* indexBuffer); + + NS::UInteger indexBufferOffset() const; + void setIndexBufferOffset(NS::UInteger indexBufferOffset); + + MTL::IndexType indexType() const; + void setIndexType(MTL::IndexType indexType); + + NS::UInteger segmentCount() const; + void setSegmentCount(NS::UInteger segmentCount); + + NS::UInteger segmentControlPointCount() const; + void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); + + MTL::CurveType curveType() const; + void setCurveType(MTL::CurveType curveType); + + MTL::CurveBasis curveBasis() const; + void setCurveBasis(MTL::CurveBasis curveBasis); + + MTL::CurveEndCaps curveEndCaps() const; + void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); + + static MTL::AccelerationStructureCurveGeometryDescriptor* descriptor(); +}; + +class AccelerationStructureMotionCurveGeometryDescriptor : public NS::Copying +{ +public: + static class AccelerationStructureMotionCurveGeometryDescriptor* alloc(); + + class AccelerationStructureMotionCurveGeometryDescriptor* init(); + + NS::Array* controlPointBuffers() const; + void setControlPointBuffers(const NS::Array* controlPointBuffers); + + NS::UInteger controlPointCount() const; + void setControlPointCount(NS::UInteger controlPointCount); + + NS::UInteger controlPointStride() const; + void setControlPointStride(NS::UInteger controlPointStride); + + MTL::AttributeFormat controlPointFormat() const; + void setControlPointFormat(MTL::AttributeFormat controlPointFormat); + + NS::Array* radiusBuffers() const; + void setRadiusBuffers(const NS::Array* radiusBuffers); + + MTL::AttributeFormat radiusFormat() const; + void setRadiusFormat(MTL::AttributeFormat radiusFormat); + + NS::UInteger radiusStride() const; + void setRadiusStride(NS::UInteger radiusStride); + + class Buffer* indexBuffer() const; + void setIndexBuffer(const class Buffer* indexBuffer); + + NS::UInteger indexBufferOffset() const; + void setIndexBufferOffset(NS::UInteger indexBufferOffset); + + MTL::IndexType indexType() const; + void setIndexType(MTL::IndexType indexType); + + NS::UInteger segmentCount() const; + void setSegmentCount(NS::UInteger segmentCount); + + NS::UInteger segmentControlPointCount() const; + void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); + + MTL::CurveType curveType() const; + void setCurveType(MTL::CurveType curveType); + + MTL::CurveBasis curveBasis() const; + void setCurveBasis(MTL::CurveBasis curveBasis); + + MTL::CurveEndCaps curveEndCaps() const; + void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); + + static MTL::AccelerationStructureMotionCurveGeometryDescriptor* descriptor(); +}; + struct AccelerationStructureInstanceDescriptor { MTL::PackedFloat4x3 transformationMatrix; @@ -7759,6 +8044,8 @@ _MTL_ENUM(NS::UInteger, AccelerationStructureInstanceDescriptorType) { AccelerationStructureInstanceDescriptorTypeDefault = 0, AccelerationStructureInstanceDescriptorTypeUserID = 1, AccelerationStructureInstanceDescriptorTypeMotion = 2, + AccelerationStructureInstanceDescriptorTypeIndirect = 3, + AccelerationStructureInstanceDescriptorTypeIndirectMotion = 4, }; struct AccelerationStructureMotionInstanceDescriptor @@ -7776,6 +8063,31 @@ struct AccelerationStructureMotionInstanceDescriptor float motionEndTime; } _MTL_PACKED; +struct IndirectAccelerationStructureInstanceDescriptor +{ + MTL::PackedFloat4x3 transformationMatrix; + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t userID; + MTL::ResourceID accelerationStructureID; +} _MTL_PACKED; + +struct IndirectAccelerationStructureMotionInstanceDescriptor +{ + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t userID; + MTL::ResourceID accelerationStructureID; + uint32_t motionTransformsStartIndex; + uint32_t motionTransformsCount; + MTL::MotionBorderMode motionStartBorderMode; + MTL::MotionBorderMode motionEndBorderMode; + float motionStartTime; + float motionEndTime; +} _MTL_PACKED; + class InstanceAccelerationStructureDescriptor : public NS::Copying { public: @@ -7813,6 +8125,52 @@ public: static MTL::InstanceAccelerationStructureDescriptor* descriptor(); }; +class IndirectInstanceAccelerationStructureDescriptor : public NS::Copying +{ +public: + static class IndirectInstanceAccelerationStructureDescriptor* alloc(); + + class IndirectInstanceAccelerationStructureDescriptor* init(); + + class Buffer* instanceDescriptorBuffer() const; + void setInstanceDescriptorBuffer(const class Buffer* instanceDescriptorBuffer); + + NS::UInteger instanceDescriptorBufferOffset() const; + void setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset); + + NS::UInteger instanceDescriptorStride() const; + void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); + + NS::UInteger maxInstanceCount() const; + void setMaxInstanceCount(NS::UInteger maxInstanceCount); + + class Buffer* instanceCountBuffer() const; + void setInstanceCountBuffer(const class Buffer* instanceCountBuffer); + + NS::UInteger instanceCountBufferOffset() const; + void setInstanceCountBufferOffset(NS::UInteger instanceCountBufferOffset); + + MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; + void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); + + class Buffer* motionTransformBuffer() const; + void setMotionTransformBuffer(const class Buffer* motionTransformBuffer); + + NS::UInteger motionTransformBufferOffset() const; + void setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset); + + NS::UInteger maxMotionTransformCount() const; + void setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount); + + class Buffer* motionTransformCountBuffer() const; + void setMotionTransformCountBuffer(const class Buffer* motionTransformCountBuffer); + + NS::UInteger motionTransformCountBufferOffset() const; + void setMotionTransformCountBufferOffset(NS::UInteger motionTransformCountBufferOffset); + + static MTL::IndirectInstanceAccelerationStructureDescriptor* descriptor(); +}; + class AccelerationStructure : public NS::Referencing { public: @@ -8363,6 +8721,356 @@ _MTL_INLINE MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL:: return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); } +_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::alloc() +{ + return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureCurveGeometryDescriptor)); +} + +_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::init() +{ + return NS::Object::init(); +} + +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::controlPointBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBuffer)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointBuffer(const MTL::Buffer* controlPointBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBuffer_), controlPointBuffer); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBufferOffset)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointBufferOffset(NS::UInteger controlPointBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBufferOffset_), controlPointBufferOffset); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointCount_), controlPointCount); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointStride)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointStride_), controlPointStride); +} + +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureCurveGeometryDescriptor::controlPointFormat() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointFormat)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointFormat_), controlPointFormat); +} + +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::radiusBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBuffer)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusBuffer(const MTL::Buffer* radiusBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBuffer_), radiusBuffer); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::radiusBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBufferOffset)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusBufferOffset(NS::UInteger radiusBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBufferOffset_), radiusBufferOffset); +} + +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureCurveGeometryDescriptor::radiusFormat() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusFormat)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusFormat_), radiusFormat); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::radiusStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusStride)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusStride_), radiusStride); +} + +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::indexBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexBuffer(const MTL::Buffer* indexBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::indexBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferOffset)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferOffset_), indexBufferOffset); +} + +_MTL_INLINE MTL::IndexType MTL::AccelerationStructureCurveGeometryDescriptor::indexType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::segmentCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentCount_), segmentCount); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::segmentControlPointCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentControlPointCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentControlPointCount_), segmentControlPointCount); +} + +_MTL_INLINE MTL::CurveType MTL::AccelerationStructureCurveGeometryDescriptor::curveType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveType)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveType_), curveType); +} + +_MTL_INLINE MTL::CurveBasis MTL::AccelerationStructureCurveGeometryDescriptor::curveBasis() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveBasis)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveBasis_), curveBasis); +} + +_MTL_INLINE MTL::CurveEndCaps MTL::AccelerationStructureCurveGeometryDescriptor::curveEndCaps() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveEndCaps)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveEndCaps_), curveEndCaps); +} + +_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::descriptor() +{ + return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureCurveGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); +} + +_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::alloc() +{ + return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor)); +} + +_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::init() +{ + return NS::Object::init(); +} + +_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointBuffers() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBuffers)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointBuffers(const NS::Array* controlPointBuffers) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBuffers_), controlPointBuffers); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointCount_), controlPointCount); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointStride)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointStride_), controlPointStride); +} + +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointFormat() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointFormat)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointFormat_), controlPointFormat); +} + +_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusBuffers() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBuffers)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusBuffers(const NS::Array* radiusBuffers) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBuffers_), radiusBuffers); +} + +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusFormat() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusFormat)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusFormat_), radiusFormat); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusStride)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusStride_), radiusStride); +} + +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBuffer(const MTL::Buffer* indexBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferOffset)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferOffset_), indexBufferOffset); +} + +_MTL_INLINE MTL::IndexType MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::segmentCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentCount_), segmentCount); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::segmentControlPointCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentControlPointCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentControlPointCount_), segmentControlPointCount); +} + +_MTL_INLINE MTL::CurveType MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveType)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveType_), curveType); +} + +_MTL_INLINE MTL::CurveBasis MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveBasis() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveBasis)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveBasis_), curveBasis); +} + +_MTL_INLINE MTL::CurveEndCaps MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveEndCaps() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveEndCaps)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveEndCaps_), curveEndCaps); +} + +_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::descriptor() +{ + return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); +} + _MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerationStructureDescriptor::alloc() { return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLInstanceAccelerationStructureDescriptor)); @@ -8468,6 +9176,141 @@ _MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerat return Object::sendMessage(_MTL_PRIVATE_CLS(MTLInstanceAccelerationStructureDescriptor), _MTL_PRIVATE_SEL(descriptor)); } +_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::alloc() +{ + return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLIndirectInstanceAccelerationStructureDescriptor)); +} + +_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::init() +{ + return NS::Object::init(); +} + +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBuffer)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(const MTL::Buffer* instanceDescriptorBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBuffer_), instanceDescriptorBuffer); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBufferOffset)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBufferOffset_), instanceDescriptorBufferOffset); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorStride)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorStride_), instanceDescriptorStride); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::maxInstanceCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxInstanceCount)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMaxInstanceCount(NS::UInteger maxInstanceCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxInstanceCount_), maxInstanceCount); +} + +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::instanceCountBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCountBuffer)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBuffer(const MTL::Buffer* instanceCountBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCountBuffer_), instanceCountBuffer); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceCountBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCountBufferOffset)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBufferOffset(NS::UInteger instanceCountBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCountBufferOffset_), instanceCountBufferOffset); +} + +_MTL_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorType)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorType_), instanceDescriptorType); +} + +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBuffer)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBuffer(const MTL::Buffer* motionTransformBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBuffer_), motionTransformBuffer); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBufferOffset)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBufferOffset_), motionTransformBufferOffset); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::maxMotionTransformCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxMotionTransformCount)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxMotionTransformCount_), maxMotionTransformCount); +} + +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCountBuffer)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBuffer(const MTL::Buffer* motionTransformCountBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCountBuffer_), motionTransformCountBuffer); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCountBufferOffset)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBufferOffset(NS::UInteger motionTransformCountBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCountBufferOffset_), motionTransformCountBufferOffset); +} + +_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::descriptor() +{ + return Object::sendMessage(_MTL_PRIVATE_CLS(MTLIndirectInstanceAccelerationStructureDescriptor), _MTL_PRIVATE_SEL(descriptor)); +} + _MTL_INLINE NS::UInteger MTL::AccelerationStructure::size() const { return Object::sendMessage(this, _MTL_PRIVATE_SEL(size)); @@ -8576,6 +9419,10 @@ _MTL_ENUM(NS::UInteger, DataType) { DataTypeIntersectionFunctionTable = 116, DataTypePrimitiveAccelerationStructure = 117, DataTypeInstanceAccelerationStructure = 118, + DataTypeBFloat = 121, + DataTypeBFloat2 = 122, + DataTypeBFloat3 = 123, + DataTypeBFloat4 = 124, }; _MTL_ENUM(NS::Integer, BindingType) { @@ -8605,7 +9452,10 @@ _MTL_ENUM(NS::UInteger, ArgumentType) { ArgumentTypeIntersectionFunctionTable = 27, }; -_MTL_ENUM(NS::UInteger, ArgumentAccess) { +_MTL_ENUM(NS::UInteger, BindingAccess) { + BindingAccessReadOnly = 0, + BindingAccessReadWrite = 1, + BindingAccessWriteOnly = 2, ArgumentAccessReadOnly = 0, ArgumentAccessReadWrite = 1, ArgumentAccessWriteOnly = 2, @@ -8690,7 +9540,7 @@ public: MTL::DataType elementType() const; - MTL::ArgumentAccess access() const; + MTL::BindingAccess access() const; NS::UInteger alignment() const; @@ -8714,7 +9564,7 @@ public: MTL::TextureType textureType() const; - MTL::ArgumentAccess access() const; + MTL::BindingAccess access() const; bool isDepthTexture() const; }; @@ -8730,7 +9580,7 @@ public: MTL::ArgumentType type() const; - MTL::ArgumentAccess access() const; + MTL::BindingAccess access() const; NS::UInteger index() const; @@ -8762,17 +9612,17 @@ public: class Binding : public NS::Referencing { public: - NS::String* name() const; + NS::String* name() const; - MTL::BindingType type() const; + MTL::BindingType type() const; - MTL::ArgumentAccess access() const; + MTL::BindingAccess access() const; - NS::UInteger index() const; + NS::UInteger index() const; - bool used() const; + bool used() const; - bool argument() const; + bool argument() const; }; class BufferBinding : public NS::Referencing @@ -8969,9 +9819,9 @@ _MTL_INLINE MTL::DataType MTL::PointerType::elementType() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementType)); } -_MTL_INLINE MTL::ArgumentAccess MTL::PointerType::access() const +_MTL_INLINE MTL::BindingAccess MTL::PointerType::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } _MTL_INLINE NS::UInteger MTL::PointerType::alignment() const @@ -9019,9 +9869,9 @@ _MTL_INLINE MTL::TextureType MTL::TextureReferenceType::textureType() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); } -_MTL_INLINE MTL::ArgumentAccess MTL::TextureReferenceType::access() const +_MTL_INLINE MTL::BindingAccess MTL::TextureReferenceType::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } _MTL_INLINE bool MTL::TextureReferenceType::isDepthTexture() const @@ -9049,9 +9899,9 @@ _MTL_INLINE MTL::ArgumentType MTL::Argument::type() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); } -_MTL_INLINE MTL::ArgumentAccess MTL::Argument::access() const +_MTL_INLINE MTL::BindingAccess MTL::Argument::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } _MTL_INLINE NS::UInteger MTL::Argument::index() const @@ -9129,9 +9979,9 @@ _MTL_INLINE MTL::BindingType MTL::Binding::type() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); } -_MTL_INLINE MTL::ArgumentAccess MTL::Binding::access() const +_MTL_INLINE MTL::BindingAccess MTL::Binding::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } _MTL_INLINE NS::UInteger MTL::Binding::index() const @@ -9520,6 +10370,9 @@ _MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* namespace MTL { + +static const NS::UInteger AttributeStrideStatic = NS::UIntegerMax; + class ArgumentEncoder : public NS::Referencing { public: @@ -10445,8 +11298,8 @@ _MTL_ENUM(NS::UInteger, CommandBufferError) { CommandBufferErrorInternal = 1, CommandBufferErrorTimeout = 2, CommandBufferErrorPageFault = 3, - CommandBufferErrorAccessRevoked = 4, CommandBufferErrorBlacklisted = 4, + CommandBufferErrorAccessRevoked = 4, CommandBufferErrorNotPermitted = 7, CommandBufferErrorOutOfMemory = 8, CommandBufferErrorInvalidResource = 9, @@ -10918,6 +11771,14 @@ public: void setBuffers(const class Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); + void setBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + + void setBuffers(const class Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range); + + void setBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + + void setBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index); + void setVisibleFunctionTable(const class VisibleFunctionTable* visibleFunctionTable, NS::UInteger bufferIndex); void setVisibleFunctionTables(const class VisibleFunctionTable* const visibleFunctionTables[], NS::Range range); @@ -11009,6 +11870,26 @@ _MTL_INLINE void MTL::ComputeCommandEncoder::setBuffers(const MTL::Buffer* const Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffers_offsets_withRange_), buffers, offsets, range); } +_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); +} + +_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffers_offsets_attributeStrides_withRange_), buffers, offsets, strides, range); +} + +_MTL_INLINE void MTL::ComputeCommandEncoder::setBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBufferOffset_attributeStride_atIndex_), offset, stride, index); +} + +_MTL_INLINE void MTL::ComputeCommandEncoder::setBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBytes_length_attributeStride_atIndex_), bytes, length, stride, index); +} + _MTL_INLINE void MTL::ComputeCommandEncoder::setVisibleFunctionTable(const MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger bufferIndex) { Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTable_atBufferIndex_), visibleFunctionTable, bufferIndex); @@ -12088,8 +12969,8 @@ _MTL_ENUM(NS::UInteger, FeatureSet) { FeatureSet_OSX_GPUFamily1_v1 = 10000, FeatureSet_macOS_GPUFamily1_v2 = 10001, FeatureSet_OSX_GPUFamily1_v2 = 10001, - FeatureSet_OSX_ReadWriteTextureTier2 = 10002, FeatureSet_macOS_ReadWriteTextureTier2 = 10002, + FeatureSet_OSX_ReadWriteTextureTier2 = 10002, FeatureSet_macOS_GPUFamily1_v3 = 10003, FeatureSet_macOS_GPUFamily1_v4 = 10004, FeatureSet_macOS_GPUFamily2_v1 = 10005, @@ -12115,6 +12996,7 @@ _MTL_ENUM(NS::Integer, GPUFamily) { GPUFamilyApple6 = 1006, GPUFamilyApple7 = 1007, GPUFamilyApple8 = 1008, + GPUFamilyApple9 = 1009, GPUFamilyMac1 = 2001, GPUFamilyMac2 = 2002, GPUFamilyCommon1 = 3001, @@ -12200,8 +13082,8 @@ public: NS::UInteger arrayLength() const; void setArrayLength(NS::UInteger arrayLength); - MTL::ArgumentAccess access() const; - void setAccess(MTL::ArgumentAccess access); + MTL::BindingAccess access() const; + void setAccess(MTL::BindingAccess access); MTL::TextureType textureType() const; void setTextureType(MTL::TextureType textureType); @@ -12210,6 +13092,16 @@ public: void setConstantBlockAlignment(NS::UInteger constantBlockAlignment); }; +class Architecture : public NS::Copying +{ +public: + static class Architecture* alloc(); + + class Architecture* init(); + + NS::String* name() const; +}; + using DeviceNotificationName = NS::String*; _MTL_CONST(DeviceNotificationName, DeviceWasAddedNotification); _MTL_CONST(DeviceNotificationName, DeviceRemovalRequestedNotification); @@ -12281,6 +13173,8 @@ public: uint64_t registryID() const; + class Architecture* architecture() const; + MTL::Size maxThreadsPerThreadgroup() const; bool lowPower() const; @@ -12443,6 +13337,10 @@ public: class IOFileHandle* newIOHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error); + class IOFileHandle* newIOFileHandle(const NS::URL* url, NS::Error** error); + + class IOFileHandle* newIOFileHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error); + MTL::Size sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount); NS::UInteger sparseTileSizeInBytes() const; @@ -12552,12 +13450,12 @@ _MTL_INLINE void MTL::ArgumentDescriptor::setArrayLength(NS::UInteger arrayLengt Object::sendMessage(this, _MTL_PRIVATE_SEL(setArrayLength_), arrayLength); } -_MTL_INLINE MTL::ArgumentAccess MTL::ArgumentDescriptor::access() const +_MTL_INLINE MTL::BindingAccess MTL::ArgumentDescriptor::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } -_MTL_INLINE void MTL::ArgumentDescriptor::setAccess(MTL::ArgumentAccess access) +_MTL_INLINE void MTL::ArgumentDescriptor::setAccess(MTL::BindingAccess access) { Object::sendMessage(this, _MTL_PRIVATE_SEL(setAccess_), access); } @@ -12582,6 +13480,21 @@ _MTL_INLINE void MTL::ArgumentDescriptor::setConstantBlockAlignment(NS::UInteger Object::sendMessage(this, _MTL_PRIVATE_SEL(setConstantBlockAlignment_), constantBlockAlignment); } +_MTL_INLINE MTL::Architecture* MTL::Architecture::alloc() +{ + return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLArchitecture)); +} + +_MTL_INLINE MTL::Architecture* MTL::Architecture::init() +{ + return NS::Object::init(); +} + +_MTL_INLINE NS::String* MTL::Architecture::name() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); +} + _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceWasAddedNotification); _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceRemovalRequestedNotification); _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceWasRemovedNotification); @@ -12712,6 +13625,11 @@ _MTL_INLINE uint64_t MTL::Device::registryID() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(registryID)); } +_MTL_INLINE MTL::Architecture* MTL::Device::architecture() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(architecture)); +} + _MTL_INLINE MTL::Size MTL::Device::maxThreadsPerThreadgroup() const { return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxThreadsPerThreadgroup)); @@ -13117,6 +14035,16 @@ _MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOHandle(const NS::URL* url, MTL: return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOHandleWithURL_compressionMethod_error_), url, compressionMethod, error); } +_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(const NS::URL* url, NS::Error** error) +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOFileHandleWithURL_error_), url, error); +} + +_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error) +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOFileHandleWithURL_compressionMethod_error_), url, compressionMethod, error); +} + _MTL_INLINE MTL::Size MTL::Device::sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount) { return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparseTileSizeWithTextureType_pixelFormat_sampleCount_), textureType, pixelFormat, sampleCount); @@ -13534,6 +14462,7 @@ namespace MTL _MTL_OPTIONS(NS::UInteger, FunctionOptions) { FunctionOptionNone = 0, FunctionOptionCompileToBinary = 1, + FunctionOptionStoreFunctionInMetalScript = 2, }; class FunctionDescriptor : public NS::Copying @@ -13767,6 +14696,7 @@ _MTL_ENUM(NS::UInteger, LanguageVersion) { LanguageVersion2_3 = 131075, LanguageVersion2_4 = 131076, LanguageVersion3_0 = 196608, + LanguageVersion3_1 = 196609, }; _MTL_ENUM(NS::Integer, LibraryType) { @@ -14366,6 +15296,7 @@ namespace MTL { class FunctionStitchingAttribute : public NS::Referencing { +public: }; class FunctionStitchingAttributeAlwaysInline : public NS::Referencing @@ -14378,6 +15309,7 @@ public: class FunctionStitchingNode : public NS::Copying { +public: }; class FunctionStitchingInputNode : public NS::Referencing @@ -14680,7 +15612,7 @@ public: class Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options); - class Texture* newTexture(const class TextureDescriptor* desc); + class Texture* newTexture(const class TextureDescriptor* descriptor); MTL::PurgeableState setPurgeableState(MTL::PurgeableState state); @@ -14841,9 +15773,9 @@ _MTL_INLINE MTL::Buffer* MTL::Heap::newBuffer(NS::UInteger length, MTL::Resource return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBufferWithLength_options_), length, options); } -_MTL_INLINE MTL::Texture* MTL::Heap::newTexture(const MTL::TextureDescriptor* desc) +_MTL_INLINE MTL::Texture* MTL::Heap::newTexture(const MTL::TextureDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_), desc); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_), descriptor); } _MTL_INLINE MTL::PurgeableState MTL::Heap::setPurgeableState(MTL::PurgeableState state) @@ -14897,6 +15829,8 @@ _MTL_OPTIONS(NS::UInteger, IndirectCommandType) { IndirectCommandTypeDrawIndexedPatches = 8, IndirectCommandTypeConcurrentDispatch = 32, IndirectCommandTypeConcurrentDispatchThreads = 64, + IndirectCommandTypeDrawMeshThreadgroups = 128, + IndirectCommandTypeDrawMeshThreads = 256, }; struct IndirectCommandBufferExecutionRange @@ -14930,8 +15864,23 @@ public: NS::UInteger maxKernelBufferBindCount() const; void setMaxKernelBufferBindCount(NS::UInteger maxKernelBufferBindCount); + NS::UInteger maxKernelThreadgroupMemoryBindCount() const; + void setMaxKernelThreadgroupMemoryBindCount(NS::UInteger maxKernelThreadgroupMemoryBindCount); + + NS::UInteger maxObjectBufferBindCount() const; + void setMaxObjectBufferBindCount(NS::UInteger maxObjectBufferBindCount); + + NS::UInteger maxMeshBufferBindCount() const; + void setMaxMeshBufferBindCount(NS::UInteger maxMeshBufferBindCount); + + NS::UInteger maxObjectThreadgroupMemoryBindCount() const; + void setMaxObjectThreadgroupMemoryBindCount(NS::UInteger maxObjectThreadgroupMemoryBindCount); + bool supportRayTracing() const; void setSupportRayTracing(bool supportRayTracing); + + bool supportDynamicAttributeStride() const; + void setSupportDynamicAttributeStride(bool supportDynamicAttributeStride); }; class IndirectCommandBuffer : public NS::Referencing @@ -15020,6 +15969,46 @@ _MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxKernelBufferBindCou Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxKernelBufferBindCount_), maxKernelBufferBindCount); } +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxKernelThreadgroupMemoryBindCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxKernelThreadgroupMemoryBindCount)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxKernelThreadgroupMemoryBindCount(NS::UInteger maxKernelThreadgroupMemoryBindCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxKernelThreadgroupMemoryBindCount_), maxKernelThreadgroupMemoryBindCount); +} + +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxObjectBufferBindCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxObjectBufferBindCount)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxObjectBufferBindCount(NS::UInteger maxObjectBufferBindCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxObjectBufferBindCount_), maxObjectBufferBindCount); +} + +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxMeshBufferBindCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxMeshBufferBindCount)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxMeshBufferBindCount(NS::UInteger maxMeshBufferBindCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxMeshBufferBindCount_), maxMeshBufferBindCount); +} + +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxObjectThreadgroupMemoryBindCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxObjectThreadgroupMemoryBindCount)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxObjectThreadgroupMemoryBindCount(NS::UInteger maxObjectThreadgroupMemoryBindCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxObjectThreadgroupMemoryBindCount_), maxObjectThreadgroupMemoryBindCount); +} + _MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportRayTracing() const { return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportRayTracing)); @@ -15030,6 +16019,16 @@ _MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportRayTracing(bool Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportRayTracing_), supportRayTracing); } +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportDynamicAttributeStride() const +{ + return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportDynamicAttributeStride)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportDynamicAttributeStride(bool supportDynamicAttributeStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportDynamicAttributeStride_), supportDynamicAttributeStride); +} + _MTL_INLINE NS::UInteger MTL::IndirectCommandBuffer::size() const { return Object::sendMessage(this, _MTL_PRIVATE_SEL(size)); @@ -15094,8 +16093,8 @@ _MTL_ENUM(NS::UInteger, StoreAction) { _MTL_OPTIONS(NS::UInteger, StoreActionOptions) { StoreActionOptionNone = 0, - StoreActionOptionValidMask = 1, StoreActionOptionCustomSamplePositions = 1, + StoreActionOptionValidMask = 1, }; class RenderPassAttachmentDescriptor : public NS::Copying @@ -15879,6 +16878,14 @@ public: void setVertexBuffers(const class Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); + void setVertexBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + + void setVertexBuffers(const class Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range); + + void setVertexBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + + void setVertexBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index); + void setVertexTexture(const class Texture* texture, NS::UInteger index); void setVertexTextures(const class Texture* const textures[], NS::Range range); @@ -16147,6 +17154,26 @@ _MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffers(const MTL::Buffer* Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffers_offsets_withRange_), buffers, offsets, range); } +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); +} + +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffers_offsets_attributeStrides_withRange_), buffers, offsets, strides, range); +} + +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBufferOffset_attributeStride_atIndex_), offset, stride, index); +} + +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBytes_length_attributeStride_atIndex_), bytes, length, stride, index); +} + _MTL_INLINE void MTL::RenderCommandEncoder::setVertexTexture(const MTL::Texture* texture, NS::UInteger index) { Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexTexture_atIndex_), texture, index); @@ -16758,6 +17785,8 @@ public: void setFragmentBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setVertexBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + void drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const class Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const class Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); void drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const class Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const class Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const class Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); @@ -16766,6 +17795,20 @@ public: void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const class Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance); + void setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); + + void setObjectBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger index); + + void setMeshBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger index); + + void drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); + + void drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); + + void setBarrier(); + + void clearBarrier(); + void reset(); }; @@ -16776,6 +17819,8 @@ public: void setKernelBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setKernelBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + void concurrentDispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup); void concurrentDispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup); @@ -16810,6 +17855,11 @@ _MTL_INLINE void MTL::IndirectRenderCommand::setFragmentBuffer(const MTL::Buffer Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentBuffer_offset_atIndex_), buffer, offset, index); } +_MTL_INLINE void MTL::IndirectRenderCommand::setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); +} + _MTL_INLINE void MTL::IndirectRenderCommand::drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride) { Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride_), numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, instanceCount, baseInstance, buffer, offset, instanceStride); @@ -16830,6 +17880,41 @@ _MTL_INLINE void MTL::IndirectRenderCommand::drawIndexedPrimitives(MTL::Primitiv Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance_), primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset, instanceCount, baseVertex, baseInstance); } +_MTL_INLINE void MTL::IndirectRenderCommand::setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectThreadgroupMemoryLength_atIndex_), length, index); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::setObjectBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectBuffer_offset_atIndex_), buffer, offset, index); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::setMeshBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshBuffer_offset_atIndex_), buffer, offset, index); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadgroupsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::setBarrier() +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBarrier)); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::clearBarrier() +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(clearBarrier)); +} + _MTL_INLINE void MTL::IndirectRenderCommand::reset() { Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); @@ -16845,6 +17930,11 @@ _MTL_INLINE void MTL::IndirectComputeCommand::setKernelBuffer(const MTL::Buffer* Object::sendMessage(this, _MTL_PRIVATE_SEL(setKernelBuffer_offset_atIndex_), buffer, offset, index); } +_MTL_INLINE void MTL::IndirectComputeCommand::setKernelBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setKernelBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); +} + _MTL_INLINE void MTL::IndirectComputeCommand::concurrentDispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup) { Object::sendMessage(this, _MTL_PRIVATE_SEL(concurrentDispatchThreadgroups_threadsPerThreadgroup_), threadgroupsPerGrid, threadsPerThreadgroup); @@ -16897,6 +17987,8 @@ _MTL_OPTIONS(NS::UInteger, IntersectionFunctionSignature) { IntersectionFunctionSignatureInstanceMotion = 8, IntersectionFunctionSignaturePrimitiveMotion = 16, IntersectionFunctionSignatureExtendedLimits = 32, + IntersectionFunctionSignatureMaxLevels = 64, + IntersectionFunctionSignatureCurveData = 128, }; class IntersectionFunctionTableDescriptor : public NS::Copying @@ -16929,6 +18021,10 @@ public: void setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range); + void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index); + + void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range); + void setVisibleFunctionTable(const class VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); void setVisibleFunctionTables(const class VisibleFunctionTable* const functionTables[], NS::Range bufferRange); @@ -16996,6 +18092,16 @@ _MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueTriangleIntersectionFu Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_withRange_), signature, range); } +_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueCurveIntersectionFunctionWithSignature_atIndex_), signature, index); +} + +_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueCurveIntersectionFunctionWithSignature_withRange_), signature, range); +} + _MTL_INLINE void MTL::IntersectionFunctionTable::setVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) { Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTable_atBufferIndex_), functionTable, bufferIndex); @@ -17349,6 +18455,8 @@ _MTL_INLINE void MTL::IOFileHandle::setLabel(const NS::String* label) namespace MTL { +using IOCompresionContext=void*; + _MTL_ENUM(NS::Integer, IOCompressionStatus) { IOCompressionStatusComplete = 0, IOCompressionStatusError = 1, @@ -17356,11 +18464,11 @@ _MTL_ENUM(NS::Integer, IOCompressionStatus) { size_t IOCompressionContextDefaultChunkSize(); -void* IOCreateCompressionContext(const char* path, IOCompressionMethod type, size_t chunkSize); +IOCompresionContext IOCreateCompressionContext(const char* path, IOCompressionMethod type, size_t chunkSize); -void IOCompressionContextAppendData(void* context, const void* data, size_t size); +void IOCompressionContextAppendData(IOCompresionContext context, const void* data, size_t size); -IOCompressionStatus IOFlushAndDestroyCompressionContext(void* context); +IOCompressionStatus IOFlushAndDestroyCompressionContext(IOCompresionContext context); } @@ -17982,10 +19090,10 @@ _MTL_ENUM(NS::UInteger, BlendOperation) { _MTL_OPTIONS(NS::UInteger, ColorWriteMask) { ColorWriteMaskNone = 0, - ColorWriteMaskAlpha = 1, - ColorWriteMaskBlue = 2, - ColorWriteMaskGreen = 4, ColorWriteMaskRed = 8, + ColorWriteMaskGreen = 4, + ColorWriteMaskBlue = 2, + ColorWriteMaskAlpha = 1, ColorWriteMaskAll = 15, }; @@ -18385,6 +19493,18 @@ public: MTL::PixelFormat stencilAttachmentPixelFormat() const; void setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat); + bool supportIndirectCommandBuffers() const; + void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers); + + class LinkedFunctions* objectLinkedFunctions() const; + void setObjectLinkedFunctions(const class LinkedFunctions* objectLinkedFunctions); + + class LinkedFunctions* meshLinkedFunctions() const; + void setMeshLinkedFunctions(const class LinkedFunctions* meshLinkedFunctions); + + class LinkedFunctions* fragmentLinkedFunctions() const; + void setFragmentLinkedFunctions(const class LinkedFunctions* fragmentLinkedFunctions); + void reset(); }; @@ -19380,6 +20500,46 @@ _MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setStencilAttachmentPixelFor Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilAttachmentPixelFormat_), stencilAttachmentPixelFormat); } +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::supportIndirectCommandBuffers() const +{ + return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); +} + +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers); +} + +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::objectLinkedFunctions() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectLinkedFunctions)); +} + +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setObjectLinkedFunctions(const MTL::LinkedFunctions* objectLinkedFunctions) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectLinkedFunctions_), objectLinkedFunctions); +} + +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::meshLinkedFunctions() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshLinkedFunctions)); +} + +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMeshLinkedFunctions(const MTL::LinkedFunctions* meshLinkedFunctions) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshLinkedFunctions_), meshLinkedFunctions); +} + +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::fragmentLinkedFunctions() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentLinkedFunctions)); +} + +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setFragmentLinkedFunctions(const MTL::LinkedFunctions* fragmentLinkedFunctions) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentLinkedFunctions_), fragmentLinkedFunctions); +} + _MTL_INLINE void MTL::MeshRenderPipelineDescriptor::reset() { Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); @@ -19855,6 +21015,9 @@ _MTL_INLINE MTL::ResourceID MTL::SamplerState::gpuResourceID() const namespace MTL { + +static const NS::UInteger BufferLayoutStrideDynamic = NS::UIntegerMax; + _MTL_ENUM(NS::UInteger, VertexFormat) { VertexFormatInvalid = 0, VertexFormatUChar2 = 1, @@ -19908,6 +21071,8 @@ _MTL_ENUM(NS::UInteger, VertexFormat) { VertexFormatUShortNormalized = 51, VertexFormatShortNormalized = 52, VertexFormatHalf = 53, + VertexFormatFloatRG11B10 = 54, + VertexFormatFloatRGB9E5 = 55, }; _MTL_ENUM(NS::UInteger, VertexStepFunction) { @@ -20213,12 +21378,1049 @@ _MTL_INLINE void MTL::VisibleFunctionTable::setFunctions(const MTL::FunctionHand Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctions_withRange_), functions, range); } -#define METALCPP_VERSION_MAJOR 306 -#define METALCPP_VERSION_MINOR 5 -#define METALCPP_VERSION_PATCH 16 +#define METALCPP_VERSION_MAJOR 354 +#define METALCPP_VERSION_MINOR 0 +#define METALCPP_VERSION_PATCH 0 #define METALCPP_SUPPORTS_VERSION(major, minor, patch) \ ((major < METALCPP_VERSION_MAJOR) || \ (major == METALCPP_VERSION_MAJOR && minor < METALCPP_VERSION_MINOR) || \ (major == METALCPP_VERSION_MAJOR && minor == METALCPP_VERSION_MINOR && patch <= METALCPP_VERSION_PATCH)) +#define _MTLFX_EXPORT _NS_EXPORT +#define _MTLFX_EXTERN _NS_EXTERN +#define _MTLFX_INLINE _NS_INLINE +#define _MTLFX_PACKED _NS_PACKED + +#define _MTLFX_CONST( type, name ) _NS_CONST( type, name ) +#define _MTLFX_ENUM( type, name ) _NS_ENUM( type, name ) +#define _MTLFX_OPTIONS( type, name ) _NS_OPTIONS( type, name ) + +#define _MTLFX_VALIDATE_SIZE( mtlfx, name ) _NS_VALIDATE_SIZE( mtlfx, name ) +#define _MTLFX_VALIDATE_ENUM( mtlfx, name ) _NS_VALIDATE_ENUM( mtlfx, name ) + +#include + +#define _MTLFX_PRIVATE_CLS( symbol ) ( Private::Class::s_k##symbol ) +#define _MTLFX_PRIVATE_SEL( accessor ) ( Private::Selector::s_k##accessor ) + +#if defined( MTLFX_PRIVATE_IMPLEMENTATION ) + +#if defined( METALCPP_SYMBOL_VISIBILITY_HIDDEN ) +#define _MTLFX_PRIVATE_VISIBILITY __attribute__( ( visibility("hidden" ) ) ) +#else +#define _MTLFX_PRIVATE_VISIBILITY __attribute__( ( visibility("default" ) ) ) +#endif // METALCPP_SYMBOL_VISIBILITY_HIDDEN + +#define _MTLFX_PRIVATE_IMPORT __attribute__( ( weak_import ) ) + +#ifdef __OBJC__ +#define _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) ( ( __bridge void* ) objc_lookUpClass( #symbol ) ) +#define _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) ( ( __bridge void* ) objc_getProtocol( #symbol ) ) +#else +#define _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) objc_lookUpClass(#symbol) +#define _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) objc_getProtocol(#symbol) +#endif // __OBJC__ + +#define _MTLFX_PRIVATE_DEF_CLS( symbol ) void* s_k##symbol _MTLFX_PRIVATE_VISIBILITY = _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) +#define _MTLFX_PRIVATE_DEF_PRO( symbol ) void* s_k##symbol _MTLFX_PRIVATE_VISIBILITY = _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) +#define _MTLFX_PRIVATE_DEF_SEL( accessor, symbol ) SEL s_k##accessor _MTLFX_PRIVATE_VISIBILITY = sel_registerName( symbol ) + +#include +#define MTLFX_DEF_FUNC( name, signature ) using Fn##name = signature; \ + Fn##name name = reinterpret_cast< Fn##name >( dlsym( RTLD_DEFAULT, #name ) ) + +namespace MTLFX::Private +{ + template + + inline _Type const LoadSymbol(const char* pSymbol) + { + const _Type* pAddress = static_cast<_Type*>(dlsym(RTLD_DEFAULT, pSymbol)); + + return pAddress ? *pAddress : nullptr; + } +} // MTLFX::Private + +#if defined( __MAC_13_0 ) || defined( __MAC_14_0 ) || defined( __IPHONE_16_0 ) || defined( __IPHONE_17_0 ) || defined( __TVOS_16_0 ) || defined( __TVOS_17_0 ) + +#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##symbol _MTLFX_PRIVATE_IMPORT; \ + type const MTLFX::symbol = ( nullptr != &MTLFX##symbol ) ? MTLFX##ssymbol : nullptr + +#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##ssymbol _MTLFX_PRIVATE_IMPORT; \ + type const MTLFX::symbol = (nullptr != &MTLFX##ssymbol) ? MTLFX##ssymbol : nullptr + +#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##ssymbol; \ + type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) + +#else + +#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##ssymbol; \ + type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) + +#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##ssymbol; \ + type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) + +#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) _MTLFX_PRIVATE_DEF_CONST( type, symbol ) + +#endif // defined( __MAC_13_0 ) || defined( __MAC_14_0 ) || defined( __IPHONE_16_0 ) || defined( __IPHONE_17_0 ) || defined( __TVOS_16_0 ) || defined( __TVOS_17_0 ) + +#else + +#define _MTLFX_PRIVATE_DEF_CLS( symbol ) extern void* s_k##symbol +#define _MTLFX_PRIVATE_DEF_PRO( symbol ) extern void* s_k##symbol +#define _MTLFX_PRIVATE_DEF_SEL( accessor, symbol ) extern SEL s_k##accessor +#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) extern type const MTLFX::symbol +#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) extern type const MTLFX::symbol +#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) extern type const MTLFX::symbol + +#endif // MTLFX_PRIVATE_IMPLEMENTATION + +namespace MTLFX +{ + namespace Private + { + namespace Class + { + _MTLFX_PRIVATE_DEF_CLS( MTLFXSpatialScalerDescriptor ); + _MTLFX_PRIVATE_DEF_CLS( MTLFXTemporalScalerDescriptor ); + } // Class + } // Private +} // MTLFX + +namespace MTLFX +{ + namespace Private + { + namespace Protocol + { + _MTLFX_PRIVATE_DEF_PRO( MTLFXSpatialScaler ); + _MTLFX_PRIVATE_DEF_PRO( MTLFXTemporalScaler ); + } // Protocol + } // Private +} // MTLFX + +namespace MTLFX +{ + namespace Private + { + namespace Selector + { + _MTLFX_PRIVATE_DEF_SEL( colorProcessingMode, + "colorProcessingMode" ); + _MTLFX_PRIVATE_DEF_SEL( colorTexture, + "colorTexture" ); + _MTLFX_PRIVATE_DEF_SEL( colorTextureFormat, + "colorTextureFormat" ); + _MTLFX_PRIVATE_DEF_SEL( colorTextureUsage, + "colorTextureUsage" ); + _MTLFX_PRIVATE_DEF_SEL( depthTexture, + "depthTexture" ); + _MTLFX_PRIVATE_DEF_SEL( depthTextureFormat, + "depthTextureFormat" ); + _MTLFX_PRIVATE_DEF_SEL( depthTextureUsage, + "depthTextureUsage" ); + _MTLFX_PRIVATE_DEF_SEL( encodeToCommandBuffer_, + "encodeToCommandBuffer:" ); + _MTLFX_PRIVATE_DEF_SEL( exposureTexture, + "exposureTexture" ); + _MTLFX_PRIVATE_DEF_SEL( fence, + "fence" ); + _MTLFX_PRIVATE_DEF_SEL( inputContentHeight, + "inputContentHeight" ); + _MTLFX_PRIVATE_DEF_SEL( inputContentMaxScale, + "inputContentMaxScale" ); + _MTLFX_PRIVATE_DEF_SEL( inputContentMinScale, + "inputContentMinScale" ); + _MTLFX_PRIVATE_DEF_SEL( inputContentWidth, + "inputContentWidth" ); + _MTLFX_PRIVATE_DEF_SEL( inputHeight, + "inputHeight" ); + _MTLFX_PRIVATE_DEF_SEL( inputWidth, + "inputWidth" ); + _MTLFX_PRIVATE_DEF_SEL( isAutoExposureEnabled, + "isAutoExposureEnabled" ); + _MTLFX_PRIVATE_DEF_SEL( isDepthReversed, + "isDepthReversed" ); + _MTLFX_PRIVATE_DEF_SEL( isInputContentPropertiesEnabled, + "isInputContentPropertiesEnabled" ); + _MTLFX_PRIVATE_DEF_SEL( jitterOffsetX, + "jitterOffsetX" ); + _MTLFX_PRIVATE_DEF_SEL( jitterOffsetY, + "jitterOffsetY" ); + _MTLFX_PRIVATE_DEF_SEL( motionTexture, + "motionTexture" ); + _MTLFX_PRIVATE_DEF_SEL( motionTextureFormat, + "motionTextureFormat" ); + _MTLFX_PRIVATE_DEF_SEL( motionTextureUsage, + "motionTextureUsage" ); + _MTLFX_PRIVATE_DEF_SEL( motionVectorScaleX, + "motionVectorScaleX" ); + _MTLFX_PRIVATE_DEF_SEL( motionVectorScaleY, + "motionVectorScaleY" ); + _MTLFX_PRIVATE_DEF_SEL( newSpatialScalerWithDevice_, + "newSpatialScalerWithDevice:" ); + _MTLFX_PRIVATE_DEF_SEL( newTemporalScalerWithDevice_, + "newTemporalScalerWithDevice:" ); + _MTLFX_PRIVATE_DEF_SEL( outputHeight, + "outputHeight" ); + _MTLFX_PRIVATE_DEF_SEL( outputTexture, + "outputTexture" ); + _MTLFX_PRIVATE_DEF_SEL( outputTextureFormat, + "outputTextureFormat" ); + _MTLFX_PRIVATE_DEF_SEL( outputTextureUsage, + "outputTextureUsage" ); + _MTLFX_PRIVATE_DEF_SEL( outputWidth, + "outputWidth" ); + _MTLFX_PRIVATE_DEF_SEL( preExposure, + "preExposure" ); + _MTLFX_PRIVATE_DEF_SEL( reset, + "reset" ); + _MTLFX_PRIVATE_DEF_SEL( setAutoExposureEnabled_, + "setAutoExposureEnabled:" ); + _MTLFX_PRIVATE_DEF_SEL( setColorProcessingMode_, + "setColorProcessingMode:" ); + _MTLFX_PRIVATE_DEF_SEL( setColorTexture_, + "setColorTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setColorTextureFormat_, + "setColorTextureFormat:" ); + _MTLFX_PRIVATE_DEF_SEL( setDepthReversed_, + "setDepthReversed:" ); + _MTLFX_PRIVATE_DEF_SEL( setDepthTexture_, + "setDepthTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setDepthTextureFormat_, + "setDepthTextureFormat:" ); + _MTLFX_PRIVATE_DEF_SEL( setExposureTexture_, + "setExposureTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setFence_, + "setFence:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentHeight_, + "setInputContentHeight:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentMaxScale_, + "setInputContentMaxScale:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentMinScale_, + "setInputContentMinScale:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentPropertiesEnabled_, + "setInputContentPropertiesEnabled:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentWidth_, + "setInputContentWidth:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputHeight_, + "setInputHeight:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputWidth_, + "setInputWidth:" ); + _MTLFX_PRIVATE_DEF_SEL( setJitterOffsetX_, + "setJitterOffsetX:" ); + _MTLFX_PRIVATE_DEF_SEL( setJitterOffsetY_, + "setJitterOffsetY:" ); + _MTLFX_PRIVATE_DEF_SEL( setMotionTexture_, + "setMotionTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setMotionTextureFormat_, + "setMotionTextureFormat:" ); + _MTLFX_PRIVATE_DEF_SEL( setMotionVectorScaleX_, + "setMotionVectorScaleX:" ); + _MTLFX_PRIVATE_DEF_SEL( setMotionVectorScaleY_, + "setMotionVectorScaleY:" ); + _MTLFX_PRIVATE_DEF_SEL( setOutputHeight_, + "setOutputHeight:" ); + _MTLFX_PRIVATE_DEF_SEL( setOutputTexture_, + "setOutputTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setOutputTextureFormat_, + "setOutputTextureFormat:" ); + _MTLFX_PRIVATE_DEF_SEL( setOutputWidth_, + "setOutputWidth:" ); + _MTLFX_PRIVATE_DEF_SEL( setPreExposure_, + "setPreExposure:" ); + _MTLFX_PRIVATE_DEF_SEL( setReset_, + "setReset:" ); + _MTLFX_PRIVATE_DEF_SEL( supportedInputContentMaxScaleForDevice_, + "supportedInputContentMaxScaleForDevice:" ); + _MTLFX_PRIVATE_DEF_SEL( supportedInputContentMinScaleForDevice_, + "supportedInputContentMinScaleForDevice:" ); + _MTLFX_PRIVATE_DEF_SEL( supportsDevice_, + "supportsDevice:" ); + } // Selector + } // Private +} // MTLFX + +namespace MTLFX +{ + _MTLFX_ENUM( NS::Integer, SpatialScalerColorProcessingMode ) + { + SpatialScalerColorProcessingModePerceptual = 0, + SpatialScalerColorProcessingModeLinear = 1, + SpatialScalerColorProcessingModeHDR = 2 + }; + + class SpatialScalerDescriptor : public NS::Copying< SpatialScalerDescriptor > + { + public: + static class SpatialScalerDescriptor* alloc(); + class SpatialScalerDescriptor* init(); + + MTL::PixelFormat colorTextureFormat() const; + void setColorTextureFormat( MTL::PixelFormat format ); + + MTL::PixelFormat outputTextureFormat() const; + void setOutputTextureFormat( MTL::PixelFormat format ); + + NS::UInteger inputWidth() const; + void setInputWidth( NS::UInteger width ); + + NS::UInteger inputHeight() const; + void setInputHeight( NS::UInteger height ); + + NS::UInteger outputWidth() const; + void setOutputWidth( NS::UInteger width ); + + NS::UInteger outputHeight() const; + void setOutputHeight( NS::UInteger height ); + + SpatialScalerColorProcessingMode colorProcessingMode() const; + void setColorProcessingMode( SpatialScalerColorProcessingMode mode ); + + class SpatialScaler* newSpatialScaler( const MTL::Device* pDevice ); + + static bool supportsDevice( const MTL::Device* ); + }; + + class SpatialScaler : public NS::Referencing< SpatialScaler > + { + public: + MTL::TextureUsage colorTextureUsage() const; + MTL::TextureUsage outputTextureUsage() const; + + NS::UInteger inputContentWidth() const; + void setInputContentWidth( NS::UInteger width ); + + NS::UInteger inputContentHeight() const; + void setInputContentHeight( NS::UInteger height ); + + MTL::Texture* colorTexture() const; + void setColorTexture( MTL::Texture* pTexture ); + + MTL::Texture* outputTexture() const; + void setOutputTexture( MTL::Texture* pTexture ); + + MTL::PixelFormat colorTextureFormat() const; + MTL::PixelFormat outputTextureFormat() const; + NS::UInteger inputWidth() const; + NS::UInteger inputHeight() const; + NS::UInteger outputWidth() const; + NS::UInteger outputHeight() const; + SpatialScalerColorProcessingMode colorProcessingMode() const; + + MTL::Fence* fence() const; + void setFence( MTL::Fence* pFence ); + + void encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ); + }; +} + +_MTLFX_INLINE MTLFX::SpatialScalerDescriptor* MTLFX::SpatialScalerDescriptor::alloc() +{ + return NS::Object::alloc< SpatialScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXSpatialScalerDescriptor ) ); +} + +_MTLFX_INLINE MTLFX::SpatialScalerDescriptor* MTLFX::SpatialScalerDescriptor::init() +{ + return NS::Object::init< SpatialScalerDescriptor >(); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScalerDescriptor::colorTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setColorTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorTextureFormat_ ), format ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScalerDescriptor::outputTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputTextureFormat_ ), format ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::inputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setInputWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::inputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setInputHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputHeight_ ), height ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::outputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::outputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputHeight_ ), height ); +} + +_MTLFX_INLINE MTLFX::SpatialScalerColorProcessingMode MTLFX::SpatialScalerDescriptor::colorProcessingMode() const +{ + return Object::sendMessage< SpatialScalerColorProcessingMode >( this, _MTLFX_PRIVATE_SEL( colorProcessingMode ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setColorProcessingMode( SpatialScalerColorProcessingMode mode ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorProcessingMode_ ), mode ); +} + +_MTLFX_INLINE MTLFX::SpatialScaler* MTLFX::SpatialScalerDescriptor::newSpatialScaler( const MTL::Device* pDevice ) +{ + return Object::sendMessage< SpatialScaler* >( this, _MTLFX_PRIVATE_SEL( newSpatialScalerWithDevice_ ), pDevice ); +} + +_MTLFX_INLINE bool MTLFX::SpatialScalerDescriptor::supportsDevice( const MTL::Device* pDevice ) +{ + return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXSpatialScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsDevice_ ), pDevice ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::SpatialScaler::colorTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::SpatialScaler::outputTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::inputContentWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentWidth ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setInputContentWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::inputContentHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentHeight ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setInputContentHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentHeight_ ), height ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::SpatialScaler::colorTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setColorTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::SpatialScaler::outputTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setOutputTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScaler::colorTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScaler::outputTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::inputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::inputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::outputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::outputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); +} + +_MTLFX_INLINE MTLFX::SpatialScalerColorProcessingMode MTLFX::SpatialScaler::colorProcessingMode() const +{ + return Object::sendMessage< SpatialScalerColorProcessingMode >( this, _MTLFX_PRIVATE_SEL( colorProcessingMode ) ); +} + +_MTLFX_INLINE MTL::Fence* MTLFX::SpatialScaler::fence() const +{ + return Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setFence( MTL::Fence* pFence ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setFence_ ), pFence ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer ); +} + +namespace MTLFX +{ + class TemporalScalerDescriptor : public NS::Copying< TemporalScalerDescriptor > + { + public: + static class TemporalScalerDescriptor* alloc(); + class TemporalScalerDescriptor* init(); + + MTL::PixelFormat colorTextureFormat() const; + void setColorTextureFormat( MTL::PixelFormat format ); + + MTL::PixelFormat depthTextureFormat() const; + void setDepthTextureFormat( MTL::PixelFormat format ); + + MTL::PixelFormat motionTextureFormat() const; + void setMotionTextureFormat( MTL::PixelFormat format ); + + MTL::PixelFormat outputTextureFormat() const; + void setOutputTextureFormat( MTL::PixelFormat format ); + + NS::UInteger inputWidth() const; + void setInputWidth( NS::UInteger width ); + + NS::UInteger inputHeight() const; + void setInputHeight( NS::UInteger height ); + + NS::UInteger outputWidth() const; + void setOutputWidth( NS::UInteger width ); + + NS::UInteger outputHeight() const; + void setOutputHeight( NS::UInteger height ); + + bool isAutoExposureEnabled() const; + void setAutoExposureEnabled( bool enabled ); + + bool isInputContentPropertiesEnabled() const; + void setInputContentPropertiesEnabled( bool enabled ); + + float inputContentMinScale() const; + void setInputContentMinScale( float scale ); + + float inputContentMaxScale() const; + void setInputContentMaxScale( float scale ); + + class TemporalScaler* newTemporalScaler( const MTL::Device* pDevice ) const; + + static float supportedInputContentMinScale( const MTL::Device* pDevice ); + static float supportedInputContentMaxScale( const MTL::Device* pDevice ); + + static bool supportsDevice( const MTL::Device* pDevice ); + }; + + class TemporalScaler : public NS::Referencing< TemporalScaler > + { + public: + MTL::TextureUsage colorTextureUsage() const; + MTL::TextureUsage depthTextureUsage() const; + MTL::TextureUsage motionTextureUsage() const; + MTL::TextureUsage outputTextureUsage() const; + + NS::UInteger inputContentWidth() const; + void setInputContentWidth( NS::UInteger width ); + + NS::UInteger inputContentHeight() const; + void setInputContentHeight( NS::UInteger height ); + + MTL::Texture* colorTexture() const; + void setColorTexture( MTL::Texture* pTexture ); + + MTL::Texture* depthTexture() const; + void setDepthTexture( MTL::Texture* pTexture ); + + MTL::Texture* motionTexture() const; + void setMotionTexture( MTL::Texture* pTexture ); + + MTL::Texture* outputTexture() const; + void setOutputTexture( MTL::Texture* pTexture ); + + MTL::Texture* exposureTexture() const; + void setExposureTexture( MTL::Texture* pTexture ); + + float preExposure() const; + void setPreExposure( float preExposure ); + + float jitterOffsetX() const; + void setJitterOffsetX( float offset ); + + float jitterOffsetY() const; + void setJitterOffsetY( float offset ); + + float motionVectorScaleX() const; + void setMotionVectorScaleX( float scale ); + + float motionVectorScaleY() const; + void setMotionVectorScaleY( float scale ); + + bool reset() const; + void setReset( bool reset ); + + bool isDepthReversed() const; + void setDepthReversed( bool depthReversed ); + + MTL::PixelFormat colorTextureFormat() const; + MTL::PixelFormat depthTextureFormat() const; + MTL::PixelFormat motionTextureFormat() const; + MTL::PixelFormat outputTextureFormat() const; + NS::UInteger inputWidth() const; + NS::UInteger inputHeight() const; + NS::UInteger outputWidth() const; + NS::UInteger outputHeight() const; + float inputContentMinScale() const; + float inputContentMaxScale() const; + + MTL::Fence* fence() const; + void setFence( MTL::Fence* pFence ); + + void encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ); + }; +} + +_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::alloc() +{ + return NS::Object::alloc< TemporalScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ) ); +} + +_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::init() +{ + return NS::Object::init< TemporalScalerDescriptor >(); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::colorTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setColorTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorTextureFormat_ ), format ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::depthTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setDepthTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setDepthTextureFormat_ ), format ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::motionTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setMotionTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setMotionTextureFormat_ ), format ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::outputTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputTextureFormat_ ), format ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputHeight_ ), height ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputHeight_ ), height ); +} + +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isAutoExposureEnabled() const +{ + return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isAutoExposureEnabled ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setAutoExposureEnabled( bool enabled ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setAutoExposureEnabled_ ), enabled ); +} + +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isInputContentPropertiesEnabled() const +{ + return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isInputContentPropertiesEnabled ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentPropertiesEnabled( bool enabled ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentPropertiesEnabled_ ), enabled ); +} + +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMinScale() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMinScale( float scale ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentMinScale_ ), scale ); +} + +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMaxScale() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMaxScale( float scale ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentMaxScale_ ), scale ); +} + +_MTLFX_INLINE MTLFX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler( const MTL::Device* pDevice ) const +{ + return Object::sendMessage< TemporalScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalScalerWithDevice_ ), pDevice ); +} + +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMinScale( const MTL::Device* pDevice ) +{ + float scale = 1.0f; + + if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ) ) ) + { + scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ), pDevice ); + } + + return scale; +} + +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMaxScale( const MTL::Device* pDevice ) +{ + float scale = 1.0f; + + if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ) ) ) + { + scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ), pDevice ); + } + else if ( supportsDevice( pDevice ) ) + { + scale = 2.0f; + } + + return scale; +} + +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsDevice( const MTL::Device* pDevice ) +{ + return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsDevice_ ), pDevice ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScaler::colorTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScaler::depthTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScaler::motionTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScaler::outputTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::inputContentWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentWidth ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setInputContentWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::inputContentHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentHeight ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setInputContentHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentHeight_ ), height ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::colorTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setColorTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::depthTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setDepthTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setDepthTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::motionTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setMotionTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setMotionTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::outputTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setOutputTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::exposureTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( exposureTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setExposureTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setExposureTexture_ ), pTexture ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::preExposure() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( preExposure ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setPreExposure( float preExposure ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setPreExposure_ ), preExposure ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::jitterOffsetX() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setJitterOffsetX( float offset ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setJitterOffsetX_ ), offset ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::jitterOffsetY() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setJitterOffsetY( float offset ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setJitterOffsetY_ ), offset ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::motionVectorScaleX() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setMotionVectorScaleX( float scale ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setMotionVectorScaleX_ ), scale ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::motionVectorScaleY() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setMotionVectorScaleY( float scale ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setMotionVectorScaleY_ ), scale ); +} + +_MTLFX_INLINE bool MTLFX::TemporalScaler::reset() const +{ + return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( reset ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setReset( bool reset ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setReset_ ), reset ); +} + +_MTLFX_INLINE bool MTLFX::TemporalScaler::isDepthReversed() const +{ + return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setDepthReversed( bool depthReversed ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setDepthReversed_ ), depthReversed ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScaler::colorTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScaler::depthTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScaler::motionTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScaler::outputTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::inputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::inputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::outputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::outputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::inputContentMinScale() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::inputContentMaxScale() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) ); +} + +_MTLFX_INLINE MTL::Fence* MTLFX::TemporalScaler::fence() const +{ + return Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setFence( MTL::Fence* pFence ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setFence_ ), pFence ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer ); +} + diff --git a/util/test/demos/apple/official/metal-cpp.h b/util/test/demos/apple/official/metal-cpp.h index 87b6f1443..1a3acddcc 100644 --- a/util/test/demos/apple/official/metal-cpp.h +++ b/util/test/demos/apple/official/metal-cpp.h @@ -1,7 +1,7 @@ // // metal-cpp.h // -// Autogenerated on April 10, 2023. +// Autogenerated from commit 9c6e07c61e9642cd343988e9f7840543d2132387. // // Copyright 2020-2023 Apple Inc. // @@ -602,8 +602,8 @@ namespace NS { using TimeInterval = double; -using Integer = std::int64_t; -using UInteger = std::uint64_t; +using Integer = std::int64_t; // RD: intptr_t -> int64_t +using UInteger = std::uint64_t; // RD: intptr_t -> int64_t const Integer IntegerMax = INTPTR_MAX; const Integer IntegerMin = INTPTR_MIN; @@ -808,7 +808,7 @@ _NS_INLINE _Ret NS::Object::sendMessageSafe(const void* pObj, SEL selector, _Arg if constexpr (!std::is_void<_Ret>::value) { - return 0; + return _Ret(0); } } @@ -2823,7 +2823,7 @@ _NS_INLINE NS::SharedPtr<_Class>::SharedPtr() } template -_NS_INLINE NS::SharedPtr<_Class>::~SharedPtr() +_NS_INLINE NS::SharedPtr<_Class>::~SharedPtr<_Class>() { if (m_pObject) { @@ -3349,7 +3349,7 @@ namespace NS::Private::Selector #define _MTL_CONST(type, name) _NS_CONST(type, name) #define _MTL_ENUM(type, name) _NS_ENUM(type, name) -#define _MTL_OPTIONS(type, name) _NS_ENUM(type, name) +#define _MTL_OPTIONS(type, name) _NS_ENUM(type, name) // RD: _NS_OPTIONS -> _NS_ENUM #define _MTL_VALIDATE_SIZE(ns, name) _NS_VALIDATE_SIZE(ns, name) #define _MTL_VALIDATE_ENUM(ns, name) _NS_VALIDATE_ENUM(ns, name) @@ -3399,7 +3399,7 @@ namespace MTL::Private } } // MTL::Private -#if defined(__MAC_10_16) || defined(__MAC_11_0) || defined(__MAC_12_0) || defined(__MAC_13_0) || defined(__IPHONE_14_0) || defined(__IPHONE_15_0) || defined(__IPHONE_16_0) || defined(__TVOS_14_0) || defined(__TVOS_15_0) || defined(__TVOS_16_0) +#if defined(__MAC_10_16) || defined(__MAC_11_0) || defined(__MAC_12_0) || defined(__MAC_13_0) || defined(__MAC_14_0) || defined(__IPHONE_14_0) || defined(__IPHONE_15_0) || defined(__IPHONE_16_0) || defined(__IPHONE_17_0) || defined(__TVOS_14_0) || defined(__TVOS_15_0) || defined(__TVOS_16_0) || defined(__TVOS_17_0) #define _MTL_PRIVATE_DEF_STR(type, symbol) \ _MTL_EXTERN type const MTL##symbol _MTL_PRIVATE_IMPORT; \ @@ -3425,7 +3425,7 @@ namespace MTL::Private #define _MTL_PRIVATE_DEF_WEAK_CONST(type, symbol) _MTL_PRIVATE_DEF_CONST(type, symbol) -#endif // defined(__MAC_10_16) || defined(__MAC_11_0) || defined(__MAC_12_0) || defined(__MAC_13_0) || defined(__IPHONE_14_0) || defined(__IPHONE_15_0) || defined(__IPHONE_16_0) || defined(__TVOS_14_0) || defined(__TVOS_15_0) || defined(__TVOS_16_0) +#endif // defined(__MAC_10_16) || defined(__MAC_11_0) || defined(__MAC_12_0) || defined(__MAC_13_0) || defined(__MAC_14_0) || defined(__IPHONE_14_0) || defined(__IPHONE_15_0) || defined(__IPHONE_16_0) || defined(__IPHONE_17_0) || defined(__TVOS_14_0) || defined(__TVOS_15_0) || defined(__TVOS_16_0) || defined(__TVOS_17_0) #else @@ -3479,14 +3479,17 @@ namespace MTL::Private::Class { _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureBoundingBoxGeometryDescriptor); +_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureCurveGeometryDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureGeometryDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor); +_MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureMotionTriangleGeometryDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassSampleBufferAttachmentDescriptor); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray); _MTL_PRIVATE_DEF_CLS(MTLAccelerationStructureTriangleGeometryDescriptor); +_MTL_PRIVATE_DEF_CLS(MTLArchitecture); _MTL_PRIVATE_DEF_CLS(MTLArgument); _MTL_PRIVATE_DEF_CLS(MTLArgumentDescriptor); _MTL_PRIVATE_DEF_CLS(MTLArrayType); @@ -3520,6 +3523,7 @@ _MTL_PRIVATE_DEF_CLS(MTLFunctionStitchingInputNode); _MTL_PRIVATE_DEF_CLS(MTLHeapDescriptor); _MTL_PRIVATE_DEF_CLS(MTLIOCommandQueueDescriptor); _MTL_PRIVATE_DEF_CLS(MTLIndirectCommandBufferDescriptor); +_MTL_PRIVATE_DEF_CLS(MTLIndirectInstanceAccelerationStructureDescriptor); _MTL_PRIVATE_DEF_CLS(MTLInstanceAccelerationStructureDescriptor); _MTL_PRIVATE_DEF_CLS(MTLIntersectionFunctionDescriptor); _MTL_PRIVATE_DEF_CLS(MTLIntersectionFunctionTableDescriptor); @@ -3684,6 +3688,8 @@ _MTL_PRIVATE_DEF_SEL(allowReferencingUndefinedSymbols, "allowReferencingUndefinedSymbols"); _MTL_PRIVATE_DEF_SEL(alphaBlendOperation, "alphaBlendOperation"); +_MTL_PRIVATE_DEF_SEL(architecture, + "architecture"); _MTL_PRIVATE_DEF_SEL(areBarycentricCoordsSupported, "areBarycentricCoordsSupported"); _MTL_PRIVATE_DEF_SEL(areProgrammableSamplePositionsSupported, @@ -3814,6 +3820,18 @@ _MTL_PRIVATE_DEF_SEL(contents, "contents"); _MTL_PRIVATE_DEF_SEL(controlDependencies, "controlDependencies"); +_MTL_PRIVATE_DEF_SEL(controlPointBuffer, + "controlPointBuffer"); +_MTL_PRIVATE_DEF_SEL(controlPointBufferOffset, + "controlPointBufferOffset"); +_MTL_PRIVATE_DEF_SEL(controlPointBuffers, + "controlPointBuffers"); +_MTL_PRIVATE_DEF_SEL(controlPointCount, + "controlPointCount"); +_MTL_PRIVATE_DEF_SEL(controlPointFormat, + "controlPointFormat"); +_MTL_PRIVATE_DEF_SEL(controlPointStride, + "controlPointStride"); _MTL_PRIVATE_DEF_SEL(convertSparsePixelRegions_toTileRegions_withTileSize_alignmentMode_numRegions_, "convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:"); _MTL_PRIVATE_DEF_SEL(convertSparseTileRegions_toPixelRegions_withTileSize_numRegions_, @@ -3854,6 +3872,12 @@ _MTL_PRIVATE_DEF_SEL(cpuCacheMode, "cpuCacheMode"); _MTL_PRIVATE_DEF_SEL(currentAllocatedSize, "currentAllocatedSize"); +_MTL_PRIVATE_DEF_SEL(curveBasis, + "curveBasis"); +_MTL_PRIVATE_DEF_SEL(curveEndCaps, + "curveEndCaps"); +_MTL_PRIVATE_DEF_SEL(curveType, + "curveType"); _MTL_PRIVATE_DEF_SEL(data, "data"); _MTL_PRIVATE_DEF_SEL(dataSize, @@ -4124,6 +4148,10 @@ _MTL_PRIVATE_DEF_SEL(installName, "installName"); _MTL_PRIVATE_DEF_SEL(instanceCount, "instanceCount"); +_MTL_PRIVATE_DEF_SEL(instanceCountBuffer, + "instanceCountBuffer"); +_MTL_PRIVATE_DEF_SEL(instanceCountBufferOffset, + "instanceCountBufferOffset"); _MTL_PRIVATE_DEF_SEL(instanceDescriptorBuffer, "instanceDescriptorBuffer"); _MTL_PRIVATE_DEF_SEL(instanceDescriptorBufferOffset, @@ -4258,8 +4286,20 @@ _MTL_PRIVATE_DEF_SEL(maxFragmentBufferBindCount, "maxFragmentBufferBindCount"); _MTL_PRIVATE_DEF_SEL(maxFragmentCallStackDepth, "maxFragmentCallStackDepth"); +_MTL_PRIVATE_DEF_SEL(maxInstanceCount, + "maxInstanceCount"); _MTL_PRIVATE_DEF_SEL(maxKernelBufferBindCount, "maxKernelBufferBindCount"); +_MTL_PRIVATE_DEF_SEL(maxKernelThreadgroupMemoryBindCount, + "maxKernelThreadgroupMemoryBindCount"); +_MTL_PRIVATE_DEF_SEL(maxMeshBufferBindCount, + "maxMeshBufferBindCount"); +_MTL_PRIVATE_DEF_SEL(maxMotionTransformCount, + "maxMotionTransformCount"); +_MTL_PRIVATE_DEF_SEL(maxObjectBufferBindCount, + "maxObjectBufferBindCount"); +_MTL_PRIVATE_DEF_SEL(maxObjectThreadgroupMemoryBindCount, + "maxObjectThreadgroupMemoryBindCount"); _MTL_PRIVATE_DEF_SEL(maxSampleCount, "maxSampleCount"); _MTL_PRIVATE_DEF_SEL(maxTessellationFactor, @@ -4304,6 +4344,8 @@ _MTL_PRIVATE_DEF_SEL(meshBuffers, "meshBuffers"); _MTL_PRIVATE_DEF_SEL(meshFunction, "meshFunction"); +_MTL_PRIVATE_DEF_SEL(meshLinkedFunctions, + "meshLinkedFunctions"); _MTL_PRIVATE_DEF_SEL(meshThreadExecutionWidth, "meshThreadExecutionWidth"); _MTL_PRIVATE_DEF_SEL(meshThreadgroupSizeIsMultipleOfThreadExecutionWidth, @@ -4334,6 +4376,10 @@ _MTL_PRIVATE_DEF_SEL(motionTransformBufferOffset, "motionTransformBufferOffset"); _MTL_PRIVATE_DEF_SEL(motionTransformCount, "motionTransformCount"); +_MTL_PRIVATE_DEF_SEL(motionTransformCountBuffer, + "motionTransformCountBuffer"); +_MTL_PRIVATE_DEF_SEL(motionTransformCountBufferOffset, + "motionTransformCountBufferOffset"); _MTL_PRIVATE_DEF_SEL(moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin_, "moveTextureMappingsFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:"); _MTL_PRIVATE_DEF_SEL(mutability, @@ -4420,6 +4466,10 @@ _MTL_PRIVATE_DEF_SEL(newHeapWithDescriptor_, "newHeapWithDescriptor:"); _MTL_PRIVATE_DEF_SEL(newIOCommandQueueWithDescriptor_error_, "newIOCommandQueueWithDescriptor:error:"); +_MTL_PRIVATE_DEF_SEL(newIOFileHandleWithURL_compressionMethod_error_, + "newIOFileHandleWithURL:compressionMethod:error:"); +_MTL_PRIVATE_DEF_SEL(newIOFileHandleWithURL_error_, + "newIOFileHandleWithURL:error:"); _MTL_PRIVATE_DEF_SEL(newIOHandleWithURL_compressionMethod_error_, "newIOHandleWithURL:compressionMethod:error:"); _MTL_PRIVATE_DEF_SEL(newIOHandleWithURL_error_, @@ -4520,6 +4570,8 @@ _MTL_PRIVATE_DEF_SEL(objectBuffers, "objectBuffers"); _MTL_PRIVATE_DEF_SEL(objectFunction, "objectFunction"); +_MTL_PRIVATE_DEF_SEL(objectLinkedFunctions, + "objectLinkedFunctions"); _MTL_PRIVATE_DEF_SEL(objectPayloadAlignment, "objectPayloadAlignment"); _MTL_PRIVATE_DEF_SEL(objectPayloadDataSize, @@ -4618,6 +4670,16 @@ _MTL_PRIVATE_DEF_SEL(pushDebugGroup_, "pushDebugGroup:"); _MTL_PRIVATE_DEF_SEL(rAddressMode, "rAddressMode"); +_MTL_PRIVATE_DEF_SEL(radiusBuffer, + "radiusBuffer"); +_MTL_PRIVATE_DEF_SEL(radiusBufferOffset, + "radiusBufferOffset"); +_MTL_PRIVATE_DEF_SEL(radiusBuffers, + "radiusBuffers"); +_MTL_PRIVATE_DEF_SEL(radiusFormat, + "radiusFormat"); +_MTL_PRIVATE_DEF_SEL(radiusStride, + "radiusStride"); _MTL_PRIVATE_DEF_SEL(rasterSampleCount, "rasterSampleCount"); _MTL_PRIVATE_DEF_SEL(rasterizationRateMap, @@ -4714,6 +4776,10 @@ _MTL_PRIVATE_DEF_SEL(scratchBufferAllocator, "scratchBufferAllocator"); _MTL_PRIVATE_DEF_SEL(screenSize, "screenSize"); +_MTL_PRIVATE_DEF_SEL(segmentControlPointCount, + "segmentControlPointCount"); +_MTL_PRIVATE_DEF_SEL(segmentCount, + "segmentCount"); _MTL_PRIVATE_DEF_SEL(serializeToURL_error_, "serializeToURL:error:"); _MTL_PRIVATE_DEF_SEL(setAccelerationStructure_atBufferIndex_, @@ -4774,14 +4840,22 @@ _MTL_PRIVATE_DEF_SEL(setBuffer_, "setBuffer:"); _MTL_PRIVATE_DEF_SEL(setBuffer_offset_atIndex_, "setBuffer:offset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setBuffer_offset_attributeStride_atIndex_, + "setBuffer:offset:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setBufferIndex_, "setBufferIndex:"); _MTL_PRIVATE_DEF_SEL(setBufferOffset_atIndex_, "setBufferOffset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setBufferOffset_attributeStride_atIndex_, + "setBufferOffset:attributeStride:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setBuffers_offsets_attributeStrides_withRange_, + "setBuffers:offsets:attributeStrides:withRange:"); _MTL_PRIVATE_DEF_SEL(setBuffers_offsets_withRange_, "setBuffers:offsets:withRange:"); _MTL_PRIVATE_DEF_SEL(setBytes_length_atIndex_, "setBytes:length:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setBytes_length_attributeStride_atIndex_, + "setBytes:length:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setCaptureObject_, "setCaptureObject:"); _MTL_PRIVATE_DEF_SEL(setClearColor_, @@ -4822,12 +4896,30 @@ _MTL_PRIVATE_DEF_SEL(setConstantValues_type_withRange_, "setConstantValues:type:withRange:"); _MTL_PRIVATE_DEF_SEL(setControlDependencies_, "setControlDependencies:"); +_MTL_PRIVATE_DEF_SEL(setControlPointBuffer_, + "setControlPointBuffer:"); +_MTL_PRIVATE_DEF_SEL(setControlPointBufferOffset_, + "setControlPointBufferOffset:"); +_MTL_PRIVATE_DEF_SEL(setControlPointBuffers_, + "setControlPointBuffers:"); +_MTL_PRIVATE_DEF_SEL(setControlPointCount_, + "setControlPointCount:"); +_MTL_PRIVATE_DEF_SEL(setControlPointFormat_, + "setControlPointFormat:"); +_MTL_PRIVATE_DEF_SEL(setControlPointStride_, + "setControlPointStride:"); _MTL_PRIVATE_DEF_SEL(setCounterSet_, "setCounterSet:"); _MTL_PRIVATE_DEF_SEL(setCpuCacheMode_, "setCpuCacheMode:"); _MTL_PRIVATE_DEF_SEL(setCullMode_, "setCullMode:"); +_MTL_PRIVATE_DEF_SEL(setCurveBasis_, + "setCurveBasis:"); +_MTL_PRIVATE_DEF_SEL(setCurveEndCaps_, + "setCurveEndCaps:"); +_MTL_PRIVATE_DEF_SEL(setCurveType_, + "setCurveType:"); _MTL_PRIVATE_DEF_SEL(setDataType_, "setDataType:"); _MTL_PRIVATE_DEF_SEL(setDefaultCaptureScope_, @@ -4974,6 +5066,10 @@ _MTL_PRIVATE_DEF_SEL(setInstallName_, "setInstallName:"); _MTL_PRIVATE_DEF_SEL(setInstanceCount_, "setInstanceCount:"); +_MTL_PRIVATE_DEF_SEL(setInstanceCountBuffer_, + "setInstanceCountBuffer:"); +_MTL_PRIVATE_DEF_SEL(setInstanceCountBufferOffset_, + "setInstanceCountBufferOffset:"); _MTL_PRIVATE_DEF_SEL(setInstanceDescriptorBuffer_, "setInstanceDescriptorBuffer:"); _MTL_PRIVATE_DEF_SEL(setInstanceDescriptorBufferOffset_, @@ -4996,6 +5092,8 @@ _MTL_PRIVATE_DEF_SEL(setIntersectionFunctionTables_withRange_, "setIntersectionFunctionTables:withRange:"); _MTL_PRIVATE_DEF_SEL(setKernelBuffer_offset_atIndex_, "setKernelBuffer:offset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setKernelBuffer_offset_attributeStride_atIndex_, + "setKernelBuffer:offset:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setLabel_, "setLabel:"); _MTL_PRIVATE_DEF_SEL(setLanguageVersion_, @@ -5032,8 +5130,20 @@ _MTL_PRIVATE_DEF_SEL(setMaxFragmentBufferBindCount_, "setMaxFragmentBufferBindCount:"); _MTL_PRIVATE_DEF_SEL(setMaxFragmentCallStackDepth_, "setMaxFragmentCallStackDepth:"); +_MTL_PRIVATE_DEF_SEL(setMaxInstanceCount_, + "setMaxInstanceCount:"); _MTL_PRIVATE_DEF_SEL(setMaxKernelBufferBindCount_, "setMaxKernelBufferBindCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxKernelThreadgroupMemoryBindCount_, + "setMaxKernelThreadgroupMemoryBindCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxMeshBufferBindCount_, + "setMaxMeshBufferBindCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxMotionTransformCount_, + "setMaxMotionTransformCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxObjectBufferBindCount_, + "setMaxObjectBufferBindCount:"); +_MTL_PRIVATE_DEF_SEL(setMaxObjectThreadgroupMemoryBindCount_, + "setMaxObjectThreadgroupMemoryBindCount:"); _MTL_PRIVATE_DEF_SEL(setMaxTessellationFactor_, "setMaxTessellationFactor:"); _MTL_PRIVATE_DEF_SEL(setMaxTotalThreadgroupsPerMeshGrid_, @@ -5060,6 +5170,8 @@ _MTL_PRIVATE_DEF_SEL(setMeshBytes_length_atIndex_, "setMeshBytes:length:atIndex:"); _MTL_PRIVATE_DEF_SEL(setMeshFunction_, "setMeshFunction:"); +_MTL_PRIVATE_DEF_SEL(setMeshLinkedFunctions_, + "setMeshLinkedFunctions:"); _MTL_PRIVATE_DEF_SEL(setMeshSamplerState_atIndex_, "setMeshSamplerState:atIndex:"); _MTL_PRIVATE_DEF_SEL(setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex_, @@ -5096,6 +5208,10 @@ _MTL_PRIVATE_DEF_SEL(setMotionTransformBufferOffset_, "setMotionTransformBufferOffset:"); _MTL_PRIVATE_DEF_SEL(setMotionTransformCount_, "setMotionTransformCount:"); +_MTL_PRIVATE_DEF_SEL(setMotionTransformCountBuffer_, + "setMotionTransformCountBuffer:"); +_MTL_PRIVATE_DEF_SEL(setMotionTransformCountBufferOffset_, + "setMotionTransformCountBufferOffset:"); _MTL_PRIVATE_DEF_SEL(setMutability_, "setMutability:"); _MTL_PRIVATE_DEF_SEL(setName_, @@ -5116,6 +5232,8 @@ _MTL_PRIVATE_DEF_SEL(setObjectBytes_length_atIndex_, "setObjectBytes:length:atIndex:"); _MTL_PRIVATE_DEF_SEL(setObjectFunction_, "setObjectFunction:"); +_MTL_PRIVATE_DEF_SEL(setObjectLinkedFunctions_, + "setObjectLinkedFunctions:"); _MTL_PRIVATE_DEF_SEL(setObjectSamplerState_atIndex_, "setObjectSamplerState:atIndex:"); _MTL_PRIVATE_DEF_SEL(setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex_, @@ -5136,6 +5254,10 @@ _MTL_PRIVATE_DEF_SEL(setOffset_, "setOffset:"); _MTL_PRIVATE_DEF_SEL(setOpaque_, "setOpaque:"); +_MTL_PRIVATE_DEF_SEL(setOpaqueCurveIntersectionFunctionWithSignature_atIndex_, + "setOpaqueCurveIntersectionFunctionWithSignature:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setOpaqueCurveIntersectionFunctionWithSignature_withRange_, + "setOpaqueCurveIntersectionFunctionWithSignature:withRange:"); _MTL_PRIVATE_DEF_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_atIndex_, "setOpaqueTriangleIntersectionFunctionWithSignature:atIndex:"); _MTL_PRIVATE_DEF_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_withRange_, @@ -5174,6 +5296,16 @@ _MTL_PRIVATE_DEF_SEL(setPurgeableState_, "setPurgeableState:"); _MTL_PRIVATE_DEF_SEL(setRAddressMode_, "setRAddressMode:"); +_MTL_PRIVATE_DEF_SEL(setRadiusBuffer_, + "setRadiusBuffer:"); +_MTL_PRIVATE_DEF_SEL(setRadiusBufferOffset_, + "setRadiusBufferOffset:"); +_MTL_PRIVATE_DEF_SEL(setRadiusBuffers_, + "setRadiusBuffers:"); +_MTL_PRIVATE_DEF_SEL(setRadiusFormat_, + "setRadiusFormat:"); +_MTL_PRIVATE_DEF_SEL(setRadiusStride_, + "setRadiusStride:"); _MTL_PRIVATE_DEF_SEL(setRasterSampleCount_, "setRasterSampleCount:"); _MTL_PRIVATE_DEF_SEL(setRasterizationEnabled_, @@ -5232,6 +5364,10 @@ _MTL_PRIVATE_DEF_SEL(setScratchBufferAllocator_, "setScratchBufferAllocator:"); _MTL_PRIVATE_DEF_SEL(setScreenSize_, "setScreenSize:"); +_MTL_PRIVATE_DEF_SEL(setSegmentControlPointCount_, + "setSegmentControlPointCount:"); +_MTL_PRIVATE_DEF_SEL(setSegmentCount_, + "setSegmentCount:"); _MTL_PRIVATE_DEF_SEL(setShouldMaximizeConcurrentCompilation_, "setShouldMaximizeConcurrentCompilation:"); _MTL_PRIVATE_DEF_SEL(setSignaledValue_, @@ -5298,6 +5434,8 @@ _MTL_PRIVATE_DEF_SEL(setSupportAddingVertexBinaryFunctions_, "setSupportAddingVertexBinaryFunctions:"); _MTL_PRIVATE_DEF_SEL(setSupportArgumentBuffers_, "setSupportArgumentBuffers:"); +_MTL_PRIVATE_DEF_SEL(setSupportDynamicAttributeStride_, + "setSupportDynamicAttributeStride:"); _MTL_PRIVATE_DEF_SEL(setSupportIndirectCommandBuffers_, "setSupportIndirectCommandBuffers:"); _MTL_PRIVATE_DEF_SEL(setSupportRayTracing_, @@ -5402,16 +5540,24 @@ _MTL_PRIVATE_DEF_SEL(setVertexBuffer_, "setVertexBuffer:"); _MTL_PRIVATE_DEF_SEL(setVertexBuffer_offset_atIndex_, "setVertexBuffer:offset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setVertexBuffer_offset_attributeStride_atIndex_, + "setVertexBuffer:offset:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_, "setVertexBufferOffset:"); _MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_atIndex_, "setVertexBufferOffset:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setVertexBufferOffset_attributeStride_atIndex_, + "setVertexBufferOffset:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setVertexBuffers_, "setVertexBuffers:"); +_MTL_PRIVATE_DEF_SEL(setVertexBuffers_offsets_attributeStrides_withRange_, + "setVertexBuffers:offsets:attributeStrides:withRange:"); _MTL_PRIVATE_DEF_SEL(setVertexBuffers_offsets_withRange_, "setVertexBuffers:offsets:withRange:"); _MTL_PRIVATE_DEF_SEL(setVertexBytes_length_atIndex_, "setVertexBytes:length:atIndex:"); +_MTL_PRIVATE_DEF_SEL(setVertexBytes_length_attributeStride_atIndex_, + "setVertexBytes:length:attributeStride:atIndex:"); _MTL_PRIVATE_DEF_SEL(setVertexDescriptor_, "setVertexDescriptor:"); _MTL_PRIVATE_DEF_SEL(setVertexFormat_, @@ -5550,6 +5696,8 @@ _MTL_PRIVATE_DEF_SEL(supportAddingVertexBinaryFunctions, "supportAddingVertexBinaryFunctions"); _MTL_PRIVATE_DEF_SEL(supportArgumentBuffers, "supportArgumentBuffers"); +_MTL_PRIVATE_DEF_SEL(supportDynamicAttributeStride, + "supportDynamicAttributeStride"); _MTL_PRIVATE_DEF_SEL(supportIndirectCommandBuffers, "supportIndirectCommandBuffers"); _MTL_PRIVATE_DEF_SEL(supportRayTracing, @@ -5758,7 +5906,7 @@ _MTL_PRIVATE_DEF_SEL(writeMask, namespace MTL { -class Drawable; +class Drawable; // RD: forward declare Drawable using DrawablePresentedHandler = void (^)(class Drawable*); using DrawablePresentedHandlerFunction = std::function; @@ -5868,6 +6016,8 @@ _MTL_ENUM(NS::UInteger, PixelFormat) { PixelFormatRG11B10Float = 92, PixelFormatRGB9E5Float = 93, PixelFormatBGR10A2Unorm = 94, + PixelFormatBGR10_XR = 554, + PixelFormatBGR10_XR_sRGB = 555, PixelFormatRG32Uint = 103, PixelFormatRG32Sint = 104, PixelFormatRG32Float = 105, @@ -5876,6 +6026,8 @@ _MTL_ENUM(NS::UInteger, PixelFormat) { PixelFormatRGBA16Uint = 113, PixelFormatRGBA16Sint = 114, PixelFormatRGBA16Float = 115, + PixelFormatBGRA10_XR = 552, + PixelFormatBGRA10_XR_sRGB = 553, PixelFormatRGBA32Uint = 123, PixelFormatRGBA32Sint = 124, PixelFormatRGBA32Float = 125, @@ -5962,10 +6114,6 @@ _MTL_ENUM(NS::UInteger, PixelFormat) { PixelFormatDepth32Float_Stencil8 = 260, PixelFormatX32_Stencil8 = 261, PixelFormatX24_Stencil8 = 262, - PixelFormatBGRA10_XR = 552, - PixelFormatBGRA10_XR_sRGB = 553, - PixelFormatBGR10_XR = 554, - PixelFormatBGR10_XR_sRGB = 555, }; } @@ -6000,17 +6148,17 @@ _MTL_ENUM(NS::UInteger, HazardTrackingMode) { }; _MTL_OPTIONS(NS::UInteger, ResourceOptions) { - ResourceStorageModeShared = 0, - ResourceHazardTrackingModeDefault = 0, ResourceCPUCacheModeDefaultCache = 0, - ResourceOptionCPUCacheModeDefault = 0, ResourceCPUCacheModeWriteCombined = 1, - ResourceOptionCPUCacheModeWriteCombined = 1, + ResourceStorageModeShared = 0, ResourceStorageModeManaged = 16, ResourceStorageModePrivate = 32, ResourceStorageModeMemoryless = 48, + ResourceHazardTrackingModeDefault = 0, ResourceHazardTrackingModeUntracked = 256, ResourceHazardTrackingModeTracked = 512, + ResourceOptionCPUCacheModeDefault = 0, + ResourceOptionCPUCacheModeWriteCombined = 1, }; class Resource : public NS::Referencing @@ -6302,6 +6450,7 @@ _MTL_OPTIONS(NS::UInteger, TextureUsage) { TextureUsageShaderWrite = 2, TextureUsageRenderTarget = 4, TextureUsagePixelFormatView = 16, + TextureUsageShaderAtomic = 32, }; _MTL_ENUM(NS::Integer, TextureCompressionType) { @@ -7125,6 +7274,8 @@ _MTL_ENUM(NS::UInteger, AttributeFormat) { AttributeFormatUShortNormalized = 51, AttributeFormatShortNormalized = 52, AttributeFormatHalf = 53, + AttributeFormatFloatRG11B10 = 54, + AttributeFormatFloatRGB9E5 = 55, }; _MTL_ENUM(NS::UInteger, IndexType) { @@ -7736,6 +7887,140 @@ public: static MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* descriptor(); }; +_MTL_ENUM(NS::Integer, CurveType) { + CurveTypeRound = 0, + CurveTypeFlat = 1, +}; + +_MTL_ENUM(NS::Integer, CurveBasis) { + CurveBasisBSpline = 0, + CurveBasisCatmullRom = 1, + CurveBasisLinear = 2, + CurveBasisBezier = 3, +}; + +_MTL_ENUM(NS::Integer, CurveEndCaps) { + CurveEndCapsNone = 0, + CurveEndCapsDisk = 1, + CurveEndCapsSphere = 2, +}; + +class AccelerationStructureCurveGeometryDescriptor : public NS::Copying +{ +public: + static class AccelerationStructureCurveGeometryDescriptor* alloc(); + + class AccelerationStructureCurveGeometryDescriptor* init(); + + class Buffer* controlPointBuffer() const; + void setControlPointBuffer(const class Buffer* controlPointBuffer); + + NS::UInteger controlPointBufferOffset() const; + void setControlPointBufferOffset(NS::UInteger controlPointBufferOffset); + + NS::UInteger controlPointCount() const; + void setControlPointCount(NS::UInteger controlPointCount); + + NS::UInteger controlPointStride() const; + void setControlPointStride(NS::UInteger controlPointStride); + + MTL::AttributeFormat controlPointFormat() const; + void setControlPointFormat(MTL::AttributeFormat controlPointFormat); + + class Buffer* radiusBuffer() const; + void setRadiusBuffer(const class Buffer* radiusBuffer); + + NS::UInteger radiusBufferOffset() const; + void setRadiusBufferOffset(NS::UInteger radiusBufferOffset); + + MTL::AttributeFormat radiusFormat() const; + void setRadiusFormat(MTL::AttributeFormat radiusFormat); + + NS::UInteger radiusStride() const; + void setRadiusStride(NS::UInteger radiusStride); + + class Buffer* indexBuffer() const; + void setIndexBuffer(const class Buffer* indexBuffer); + + NS::UInteger indexBufferOffset() const; + void setIndexBufferOffset(NS::UInteger indexBufferOffset); + + MTL::IndexType indexType() const; + void setIndexType(MTL::IndexType indexType); + + NS::UInteger segmentCount() const; + void setSegmentCount(NS::UInteger segmentCount); + + NS::UInteger segmentControlPointCount() const; + void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); + + MTL::CurveType curveType() const; + void setCurveType(MTL::CurveType curveType); + + MTL::CurveBasis curveBasis() const; + void setCurveBasis(MTL::CurveBasis curveBasis); + + MTL::CurveEndCaps curveEndCaps() const; + void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); + + static MTL::AccelerationStructureCurveGeometryDescriptor* descriptor(); +}; + +class AccelerationStructureMotionCurveGeometryDescriptor : public NS::Copying +{ +public: + static class AccelerationStructureMotionCurveGeometryDescriptor* alloc(); + + class AccelerationStructureMotionCurveGeometryDescriptor* init(); + + NS::Array* controlPointBuffers() const; + void setControlPointBuffers(const NS::Array* controlPointBuffers); + + NS::UInteger controlPointCount() const; + void setControlPointCount(NS::UInteger controlPointCount); + + NS::UInteger controlPointStride() const; + void setControlPointStride(NS::UInteger controlPointStride); + + MTL::AttributeFormat controlPointFormat() const; + void setControlPointFormat(MTL::AttributeFormat controlPointFormat); + + NS::Array* radiusBuffers() const; + void setRadiusBuffers(const NS::Array* radiusBuffers); + + MTL::AttributeFormat radiusFormat() const; + void setRadiusFormat(MTL::AttributeFormat radiusFormat); + + NS::UInteger radiusStride() const; + void setRadiusStride(NS::UInteger radiusStride); + + class Buffer* indexBuffer() const; + void setIndexBuffer(const class Buffer* indexBuffer); + + NS::UInteger indexBufferOffset() const; + void setIndexBufferOffset(NS::UInteger indexBufferOffset); + + MTL::IndexType indexType() const; + void setIndexType(MTL::IndexType indexType); + + NS::UInteger segmentCount() const; + void setSegmentCount(NS::UInteger segmentCount); + + NS::UInteger segmentControlPointCount() const; + void setSegmentControlPointCount(NS::UInteger segmentControlPointCount); + + MTL::CurveType curveType() const; + void setCurveType(MTL::CurveType curveType); + + MTL::CurveBasis curveBasis() const; + void setCurveBasis(MTL::CurveBasis curveBasis); + + MTL::CurveEndCaps curveEndCaps() const; + void setCurveEndCaps(MTL::CurveEndCaps curveEndCaps); + + static MTL::AccelerationStructureMotionCurveGeometryDescriptor* descriptor(); +}; + struct AccelerationStructureInstanceDescriptor { MTL::PackedFloat4x3 transformationMatrix; @@ -7759,6 +8044,8 @@ _MTL_ENUM(NS::UInteger, AccelerationStructureInstanceDescriptorType) { AccelerationStructureInstanceDescriptorTypeDefault = 0, AccelerationStructureInstanceDescriptorTypeUserID = 1, AccelerationStructureInstanceDescriptorTypeMotion = 2, + AccelerationStructureInstanceDescriptorTypeIndirect = 3, + AccelerationStructureInstanceDescriptorTypeIndirectMotion = 4, }; struct AccelerationStructureMotionInstanceDescriptor @@ -7776,6 +8063,31 @@ struct AccelerationStructureMotionInstanceDescriptor float motionEndTime; } _MTL_PACKED; +struct IndirectAccelerationStructureInstanceDescriptor +{ + MTL::PackedFloat4x3 transformationMatrix; + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t userID; + MTL::ResourceID accelerationStructureID; +} _MTL_PACKED; + +struct IndirectAccelerationStructureMotionInstanceDescriptor +{ + MTL::AccelerationStructureInstanceOptions options; + uint32_t mask; + uint32_t intersectionFunctionTableOffset; + uint32_t userID; + MTL::ResourceID accelerationStructureID; + uint32_t motionTransformsStartIndex; + uint32_t motionTransformsCount; + MTL::MotionBorderMode motionStartBorderMode; + MTL::MotionBorderMode motionEndBorderMode; + float motionStartTime; + float motionEndTime; +} _MTL_PACKED; + class InstanceAccelerationStructureDescriptor : public NS::Copying { public: @@ -7813,6 +8125,52 @@ public: static MTL::InstanceAccelerationStructureDescriptor* descriptor(); }; +class IndirectInstanceAccelerationStructureDescriptor : public NS::Copying +{ +public: + static class IndirectInstanceAccelerationStructureDescriptor* alloc(); + + class IndirectInstanceAccelerationStructureDescriptor* init(); + + class Buffer* instanceDescriptorBuffer() const; + void setInstanceDescriptorBuffer(const class Buffer* instanceDescriptorBuffer); + + NS::UInteger instanceDescriptorBufferOffset() const; + void setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset); + + NS::UInteger instanceDescriptorStride() const; + void setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride); + + NS::UInteger maxInstanceCount() const; + void setMaxInstanceCount(NS::UInteger maxInstanceCount); + + class Buffer* instanceCountBuffer() const; + void setInstanceCountBuffer(const class Buffer* instanceCountBuffer); + + NS::UInteger instanceCountBufferOffset() const; + void setInstanceCountBufferOffset(NS::UInteger instanceCountBufferOffset); + + MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType() const; + void setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType); + + class Buffer* motionTransformBuffer() const; + void setMotionTransformBuffer(const class Buffer* motionTransformBuffer); + + NS::UInteger motionTransformBufferOffset() const; + void setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset); + + NS::UInteger maxMotionTransformCount() const; + void setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount); + + class Buffer* motionTransformCountBuffer() const; + void setMotionTransformCountBuffer(const class Buffer* motionTransformCountBuffer); + + NS::UInteger motionTransformCountBufferOffset() const; + void setMotionTransformCountBufferOffset(NS::UInteger motionTransformCountBufferOffset); + + static MTL::IndirectInstanceAccelerationStructureDescriptor* descriptor(); +}; + class AccelerationStructure : public NS::Referencing { public: @@ -8363,6 +8721,356 @@ _MTL_INLINE MTL::AccelerationStructureMotionBoundingBoxGeometryDescriptor* MTL:: return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); } +_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::alloc() +{ + return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureCurveGeometryDescriptor)); +} + +_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::init() +{ + return NS::Object::init(); +} + +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::controlPointBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBuffer)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointBuffer(const MTL::Buffer* controlPointBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBuffer_), controlPointBuffer); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBufferOffset)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointBufferOffset(NS::UInteger controlPointBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBufferOffset_), controlPointBufferOffset); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointCount_), controlPointCount); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::controlPointStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointStride)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointStride_), controlPointStride); +} + +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureCurveGeometryDescriptor::controlPointFormat() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointFormat)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointFormat_), controlPointFormat); +} + +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::radiusBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBuffer)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusBuffer(const MTL::Buffer* radiusBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBuffer_), radiusBuffer); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::radiusBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBufferOffset)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusBufferOffset(NS::UInteger radiusBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBufferOffset_), radiusBufferOffset); +} + +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureCurveGeometryDescriptor::radiusFormat() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusFormat)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusFormat_), radiusFormat); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::radiusStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusStride)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusStride_), radiusStride); +} + +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureCurveGeometryDescriptor::indexBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexBuffer(const MTL::Buffer* indexBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::indexBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferOffset)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferOffset_), indexBufferOffset); +} + +_MTL_INLINE MTL::IndexType MTL::AccelerationStructureCurveGeometryDescriptor::indexType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::segmentCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentCount_), segmentCount); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureCurveGeometryDescriptor::segmentControlPointCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentControlPointCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentControlPointCount_), segmentControlPointCount); +} + +_MTL_INLINE MTL::CurveType MTL::AccelerationStructureCurveGeometryDescriptor::curveType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveType)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveType_), curveType); +} + +_MTL_INLINE MTL::CurveBasis MTL::AccelerationStructureCurveGeometryDescriptor::curveBasis() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveBasis)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveBasis_), curveBasis); +} + +_MTL_INLINE MTL::CurveEndCaps MTL::AccelerationStructureCurveGeometryDescriptor::curveEndCaps() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveEndCaps)); +} + +_MTL_INLINE void MTL::AccelerationStructureCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveEndCaps_), curveEndCaps); +} + +_MTL_INLINE MTL::AccelerationStructureCurveGeometryDescriptor* MTL::AccelerationStructureCurveGeometryDescriptor::descriptor() +{ + return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureCurveGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); +} + +_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::alloc() +{ + return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor)); +} + +_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::init() +{ + return NS::Object::init(); +} + +_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointBuffers() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointBuffers)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointBuffers(const NS::Array* controlPointBuffers) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointBuffers_), controlPointBuffers); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointCount(NS::UInteger controlPointCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointCount_), controlPointCount); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointStride)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointStride(NS::UInteger controlPointStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointStride_), controlPointStride); +} + +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionCurveGeometryDescriptor::controlPointFormat() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(controlPointFormat)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setControlPointFormat(MTL::AttributeFormat controlPointFormat) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setControlPointFormat_), controlPointFormat); +} + +_MTL_INLINE NS::Array* MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusBuffers() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusBuffers)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusBuffers(const NS::Array* radiusBuffers) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusBuffers_), radiusBuffers); +} + +_MTL_INLINE MTL::AttributeFormat MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusFormat() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusFormat)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusFormat(MTL::AttributeFormat radiusFormat) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusFormat_), radiusFormat); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::radiusStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(radiusStride)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setRadiusStride(NS::UInteger radiusStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setRadiusStride_), radiusStride); +} + +_MTL_INLINE MTL::Buffer* MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBuffer)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBuffer(const MTL::Buffer* indexBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBuffer_), indexBuffer); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexBufferOffset)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexBufferOffset(NS::UInteger indexBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexBufferOffset_), indexBufferOffset); +} + +_MTL_INLINE MTL::IndexType MTL::AccelerationStructureMotionCurveGeometryDescriptor::indexType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(indexType)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setIndexType(MTL::IndexType indexType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setIndexType_), indexType); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::segmentCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentCount(NS::UInteger segmentCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentCount_), segmentCount); +} + +_MTL_INLINE NS::UInteger MTL::AccelerationStructureMotionCurveGeometryDescriptor::segmentControlPointCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(segmentControlPointCount)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setSegmentControlPointCount(NS::UInteger segmentControlPointCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSegmentControlPointCount_), segmentControlPointCount); +} + +_MTL_INLINE MTL::CurveType MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveType)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveType(MTL::CurveType curveType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveType_), curveType); +} + +_MTL_INLINE MTL::CurveBasis MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveBasis() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveBasis)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveBasis(MTL::CurveBasis curveBasis) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveBasis_), curveBasis); +} + +_MTL_INLINE MTL::CurveEndCaps MTL::AccelerationStructureMotionCurveGeometryDescriptor::curveEndCaps() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(curveEndCaps)); +} + +_MTL_INLINE void MTL::AccelerationStructureMotionCurveGeometryDescriptor::setCurveEndCaps(MTL::CurveEndCaps curveEndCaps) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setCurveEndCaps_), curveEndCaps); +} + +_MTL_INLINE MTL::AccelerationStructureMotionCurveGeometryDescriptor* MTL::AccelerationStructureMotionCurveGeometryDescriptor::descriptor() +{ + return Object::sendMessage(_MTL_PRIVATE_CLS(MTLAccelerationStructureMotionCurveGeometryDescriptor), _MTL_PRIVATE_SEL(descriptor)); +} + _MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerationStructureDescriptor::alloc() { return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLInstanceAccelerationStructureDescriptor)); @@ -8468,6 +9176,141 @@ _MTL_INLINE MTL::InstanceAccelerationStructureDescriptor* MTL::InstanceAccelerat return Object::sendMessage(_MTL_PRIVATE_CLS(MTLInstanceAccelerationStructureDescriptor), _MTL_PRIVATE_SEL(descriptor)); } +_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::alloc() +{ + return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLIndirectInstanceAccelerationStructureDescriptor)); +} + +_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::init() +{ + return NS::Object::init(); +} + +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBuffer)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBuffer(const MTL::Buffer* instanceDescriptorBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBuffer_), instanceDescriptorBuffer); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorBufferOffset)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorBufferOffset(NS::UInteger instanceDescriptorBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorBufferOffset_), instanceDescriptorBufferOffset); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorStride() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorStride)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorStride(NS::UInteger instanceDescriptorStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorStride_), instanceDescriptorStride); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::maxInstanceCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxInstanceCount)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMaxInstanceCount(NS::UInteger maxInstanceCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxInstanceCount_), maxInstanceCount); +} + +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::instanceCountBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCountBuffer)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBuffer(const MTL::Buffer* instanceCountBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCountBuffer_), instanceCountBuffer); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::instanceCountBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceCountBufferOffset)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceCountBufferOffset(NS::UInteger instanceCountBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceCountBufferOffset_), instanceCountBufferOffset); +} + +_MTL_INLINE MTL::AccelerationStructureInstanceDescriptorType MTL::IndirectInstanceAccelerationStructureDescriptor::instanceDescriptorType() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(instanceDescriptorType)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setInstanceDescriptorType(MTL::AccelerationStructureInstanceDescriptorType instanceDescriptorType) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setInstanceDescriptorType_), instanceDescriptorType); +} + +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBuffer)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBuffer(const MTL::Buffer* motionTransformBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBuffer_), motionTransformBuffer); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformBufferOffset)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformBufferOffset(NS::UInteger motionTransformBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformBufferOffset_), motionTransformBufferOffset); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::maxMotionTransformCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxMotionTransformCount)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMaxMotionTransformCount(NS::UInteger maxMotionTransformCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxMotionTransformCount_), maxMotionTransformCount); +} + +_MTL_INLINE MTL::Buffer* MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBuffer() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCountBuffer)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBuffer(const MTL::Buffer* motionTransformCountBuffer) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCountBuffer_), motionTransformCountBuffer); +} + +_MTL_INLINE NS::UInteger MTL::IndirectInstanceAccelerationStructureDescriptor::motionTransformCountBufferOffset() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(motionTransformCountBufferOffset)); +} + +_MTL_INLINE void MTL::IndirectInstanceAccelerationStructureDescriptor::setMotionTransformCountBufferOffset(NS::UInteger motionTransformCountBufferOffset) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMotionTransformCountBufferOffset_), motionTransformCountBufferOffset); +} + +_MTL_INLINE MTL::IndirectInstanceAccelerationStructureDescriptor* MTL::IndirectInstanceAccelerationStructureDescriptor::descriptor() +{ + return Object::sendMessage(_MTL_PRIVATE_CLS(MTLIndirectInstanceAccelerationStructureDescriptor), _MTL_PRIVATE_SEL(descriptor)); +} + _MTL_INLINE NS::UInteger MTL::AccelerationStructure::size() const { return Object::sendMessage(this, _MTL_PRIVATE_SEL(size)); @@ -8576,6 +9419,10 @@ _MTL_ENUM(NS::UInteger, DataType) { DataTypeIntersectionFunctionTable = 116, DataTypePrimitiveAccelerationStructure = 117, DataTypeInstanceAccelerationStructure = 118, + DataTypeBFloat = 121, + DataTypeBFloat2 = 122, + DataTypeBFloat3 = 123, + DataTypeBFloat4 = 124, }; _MTL_ENUM(NS::Integer, BindingType) { @@ -8605,7 +9452,10 @@ _MTL_ENUM(NS::UInteger, ArgumentType) { ArgumentTypeIntersectionFunctionTable = 27, }; -_MTL_ENUM(NS::UInteger, ArgumentAccess) { +_MTL_ENUM(NS::UInteger, BindingAccess) { + BindingAccessReadOnly = 0, + BindingAccessReadWrite = 1, + BindingAccessWriteOnly = 2, ArgumentAccessReadOnly = 0, ArgumentAccessReadWrite = 1, ArgumentAccessWriteOnly = 2, @@ -8690,7 +9540,7 @@ public: MTL::DataType elementType() const; - MTL::ArgumentAccess access() const; + MTL::BindingAccess access() const; NS::UInteger alignment() const; @@ -8714,7 +9564,7 @@ public: MTL::TextureType textureType() const; - MTL::ArgumentAccess access() const; + MTL::BindingAccess access() const; bool isDepthTexture() const; }; @@ -8730,7 +9580,7 @@ public: MTL::ArgumentType type() const; - MTL::ArgumentAccess access() const; + MTL::BindingAccess access() const; NS::UInteger index() const; @@ -8762,17 +9612,17 @@ public: class Binding : public NS::Referencing { public: - NS::String* name() const; + NS::String* name() const; - MTL::BindingType type() const; + MTL::BindingType type() const; - MTL::ArgumentAccess access() const; + MTL::BindingAccess access() const; - NS::UInteger index() const; + NS::UInteger index() const; - bool used() const; + bool used() const; - bool argument() const; + bool argument() const; }; class BufferBinding : public NS::Referencing @@ -8969,9 +9819,9 @@ _MTL_INLINE MTL::DataType MTL::PointerType::elementType() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(elementType)); } -_MTL_INLINE MTL::ArgumentAccess MTL::PointerType::access() const +_MTL_INLINE MTL::BindingAccess MTL::PointerType::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } _MTL_INLINE NS::UInteger MTL::PointerType::alignment() const @@ -9019,9 +9869,9 @@ _MTL_INLINE MTL::TextureType MTL::TextureReferenceType::textureType() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(textureType)); } -_MTL_INLINE MTL::ArgumentAccess MTL::TextureReferenceType::access() const +_MTL_INLINE MTL::BindingAccess MTL::TextureReferenceType::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } _MTL_INLINE bool MTL::TextureReferenceType::isDepthTexture() const @@ -9049,9 +9899,9 @@ _MTL_INLINE MTL::ArgumentType MTL::Argument::type() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); } -_MTL_INLINE MTL::ArgumentAccess MTL::Argument::access() const +_MTL_INLINE MTL::BindingAccess MTL::Argument::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } _MTL_INLINE NS::UInteger MTL::Argument::index() const @@ -9129,9 +9979,9 @@ _MTL_INLINE MTL::BindingType MTL::Binding::type() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(type)); } -_MTL_INLINE MTL::ArgumentAccess MTL::Binding::access() const +_MTL_INLINE MTL::BindingAccess MTL::Binding::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } _MTL_INLINE NS::UInteger MTL::Binding::index() const @@ -9520,6 +10370,9 @@ _MTL_INLINE MTL::AccelerationStructurePassSampleBufferAttachmentDescriptorArray* namespace MTL { + +static const NS::UInteger AttributeStrideStatic = NS::UIntegerMax; + class ArgumentEncoder : public NS::Referencing { public: @@ -10445,8 +11298,8 @@ _MTL_ENUM(NS::UInteger, CommandBufferError) { CommandBufferErrorInternal = 1, CommandBufferErrorTimeout = 2, CommandBufferErrorPageFault = 3, - CommandBufferErrorAccessRevoked = 4, CommandBufferErrorBlacklisted = 4, + CommandBufferErrorAccessRevoked = 4, CommandBufferErrorNotPermitted = 7, CommandBufferErrorOutOfMemory = 8, CommandBufferErrorInvalidResource = 9, @@ -10918,6 +11771,14 @@ public: void setBuffers(const class Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); + void setBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + + void setBuffers(const class Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range); + + void setBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + + void setBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index); + void setVisibleFunctionTable(const class VisibleFunctionTable* visibleFunctionTable, NS::UInteger bufferIndex); void setVisibleFunctionTables(const class VisibleFunctionTable* const visibleFunctionTables[], NS::Range range); @@ -11009,6 +11870,26 @@ _MTL_INLINE void MTL::ComputeCommandEncoder::setBuffers(const MTL::Buffer* const Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffers_offsets_withRange_), buffers, offsets, range); } +_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); +} + +_MTL_INLINE void MTL::ComputeCommandEncoder::setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBuffers_offsets_attributeStrides_withRange_), buffers, offsets, strides, range); +} + +_MTL_INLINE void MTL::ComputeCommandEncoder::setBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBufferOffset_attributeStride_atIndex_), offset, stride, index); +} + +_MTL_INLINE void MTL::ComputeCommandEncoder::setBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBytes_length_attributeStride_atIndex_), bytes, length, stride, index); +} + _MTL_INLINE void MTL::ComputeCommandEncoder::setVisibleFunctionTable(const MTL::VisibleFunctionTable* visibleFunctionTable, NS::UInteger bufferIndex) { Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTable_atBufferIndex_), visibleFunctionTable, bufferIndex); @@ -12088,8 +12969,8 @@ _MTL_ENUM(NS::UInteger, FeatureSet) { FeatureSet_OSX_GPUFamily1_v1 = 10000, FeatureSet_macOS_GPUFamily1_v2 = 10001, FeatureSet_OSX_GPUFamily1_v2 = 10001, - FeatureSet_OSX_ReadWriteTextureTier2 = 10002, FeatureSet_macOS_ReadWriteTextureTier2 = 10002, + FeatureSet_OSX_ReadWriteTextureTier2 = 10002, FeatureSet_macOS_GPUFamily1_v3 = 10003, FeatureSet_macOS_GPUFamily1_v4 = 10004, FeatureSet_macOS_GPUFamily2_v1 = 10005, @@ -12115,6 +12996,7 @@ _MTL_ENUM(NS::Integer, GPUFamily) { GPUFamilyApple6 = 1006, GPUFamilyApple7 = 1007, GPUFamilyApple8 = 1008, + GPUFamilyApple9 = 1009, GPUFamilyMac1 = 2001, GPUFamilyMac2 = 2002, GPUFamilyCommon1 = 3001, @@ -12200,8 +13082,8 @@ public: NS::UInteger arrayLength() const; void setArrayLength(NS::UInteger arrayLength); - MTL::ArgumentAccess access() const; - void setAccess(MTL::ArgumentAccess access); + MTL::BindingAccess access() const; + void setAccess(MTL::BindingAccess access); MTL::TextureType textureType() const; void setTextureType(MTL::TextureType textureType); @@ -12210,6 +13092,16 @@ public: void setConstantBlockAlignment(NS::UInteger constantBlockAlignment); }; +class Architecture : public NS::Copying +{ +public: + static class Architecture* alloc(); + + class Architecture* init(); + + NS::String* name() const; +}; + using DeviceNotificationName = NS::String*; _MTL_CONST(DeviceNotificationName, DeviceWasAddedNotification); _MTL_CONST(DeviceNotificationName, DeviceRemovalRequestedNotification); @@ -12281,6 +13173,8 @@ public: uint64_t registryID() const; + class Architecture* architecture() const; + MTL::Size maxThreadsPerThreadgroup() const; bool lowPower() const; @@ -12443,6 +13337,10 @@ public: class IOFileHandle* newIOHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error); + class IOFileHandle* newIOFileHandle(const NS::URL* url, NS::Error** error); + + class IOFileHandle* newIOFileHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error); + MTL::Size sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount); NS::UInteger sparseTileSizeInBytes() const; @@ -12552,12 +13450,12 @@ _MTL_INLINE void MTL::ArgumentDescriptor::setArrayLength(NS::UInteger arrayLengt Object::sendMessage(this, _MTL_PRIVATE_SEL(setArrayLength_), arrayLength); } -_MTL_INLINE MTL::ArgumentAccess MTL::ArgumentDescriptor::access() const +_MTL_INLINE MTL::BindingAccess MTL::ArgumentDescriptor::access() const { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(access)); } -_MTL_INLINE void MTL::ArgumentDescriptor::setAccess(MTL::ArgumentAccess access) +_MTL_INLINE void MTL::ArgumentDescriptor::setAccess(MTL::BindingAccess access) { Object::sendMessage(this, _MTL_PRIVATE_SEL(setAccess_), access); } @@ -12582,6 +13480,21 @@ _MTL_INLINE void MTL::ArgumentDescriptor::setConstantBlockAlignment(NS::UInteger Object::sendMessage(this, _MTL_PRIVATE_SEL(setConstantBlockAlignment_), constantBlockAlignment); } +_MTL_INLINE MTL::Architecture* MTL::Architecture::alloc() +{ + return NS::Object::alloc(_MTL_PRIVATE_CLS(MTLArchitecture)); +} + +_MTL_INLINE MTL::Architecture* MTL::Architecture::init() +{ + return NS::Object::init(); +} + +_MTL_INLINE NS::String* MTL::Architecture::name() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(name)); +} + _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceWasAddedNotification); _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceRemovalRequestedNotification); _MTL_PRIVATE_DEF_WEAK_CONST(MTL::DeviceNotificationName, DeviceWasRemovedNotification); @@ -12712,6 +13625,11 @@ _MTL_INLINE uint64_t MTL::Device::registryID() const return Object::sendMessage(this, _MTL_PRIVATE_SEL(registryID)); } +_MTL_INLINE MTL::Architecture* MTL::Device::architecture() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(architecture)); +} + _MTL_INLINE MTL::Size MTL::Device::maxThreadsPerThreadgroup() const { return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxThreadsPerThreadgroup)); @@ -13117,6 +14035,16 @@ _MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOHandle(const NS::URL* url, MTL: return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOHandleWithURL_compressionMethod_error_), url, compressionMethod, error); } +_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(const NS::URL* url, NS::Error** error) +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOFileHandleWithURL_error_), url, error); +} + +_MTL_INLINE MTL::IOFileHandle* MTL::Device::newIOFileHandle(const NS::URL* url, MTL::IOCompressionMethod compressionMethod, NS::Error** error) +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(newIOFileHandleWithURL_compressionMethod_error_), url, compressionMethod, error); +} + _MTL_INLINE MTL::Size MTL::Device::sparseTileSize(MTL::TextureType textureType, MTL::PixelFormat pixelFormat, NS::UInteger sampleCount) { return Object::sendMessage(this, _MTL_PRIVATE_SEL(sparseTileSizeWithTextureType_pixelFormat_sampleCount_), textureType, pixelFormat, sampleCount); @@ -13534,6 +14462,7 @@ namespace MTL _MTL_OPTIONS(NS::UInteger, FunctionOptions) { FunctionOptionNone = 0, FunctionOptionCompileToBinary = 1, + FunctionOptionStoreFunctionInMetalScript = 2, }; class FunctionDescriptor : public NS::Copying @@ -13767,6 +14696,7 @@ _MTL_ENUM(NS::UInteger, LanguageVersion) { LanguageVersion2_3 = 131075, LanguageVersion2_4 = 131076, LanguageVersion3_0 = 196608, + LanguageVersion3_1 = 196609, }; _MTL_ENUM(NS::Integer, LibraryType) { @@ -14366,6 +15296,7 @@ namespace MTL { class FunctionStitchingAttribute : public NS::Referencing { +public: }; class FunctionStitchingAttributeAlwaysInline : public NS::Referencing @@ -14378,6 +15309,7 @@ public: class FunctionStitchingNode : public NS::Copying { +public: }; class FunctionStitchingInputNode : public NS::Referencing @@ -14680,7 +15612,7 @@ public: class Buffer* newBuffer(NS::UInteger length, MTL::ResourceOptions options); - class Texture* newTexture(const class TextureDescriptor* desc); + class Texture* newTexture(const class TextureDescriptor* descriptor); MTL::PurgeableState setPurgeableState(MTL::PurgeableState state); @@ -14841,9 +15773,9 @@ _MTL_INLINE MTL::Buffer* MTL::Heap::newBuffer(NS::UInteger length, MTL::Resource return Object::sendMessage(this, _MTL_PRIVATE_SEL(newBufferWithLength_options_), length, options); } -_MTL_INLINE MTL::Texture* MTL::Heap::newTexture(const MTL::TextureDescriptor* desc) +_MTL_INLINE MTL::Texture* MTL::Heap::newTexture(const MTL::TextureDescriptor* descriptor) { - return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_), desc); + return Object::sendMessage(this, _MTL_PRIVATE_SEL(newTextureWithDescriptor_), descriptor); } _MTL_INLINE MTL::PurgeableState MTL::Heap::setPurgeableState(MTL::PurgeableState state) @@ -14897,6 +15829,8 @@ _MTL_OPTIONS(NS::UInteger, IndirectCommandType) { IndirectCommandTypeDrawIndexedPatches = 8, IndirectCommandTypeConcurrentDispatch = 32, IndirectCommandTypeConcurrentDispatchThreads = 64, + IndirectCommandTypeDrawMeshThreadgroups = 128, + IndirectCommandTypeDrawMeshThreads = 256, }; struct IndirectCommandBufferExecutionRange @@ -14930,8 +15864,23 @@ public: NS::UInteger maxKernelBufferBindCount() const; void setMaxKernelBufferBindCount(NS::UInteger maxKernelBufferBindCount); + NS::UInteger maxKernelThreadgroupMemoryBindCount() const; + void setMaxKernelThreadgroupMemoryBindCount(NS::UInteger maxKernelThreadgroupMemoryBindCount); + + NS::UInteger maxObjectBufferBindCount() const; + void setMaxObjectBufferBindCount(NS::UInteger maxObjectBufferBindCount); + + NS::UInteger maxMeshBufferBindCount() const; + void setMaxMeshBufferBindCount(NS::UInteger maxMeshBufferBindCount); + + NS::UInteger maxObjectThreadgroupMemoryBindCount() const; + void setMaxObjectThreadgroupMemoryBindCount(NS::UInteger maxObjectThreadgroupMemoryBindCount); + bool supportRayTracing() const; void setSupportRayTracing(bool supportRayTracing); + + bool supportDynamicAttributeStride() const; + void setSupportDynamicAttributeStride(bool supportDynamicAttributeStride); }; class IndirectCommandBuffer : public NS::Referencing @@ -15020,6 +15969,46 @@ _MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxKernelBufferBindCou Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxKernelBufferBindCount_), maxKernelBufferBindCount); } +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxKernelThreadgroupMemoryBindCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxKernelThreadgroupMemoryBindCount)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxKernelThreadgroupMemoryBindCount(NS::UInteger maxKernelThreadgroupMemoryBindCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxKernelThreadgroupMemoryBindCount_), maxKernelThreadgroupMemoryBindCount); +} + +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxObjectBufferBindCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxObjectBufferBindCount)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxObjectBufferBindCount(NS::UInteger maxObjectBufferBindCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxObjectBufferBindCount_), maxObjectBufferBindCount); +} + +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxMeshBufferBindCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxMeshBufferBindCount)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxMeshBufferBindCount(NS::UInteger maxMeshBufferBindCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxMeshBufferBindCount_), maxMeshBufferBindCount); +} + +_MTL_INLINE NS::UInteger MTL::IndirectCommandBufferDescriptor::maxObjectThreadgroupMemoryBindCount() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(maxObjectThreadgroupMemoryBindCount)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setMaxObjectThreadgroupMemoryBindCount(NS::UInteger maxObjectThreadgroupMemoryBindCount) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMaxObjectThreadgroupMemoryBindCount_), maxObjectThreadgroupMemoryBindCount); +} + _MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportRayTracing() const { return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportRayTracing)); @@ -15030,6 +16019,16 @@ _MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportRayTracing(bool Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportRayTracing_), supportRayTracing); } +_MTL_INLINE bool MTL::IndirectCommandBufferDescriptor::supportDynamicAttributeStride() const +{ + return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportDynamicAttributeStride)); +} + +_MTL_INLINE void MTL::IndirectCommandBufferDescriptor::setSupportDynamicAttributeStride(bool supportDynamicAttributeStride) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportDynamicAttributeStride_), supportDynamicAttributeStride); +} + _MTL_INLINE NS::UInteger MTL::IndirectCommandBuffer::size() const { return Object::sendMessage(this, _MTL_PRIVATE_SEL(size)); @@ -15094,8 +16093,8 @@ _MTL_ENUM(NS::UInteger, StoreAction) { _MTL_OPTIONS(NS::UInteger, StoreActionOptions) { StoreActionOptionNone = 0, - StoreActionOptionValidMask = 1, StoreActionOptionCustomSamplePositions = 1, + StoreActionOptionValidMask = 1, }; class RenderPassAttachmentDescriptor : public NS::Copying @@ -15879,6 +16878,14 @@ public: void setVertexBuffers(const class Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range); + void setVertexBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + + void setVertexBuffers(const class Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range); + + void setVertexBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + + void setVertexBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index); + void setVertexTexture(const class Texture* texture, NS::UInteger index); void setVertexTextures(const class Texture* const textures[], NS::Range range); @@ -16147,6 +17154,26 @@ _MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffers(const MTL::Buffer* Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffers_offsets_withRange_), buffers, offsets, range); } +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); +} + +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBuffers(const MTL::Buffer* const buffers[], const NS::UInteger* offsets, const NS::UInteger* strides, NS::Range range) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffers_offsets_attributeStrides_withRange_), buffers, offsets, strides, range); +} + +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBufferOffset(NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBufferOffset_attributeStride_atIndex_), offset, stride, index); +} + +_MTL_INLINE void MTL::RenderCommandEncoder::setVertexBytes(const void* bytes, NS::UInteger length, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBytes_length_attributeStride_atIndex_), bytes, length, stride, index); +} + _MTL_INLINE void MTL::RenderCommandEncoder::setVertexTexture(const MTL::Texture* texture, NS::UInteger index) { Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexTexture_atIndex_), texture, index); @@ -16758,6 +17785,8 @@ public: void setFragmentBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setVertexBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + void drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const class Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const class Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); void drawIndexedPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const class Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, const class Buffer* controlPointIndexBuffer, NS::UInteger controlPointIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const class Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride); @@ -16766,6 +17795,20 @@ public: void drawIndexedPrimitives(MTL::PrimitiveType primitiveType, NS::UInteger indexCount, MTL::IndexType indexType, const class Buffer* indexBuffer, NS::UInteger indexBufferOffset, NS::UInteger instanceCount, NS::Integer baseVertex, NS::UInteger baseInstance); + void setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index); + + void setObjectBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger index); + + void setMeshBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger index); + + void drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); + + void drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup); + + void setBarrier(); + + void clearBarrier(); + void reset(); }; @@ -16776,6 +17819,8 @@ public: void setKernelBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger index); + void setKernelBuffer(const class Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index); + void concurrentDispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup); void concurrentDispatchThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerThreadgroup); @@ -16810,6 +17855,11 @@ _MTL_INLINE void MTL::IndirectRenderCommand::setFragmentBuffer(const MTL::Buffer Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentBuffer_offset_atIndex_), buffer, offset, index); } +_MTL_INLINE void MTL::IndirectRenderCommand::setVertexBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setVertexBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); +} + _MTL_INLINE void MTL::IndirectRenderCommand::drawPatches(NS::UInteger numberOfPatchControlPoints, NS::UInteger patchStart, NS::UInteger patchCount, const MTL::Buffer* patchIndexBuffer, NS::UInteger patchIndexBufferOffset, NS::UInteger instanceCount, NS::UInteger baseInstance, const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger instanceStride) { Object::sendMessage(this, _MTL_PRIVATE_SEL(drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance_tessellationFactorBuffer_tessellationFactorBufferOffset_tessellationFactorBufferInstanceStride_), numberOfPatchControlPoints, patchStart, patchCount, patchIndexBuffer, patchIndexBufferOffset, instanceCount, baseInstance, buffer, offset, instanceStride); @@ -16830,6 +17880,41 @@ _MTL_INLINE void MTL::IndirectRenderCommand::drawIndexedPrimitives(MTL::Primitiv Object::sendMessage(this, _MTL_PRIVATE_SEL(drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance_), primitiveType, indexCount, indexType, indexBuffer, indexBufferOffset, instanceCount, baseVertex, baseInstance); } +_MTL_INLINE void MTL::IndirectRenderCommand::setObjectThreadgroupMemoryLength(NS::UInteger length, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectThreadgroupMemoryLength_atIndex_), length, index); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::setObjectBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectBuffer_offset_atIndex_), buffer, offset, index); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::setMeshBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshBuffer_offset_atIndex_), buffer, offset, index); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::drawMeshThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadgroupsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::drawMeshThreads(MTL::Size threadsPerGrid, MTL::Size threadsPerObjectThreadgroup, MTL::Size threadsPerMeshThreadgroup) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup_), threadsPerGrid, threadsPerObjectThreadgroup, threadsPerMeshThreadgroup); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::setBarrier() +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setBarrier)); +} + +_MTL_INLINE void MTL::IndirectRenderCommand::clearBarrier() +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(clearBarrier)); +} + _MTL_INLINE void MTL::IndirectRenderCommand::reset() { Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); @@ -16845,6 +17930,11 @@ _MTL_INLINE void MTL::IndirectComputeCommand::setKernelBuffer(const MTL::Buffer* Object::sendMessage(this, _MTL_PRIVATE_SEL(setKernelBuffer_offset_atIndex_), buffer, offset, index); } +_MTL_INLINE void MTL::IndirectComputeCommand::setKernelBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger stride, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setKernelBuffer_offset_attributeStride_atIndex_), buffer, offset, stride, index); +} + _MTL_INLINE void MTL::IndirectComputeCommand::concurrentDispatchThreadgroups(MTL::Size threadgroupsPerGrid, MTL::Size threadsPerThreadgroup) { Object::sendMessage(this, _MTL_PRIVATE_SEL(concurrentDispatchThreadgroups_threadsPerThreadgroup_), threadgroupsPerGrid, threadsPerThreadgroup); @@ -16897,6 +17987,8 @@ _MTL_OPTIONS(NS::UInteger, IntersectionFunctionSignature) { IntersectionFunctionSignatureInstanceMotion = 8, IntersectionFunctionSignaturePrimitiveMotion = 16, IntersectionFunctionSignatureExtendedLimits = 32, + IntersectionFunctionSignatureMaxLevels = 64, + IntersectionFunctionSignatureCurveData = 128, }; class IntersectionFunctionTableDescriptor : public NS::Copying @@ -16929,6 +18021,10 @@ public: void setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range); + void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index); + + void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range); + void setVisibleFunctionTable(const class VisibleFunctionTable* functionTable, NS::UInteger bufferIndex); void setVisibleFunctionTables(const class VisibleFunctionTable* const functionTables[], NS::Range bufferRange); @@ -16996,6 +18092,16 @@ _MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueTriangleIntersectionFu Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueTriangleIntersectionFunctionWithSignature_withRange_), signature, range); } +_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueCurveIntersectionFunctionWithSignature_atIndex_), signature, index); +} + +_MTL_INLINE void MTL::IntersectionFunctionTable::setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setOpaqueCurveIntersectionFunctionWithSignature_withRange_), signature, range); +} + _MTL_INLINE void MTL::IntersectionFunctionTable::setVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex) { Object::sendMessage(this, _MTL_PRIVATE_SEL(setVisibleFunctionTable_atBufferIndex_), functionTable, bufferIndex); @@ -17349,6 +18455,8 @@ _MTL_INLINE void MTL::IOFileHandle::setLabel(const NS::String* label) namespace MTL { +using IOCompresionContext=void*; + _MTL_ENUM(NS::Integer, IOCompressionStatus) { IOCompressionStatusComplete = 0, IOCompressionStatusError = 1, @@ -17356,11 +18464,11 @@ _MTL_ENUM(NS::Integer, IOCompressionStatus) { size_t IOCompressionContextDefaultChunkSize(); -void* IOCreateCompressionContext(const char* path, IOCompressionMethod type, size_t chunkSize); +IOCompresionContext IOCreateCompressionContext(const char* path, IOCompressionMethod type, size_t chunkSize); -void IOCompressionContextAppendData(void* context, const void* data, size_t size); +void IOCompressionContextAppendData(IOCompresionContext context, const void* data, size_t size); -IOCompressionStatus IOFlushAndDestroyCompressionContext(void* context); +IOCompressionStatus IOFlushAndDestroyCompressionContext(IOCompresionContext context); } @@ -17982,10 +19090,10 @@ _MTL_ENUM(NS::UInteger, BlendOperation) { _MTL_OPTIONS(NS::UInteger, ColorWriteMask) { ColorWriteMaskNone = 0, - ColorWriteMaskAlpha = 1, - ColorWriteMaskBlue = 2, - ColorWriteMaskGreen = 4, ColorWriteMaskRed = 8, + ColorWriteMaskGreen = 4, + ColorWriteMaskBlue = 2, + ColorWriteMaskAlpha = 1, ColorWriteMaskAll = 15, }; @@ -18385,6 +19493,18 @@ public: MTL::PixelFormat stencilAttachmentPixelFormat() const; void setStencilAttachmentPixelFormat(MTL::PixelFormat stencilAttachmentPixelFormat); + bool supportIndirectCommandBuffers() const; + void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers); + + class LinkedFunctions* objectLinkedFunctions() const; + void setObjectLinkedFunctions(const class LinkedFunctions* objectLinkedFunctions); + + class LinkedFunctions* meshLinkedFunctions() const; + void setMeshLinkedFunctions(const class LinkedFunctions* meshLinkedFunctions); + + class LinkedFunctions* fragmentLinkedFunctions() const; + void setFragmentLinkedFunctions(const class LinkedFunctions* fragmentLinkedFunctions); + void reset(); }; @@ -19380,6 +20500,46 @@ _MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setStencilAttachmentPixelFor Object::sendMessage(this, _MTL_PRIVATE_SEL(setStencilAttachmentPixelFormat_), stencilAttachmentPixelFormat); } +_MTL_INLINE bool MTL::MeshRenderPipelineDescriptor::supportIndirectCommandBuffers() const +{ + return Object::sendMessageSafe(this, _MTL_PRIVATE_SEL(supportIndirectCommandBuffers)); +} + +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setSupportIndirectCommandBuffers_), supportIndirectCommandBuffers); +} + +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::objectLinkedFunctions() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(objectLinkedFunctions)); +} + +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setObjectLinkedFunctions(const MTL::LinkedFunctions* objectLinkedFunctions) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setObjectLinkedFunctions_), objectLinkedFunctions); +} + +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::meshLinkedFunctions() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(meshLinkedFunctions)); +} + +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setMeshLinkedFunctions(const MTL::LinkedFunctions* meshLinkedFunctions) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setMeshLinkedFunctions_), meshLinkedFunctions); +} + +_MTL_INLINE MTL::LinkedFunctions* MTL::MeshRenderPipelineDescriptor::fragmentLinkedFunctions() const +{ + return Object::sendMessage(this, _MTL_PRIVATE_SEL(fragmentLinkedFunctions)); +} + +_MTL_INLINE void MTL::MeshRenderPipelineDescriptor::setFragmentLinkedFunctions(const MTL::LinkedFunctions* fragmentLinkedFunctions) +{ + Object::sendMessage(this, _MTL_PRIVATE_SEL(setFragmentLinkedFunctions_), fragmentLinkedFunctions); +} + _MTL_INLINE void MTL::MeshRenderPipelineDescriptor::reset() { Object::sendMessage(this, _MTL_PRIVATE_SEL(reset)); @@ -19855,6 +21015,9 @@ _MTL_INLINE MTL::ResourceID MTL::SamplerState::gpuResourceID() const namespace MTL { + +static const NS::UInteger BufferLayoutStrideDynamic = NS::UIntegerMax; + _MTL_ENUM(NS::UInteger, VertexFormat) { VertexFormatInvalid = 0, VertexFormatUChar2 = 1, @@ -19908,6 +21071,8 @@ _MTL_ENUM(NS::UInteger, VertexFormat) { VertexFormatUShortNormalized = 51, VertexFormatShortNormalized = 52, VertexFormatHalf = 53, + VertexFormatFloatRG11B10 = 54, + VertexFormatFloatRGB9E5 = 55, }; _MTL_ENUM(NS::UInteger, VertexStepFunction) { @@ -20213,12 +21378,1049 @@ _MTL_INLINE void MTL::VisibleFunctionTable::setFunctions(const MTL::FunctionHand Object::sendMessage(this, _MTL_PRIVATE_SEL(setFunctions_withRange_), functions, range); } -#define METALCPP_VERSION_MAJOR 306 -#define METALCPP_VERSION_MINOR 5 -#define METALCPP_VERSION_PATCH 16 +#define METALCPP_VERSION_MAJOR 354 +#define METALCPP_VERSION_MINOR 0 +#define METALCPP_VERSION_PATCH 0 #define METALCPP_SUPPORTS_VERSION(major, minor, patch) \ ((major < METALCPP_VERSION_MAJOR) || \ (major == METALCPP_VERSION_MAJOR && minor < METALCPP_VERSION_MINOR) || \ (major == METALCPP_VERSION_MAJOR && minor == METALCPP_VERSION_MINOR && patch <= METALCPP_VERSION_PATCH)) +#define _MTLFX_EXPORT _NS_EXPORT +#define _MTLFX_EXTERN _NS_EXTERN +#define _MTLFX_INLINE _NS_INLINE +#define _MTLFX_PACKED _NS_PACKED + +#define _MTLFX_CONST( type, name ) _NS_CONST( type, name ) +#define _MTLFX_ENUM( type, name ) _NS_ENUM( type, name ) +#define _MTLFX_OPTIONS( type, name ) _NS_OPTIONS( type, name ) + +#define _MTLFX_VALIDATE_SIZE( mtlfx, name ) _NS_VALIDATE_SIZE( mtlfx, name ) +#define _MTLFX_VALIDATE_ENUM( mtlfx, name ) _NS_VALIDATE_ENUM( mtlfx, name ) + +#include + +#define _MTLFX_PRIVATE_CLS( symbol ) ( Private::Class::s_k##symbol ) +#define _MTLFX_PRIVATE_SEL( accessor ) ( Private::Selector::s_k##accessor ) + +#if defined( MTLFX_PRIVATE_IMPLEMENTATION ) + +#if defined( METALCPP_SYMBOL_VISIBILITY_HIDDEN ) +#define _MTLFX_PRIVATE_VISIBILITY __attribute__( ( visibility("hidden" ) ) ) +#else +#define _MTLFX_PRIVATE_VISIBILITY __attribute__( ( visibility("default" ) ) ) +#endif // METALCPP_SYMBOL_VISIBILITY_HIDDEN + +#define _MTLFX_PRIVATE_IMPORT __attribute__( ( weak_import ) ) + +#ifdef __OBJC__ +#define _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) ( ( __bridge void* ) objc_lookUpClass( #symbol ) ) +#define _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) ( ( __bridge void* ) objc_getProtocol( #symbol ) ) +#else +#define _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) objc_lookUpClass(#symbol) +#define _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) objc_getProtocol(#symbol) +#endif // __OBJC__ + +#define _MTLFX_PRIVATE_DEF_CLS( symbol ) void* s_k##symbol _MTLFX_PRIVATE_VISIBILITY = _MTLFX_PRIVATE_OBJC_LOOKUP_CLASS( symbol ) +#define _MTLFX_PRIVATE_DEF_PRO( symbol ) void* s_k##symbol _MTLFX_PRIVATE_VISIBILITY = _MTLFX_PRIVATE_OBJC_GET_PROTOCOL( symbol ) +#define _MTLFX_PRIVATE_DEF_SEL( accessor, symbol ) SEL s_k##accessor _MTLFX_PRIVATE_VISIBILITY = sel_registerName( symbol ) + +#include +#define MTLFX_DEF_FUNC( name, signature ) using Fn##name = signature; \ + Fn##name name = reinterpret_cast< Fn##name >( dlsym( RTLD_DEFAULT, #name ) ) + +namespace MTLFX::Private +{ + template + + inline _Type const LoadSymbol(const char* pSymbol) + { + const _Type* pAddress = static_cast<_Type*>(dlsym(RTLD_DEFAULT, pSymbol)); + + return pAddress ? *pAddress : nullptr; + } +} // MTLFX::Private + +#if defined( __MAC_13_0 ) || defined( __MAC_14_0 ) || defined( __IPHONE_16_0 ) || defined( __IPHONE_17_0 ) || defined( __TVOS_16_0 ) || defined( __TVOS_17_0 ) + +#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##symbol _MTLFX_PRIVATE_IMPORT; \ + type const MTLFX::symbol = ( nullptr != &MTLFX##symbol ) ? MTLFX##ssymbol : nullptr + +#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##ssymbol _MTLFX_PRIVATE_IMPORT; \ + type const MTLFX::symbol = (nullptr != &MTLFX##ssymbol) ? MTLFX##ssymbol : nullptr + +#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##ssymbol; \ + type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) + +#else + +#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##ssymbol; \ + type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) + +#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) \ + _MTLFX_EXTERN type const MTLFX##ssymbol; \ + type const MTLFX::symbol = Private::LoadSymbol< type >( "MTLFX" #symbol ) + +#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) _MTLFX_PRIVATE_DEF_CONST( type, symbol ) + +#endif // defined( __MAC_13_0 ) || defined( __MAC_14_0 ) || defined( __IPHONE_16_0 ) || defined( __IPHONE_17_0 ) || defined( __TVOS_16_0 ) || defined( __TVOS_17_0 ) + +#else + +#define _MTLFX_PRIVATE_DEF_CLS( symbol ) extern void* s_k##symbol +#define _MTLFX_PRIVATE_DEF_PRO( symbol ) extern void* s_k##symbol +#define _MTLFX_PRIVATE_DEF_SEL( accessor, symbol ) extern SEL s_k##accessor +#define _MTLFX_PRIVATE_DEF_STR( type, symbol ) extern type const MTLFX::symbol +#define _MTLFX_PRIVATE_DEF_CONST( type, symbol ) extern type const MTLFX::symbol +#define _MTLFX_PRIVATE_DEF_WEAK_CONST( type, symbol ) extern type const MTLFX::symbol + +#endif // MTLFX_PRIVATE_IMPLEMENTATION + +namespace MTLFX +{ + namespace Private + { + namespace Class + { + _MTLFX_PRIVATE_DEF_CLS( MTLFXSpatialScalerDescriptor ); + _MTLFX_PRIVATE_DEF_CLS( MTLFXTemporalScalerDescriptor ); + } // Class + } // Private +} // MTLFX + +namespace MTLFX +{ + namespace Private + { + namespace Protocol + { + _MTLFX_PRIVATE_DEF_PRO( MTLFXSpatialScaler ); + _MTLFX_PRIVATE_DEF_PRO( MTLFXTemporalScaler ); + } // Protocol + } // Private +} // MTLFX + +namespace MTLFX +{ + namespace Private + { + namespace Selector + { + _MTLFX_PRIVATE_DEF_SEL( colorProcessingMode, + "colorProcessingMode" ); + _MTLFX_PRIVATE_DEF_SEL( colorTexture, + "colorTexture" ); + _MTLFX_PRIVATE_DEF_SEL( colorTextureFormat, + "colorTextureFormat" ); + _MTLFX_PRIVATE_DEF_SEL( colorTextureUsage, + "colorTextureUsage" ); + _MTLFX_PRIVATE_DEF_SEL( depthTexture, + "depthTexture" ); + _MTLFX_PRIVATE_DEF_SEL( depthTextureFormat, + "depthTextureFormat" ); + _MTLFX_PRIVATE_DEF_SEL( depthTextureUsage, + "depthTextureUsage" ); + _MTLFX_PRIVATE_DEF_SEL( encodeToCommandBuffer_, + "encodeToCommandBuffer:" ); + _MTLFX_PRIVATE_DEF_SEL( exposureTexture, + "exposureTexture" ); + _MTLFX_PRIVATE_DEF_SEL( fence, + "fence" ); + _MTLFX_PRIVATE_DEF_SEL( inputContentHeight, + "inputContentHeight" ); + _MTLFX_PRIVATE_DEF_SEL( inputContentMaxScale, + "inputContentMaxScale" ); + _MTLFX_PRIVATE_DEF_SEL( inputContentMinScale, + "inputContentMinScale" ); + _MTLFX_PRIVATE_DEF_SEL( inputContentWidth, + "inputContentWidth" ); + _MTLFX_PRIVATE_DEF_SEL( inputHeight, + "inputHeight" ); + _MTLFX_PRIVATE_DEF_SEL( inputWidth, + "inputWidth" ); + _MTLFX_PRIVATE_DEF_SEL( isAutoExposureEnabled, + "isAutoExposureEnabled" ); + _MTLFX_PRIVATE_DEF_SEL( isDepthReversed, + "isDepthReversed" ); + _MTLFX_PRIVATE_DEF_SEL( isInputContentPropertiesEnabled, + "isInputContentPropertiesEnabled" ); + _MTLFX_PRIVATE_DEF_SEL( jitterOffsetX, + "jitterOffsetX" ); + _MTLFX_PRIVATE_DEF_SEL( jitterOffsetY, + "jitterOffsetY" ); + _MTLFX_PRIVATE_DEF_SEL( motionTexture, + "motionTexture" ); + _MTLFX_PRIVATE_DEF_SEL( motionTextureFormat, + "motionTextureFormat" ); + _MTLFX_PRIVATE_DEF_SEL( motionTextureUsage, + "motionTextureUsage" ); + _MTLFX_PRIVATE_DEF_SEL( motionVectorScaleX, + "motionVectorScaleX" ); + _MTLFX_PRIVATE_DEF_SEL( motionVectorScaleY, + "motionVectorScaleY" ); + _MTLFX_PRIVATE_DEF_SEL( newSpatialScalerWithDevice_, + "newSpatialScalerWithDevice:" ); + _MTLFX_PRIVATE_DEF_SEL( newTemporalScalerWithDevice_, + "newTemporalScalerWithDevice:" ); + _MTLFX_PRIVATE_DEF_SEL( outputHeight, + "outputHeight" ); + _MTLFX_PRIVATE_DEF_SEL( outputTexture, + "outputTexture" ); + _MTLFX_PRIVATE_DEF_SEL( outputTextureFormat, + "outputTextureFormat" ); + _MTLFX_PRIVATE_DEF_SEL( outputTextureUsage, + "outputTextureUsage" ); + _MTLFX_PRIVATE_DEF_SEL( outputWidth, + "outputWidth" ); + _MTLFX_PRIVATE_DEF_SEL( preExposure, + "preExposure" ); + _MTLFX_PRIVATE_DEF_SEL( reset, + "reset" ); + _MTLFX_PRIVATE_DEF_SEL( setAutoExposureEnabled_, + "setAutoExposureEnabled:" ); + _MTLFX_PRIVATE_DEF_SEL( setColorProcessingMode_, + "setColorProcessingMode:" ); + _MTLFX_PRIVATE_DEF_SEL( setColorTexture_, + "setColorTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setColorTextureFormat_, + "setColorTextureFormat:" ); + _MTLFX_PRIVATE_DEF_SEL( setDepthReversed_, + "setDepthReversed:" ); + _MTLFX_PRIVATE_DEF_SEL( setDepthTexture_, + "setDepthTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setDepthTextureFormat_, + "setDepthTextureFormat:" ); + _MTLFX_PRIVATE_DEF_SEL( setExposureTexture_, + "setExposureTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setFence_, + "setFence:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentHeight_, + "setInputContentHeight:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentMaxScale_, + "setInputContentMaxScale:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentMinScale_, + "setInputContentMinScale:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentPropertiesEnabled_, + "setInputContentPropertiesEnabled:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputContentWidth_, + "setInputContentWidth:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputHeight_, + "setInputHeight:" ); + _MTLFX_PRIVATE_DEF_SEL( setInputWidth_, + "setInputWidth:" ); + _MTLFX_PRIVATE_DEF_SEL( setJitterOffsetX_, + "setJitterOffsetX:" ); + _MTLFX_PRIVATE_DEF_SEL( setJitterOffsetY_, + "setJitterOffsetY:" ); + _MTLFX_PRIVATE_DEF_SEL( setMotionTexture_, + "setMotionTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setMotionTextureFormat_, + "setMotionTextureFormat:" ); + _MTLFX_PRIVATE_DEF_SEL( setMotionVectorScaleX_, + "setMotionVectorScaleX:" ); + _MTLFX_PRIVATE_DEF_SEL( setMotionVectorScaleY_, + "setMotionVectorScaleY:" ); + _MTLFX_PRIVATE_DEF_SEL( setOutputHeight_, + "setOutputHeight:" ); + _MTLFX_PRIVATE_DEF_SEL( setOutputTexture_, + "setOutputTexture:" ); + _MTLFX_PRIVATE_DEF_SEL( setOutputTextureFormat_, + "setOutputTextureFormat:" ); + _MTLFX_PRIVATE_DEF_SEL( setOutputWidth_, + "setOutputWidth:" ); + _MTLFX_PRIVATE_DEF_SEL( setPreExposure_, + "setPreExposure:" ); + _MTLFX_PRIVATE_DEF_SEL( setReset_, + "setReset:" ); + _MTLFX_PRIVATE_DEF_SEL( supportedInputContentMaxScaleForDevice_, + "supportedInputContentMaxScaleForDevice:" ); + _MTLFX_PRIVATE_DEF_SEL( supportedInputContentMinScaleForDevice_, + "supportedInputContentMinScaleForDevice:" ); + _MTLFX_PRIVATE_DEF_SEL( supportsDevice_, + "supportsDevice:" ); + } // Selector + } // Private +} // MTLFX + +namespace MTLFX +{ + _MTLFX_ENUM( NS::Integer, SpatialScalerColorProcessingMode ) + { + SpatialScalerColorProcessingModePerceptual = 0, + SpatialScalerColorProcessingModeLinear = 1, + SpatialScalerColorProcessingModeHDR = 2 + }; + + class SpatialScalerDescriptor : public NS::Copying< SpatialScalerDescriptor > + { + public: + static class SpatialScalerDescriptor* alloc(); + class SpatialScalerDescriptor* init(); + + MTL::PixelFormat colorTextureFormat() const; + void setColorTextureFormat( MTL::PixelFormat format ); + + MTL::PixelFormat outputTextureFormat() const; + void setOutputTextureFormat( MTL::PixelFormat format ); + + NS::UInteger inputWidth() const; + void setInputWidth( NS::UInteger width ); + + NS::UInteger inputHeight() const; + void setInputHeight( NS::UInteger height ); + + NS::UInteger outputWidth() const; + void setOutputWidth( NS::UInteger width ); + + NS::UInteger outputHeight() const; + void setOutputHeight( NS::UInteger height ); + + SpatialScalerColorProcessingMode colorProcessingMode() const; + void setColorProcessingMode( SpatialScalerColorProcessingMode mode ); + + class SpatialScaler* newSpatialScaler( const MTL::Device* pDevice ); + + static bool supportsDevice( const MTL::Device* ); + }; + + class SpatialScaler : public NS::Referencing< SpatialScaler > + { + public: + MTL::TextureUsage colorTextureUsage() const; + MTL::TextureUsage outputTextureUsage() const; + + NS::UInteger inputContentWidth() const; + void setInputContentWidth( NS::UInteger width ); + + NS::UInteger inputContentHeight() const; + void setInputContentHeight( NS::UInteger height ); + + MTL::Texture* colorTexture() const; + void setColorTexture( MTL::Texture* pTexture ); + + MTL::Texture* outputTexture() const; + void setOutputTexture( MTL::Texture* pTexture ); + + MTL::PixelFormat colorTextureFormat() const; + MTL::PixelFormat outputTextureFormat() const; + NS::UInteger inputWidth() const; + NS::UInteger inputHeight() const; + NS::UInteger outputWidth() const; + NS::UInteger outputHeight() const; + SpatialScalerColorProcessingMode colorProcessingMode() const; + + MTL::Fence* fence() const; + void setFence( MTL::Fence* pFence ); + + void encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ); + }; +} + +_MTLFX_INLINE MTLFX::SpatialScalerDescriptor* MTLFX::SpatialScalerDescriptor::alloc() +{ + return NS::Object::alloc< SpatialScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXSpatialScalerDescriptor ) ); +} + +_MTLFX_INLINE MTLFX::SpatialScalerDescriptor* MTLFX::SpatialScalerDescriptor::init() +{ + return NS::Object::init< SpatialScalerDescriptor >(); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScalerDescriptor::colorTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setColorTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorTextureFormat_ ), format ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScalerDescriptor::outputTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputTextureFormat_ ), format ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::inputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setInputWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::inputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setInputHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputHeight_ ), height ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::outputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScalerDescriptor::outputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setOutputHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputHeight_ ), height ); +} + +_MTLFX_INLINE MTLFX::SpatialScalerColorProcessingMode MTLFX::SpatialScalerDescriptor::colorProcessingMode() const +{ + return Object::sendMessage< SpatialScalerColorProcessingMode >( this, _MTLFX_PRIVATE_SEL( colorProcessingMode ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScalerDescriptor::setColorProcessingMode( SpatialScalerColorProcessingMode mode ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorProcessingMode_ ), mode ); +} + +_MTLFX_INLINE MTLFX::SpatialScaler* MTLFX::SpatialScalerDescriptor::newSpatialScaler( const MTL::Device* pDevice ) +{ + return Object::sendMessage< SpatialScaler* >( this, _MTLFX_PRIVATE_SEL( newSpatialScalerWithDevice_ ), pDevice ); +} + +_MTLFX_INLINE bool MTLFX::SpatialScalerDescriptor::supportsDevice( const MTL::Device* pDevice ) +{ + return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXSpatialScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsDevice_ ), pDevice ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::SpatialScaler::colorTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::SpatialScaler::outputTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::inputContentWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentWidth ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setInputContentWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::inputContentHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentHeight ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setInputContentHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentHeight_ ), height ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::SpatialScaler::colorTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setColorTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::SpatialScaler::outputTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setOutputTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScaler::colorTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::SpatialScaler::outputTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::inputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::inputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::outputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::SpatialScaler::outputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); +} + +_MTLFX_INLINE MTLFX::SpatialScalerColorProcessingMode MTLFX::SpatialScaler::colorProcessingMode() const +{ + return Object::sendMessage< SpatialScalerColorProcessingMode >( this, _MTLFX_PRIVATE_SEL( colorProcessingMode ) ); +} + +_MTLFX_INLINE MTL::Fence* MTLFX::SpatialScaler::fence() const +{ + return Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::setFence( MTL::Fence* pFence ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setFence_ ), pFence ); +} + +_MTLFX_INLINE void MTLFX::SpatialScaler::encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer ); +} + +namespace MTLFX +{ + class TemporalScalerDescriptor : public NS::Copying< TemporalScalerDescriptor > + { + public: + static class TemporalScalerDescriptor* alloc(); + class TemporalScalerDescriptor* init(); + + MTL::PixelFormat colorTextureFormat() const; + void setColorTextureFormat( MTL::PixelFormat format ); + + MTL::PixelFormat depthTextureFormat() const; + void setDepthTextureFormat( MTL::PixelFormat format ); + + MTL::PixelFormat motionTextureFormat() const; + void setMotionTextureFormat( MTL::PixelFormat format ); + + MTL::PixelFormat outputTextureFormat() const; + void setOutputTextureFormat( MTL::PixelFormat format ); + + NS::UInteger inputWidth() const; + void setInputWidth( NS::UInteger width ); + + NS::UInteger inputHeight() const; + void setInputHeight( NS::UInteger height ); + + NS::UInteger outputWidth() const; + void setOutputWidth( NS::UInteger width ); + + NS::UInteger outputHeight() const; + void setOutputHeight( NS::UInteger height ); + + bool isAutoExposureEnabled() const; + void setAutoExposureEnabled( bool enabled ); + + bool isInputContentPropertiesEnabled() const; + void setInputContentPropertiesEnabled( bool enabled ); + + float inputContentMinScale() const; + void setInputContentMinScale( float scale ); + + float inputContentMaxScale() const; + void setInputContentMaxScale( float scale ); + + class TemporalScaler* newTemporalScaler( const MTL::Device* pDevice ) const; + + static float supportedInputContentMinScale( const MTL::Device* pDevice ); + static float supportedInputContentMaxScale( const MTL::Device* pDevice ); + + static bool supportsDevice( const MTL::Device* pDevice ); + }; + + class TemporalScaler : public NS::Referencing< TemporalScaler > + { + public: + MTL::TextureUsage colorTextureUsage() const; + MTL::TextureUsage depthTextureUsage() const; + MTL::TextureUsage motionTextureUsage() const; + MTL::TextureUsage outputTextureUsage() const; + + NS::UInteger inputContentWidth() const; + void setInputContentWidth( NS::UInteger width ); + + NS::UInteger inputContentHeight() const; + void setInputContentHeight( NS::UInteger height ); + + MTL::Texture* colorTexture() const; + void setColorTexture( MTL::Texture* pTexture ); + + MTL::Texture* depthTexture() const; + void setDepthTexture( MTL::Texture* pTexture ); + + MTL::Texture* motionTexture() const; + void setMotionTexture( MTL::Texture* pTexture ); + + MTL::Texture* outputTexture() const; + void setOutputTexture( MTL::Texture* pTexture ); + + MTL::Texture* exposureTexture() const; + void setExposureTexture( MTL::Texture* pTexture ); + + float preExposure() const; + void setPreExposure( float preExposure ); + + float jitterOffsetX() const; + void setJitterOffsetX( float offset ); + + float jitterOffsetY() const; + void setJitterOffsetY( float offset ); + + float motionVectorScaleX() const; + void setMotionVectorScaleX( float scale ); + + float motionVectorScaleY() const; + void setMotionVectorScaleY( float scale ); + + bool reset() const; + void setReset( bool reset ); + + bool isDepthReversed() const; + void setDepthReversed( bool depthReversed ); + + MTL::PixelFormat colorTextureFormat() const; + MTL::PixelFormat depthTextureFormat() const; + MTL::PixelFormat motionTextureFormat() const; + MTL::PixelFormat outputTextureFormat() const; + NS::UInteger inputWidth() const; + NS::UInteger inputHeight() const; + NS::UInteger outputWidth() const; + NS::UInteger outputHeight() const; + float inputContentMinScale() const; + float inputContentMaxScale() const; + + MTL::Fence* fence() const; + void setFence( MTL::Fence* pFence ); + + void encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ); + }; +} + +_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::alloc() +{ + return NS::Object::alloc< TemporalScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ) ); +} + +_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::init() +{ + return NS::Object::init< TemporalScalerDescriptor >(); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::colorTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setColorTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorTextureFormat_ ), format ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::depthTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setDepthTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setDepthTextureFormat_ ), format ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::motionTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setMotionTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setMotionTextureFormat_ ), format ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::outputTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat format ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputTextureFormat_ ), format ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputHeight_ ), height ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputHeight_ ), height ); +} + +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isAutoExposureEnabled() const +{ + return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isAutoExposureEnabled ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setAutoExposureEnabled( bool enabled ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setAutoExposureEnabled_ ), enabled ); +} + +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isInputContentPropertiesEnabled() const +{ + return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isInputContentPropertiesEnabled ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentPropertiesEnabled( bool enabled ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentPropertiesEnabled_ ), enabled ); +} + +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMinScale() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMinScale( float scale ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentMinScale_ ), scale ); +} + +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMaxScale() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMaxScale( float scale ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentMaxScale_ ), scale ); +} + +_MTLFX_INLINE MTLFX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler( const MTL::Device* pDevice ) const +{ + return Object::sendMessage< TemporalScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalScalerWithDevice_ ), pDevice ); +} + +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMinScale( const MTL::Device* pDevice ) +{ + float scale = 1.0f; + + if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ) ) ) + { + scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ), pDevice ); + } + + return scale; +} + +_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMaxScale( const MTL::Device* pDevice ) +{ + float scale = 1.0f; + + if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ) ) ) + { + scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ), pDevice ); + } + else if ( supportsDevice( pDevice ) ) + { + scale = 2.0f; + } + + return scale; +} + +_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsDevice( const MTL::Device* pDevice ) +{ + return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsDevice_ ), pDevice ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScaler::colorTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScaler::depthTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScaler::motionTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) ); +} + +_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScaler::outputTextureUsage() const +{ + return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::inputContentWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentWidth ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setInputContentWidth( NS::UInteger width ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentWidth_ ), width ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::inputContentHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentHeight ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setInputContentHeight( NS::UInteger height ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setInputContentHeight_ ), height ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::colorTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setColorTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setColorTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::depthTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setDepthTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setDepthTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::motionTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setMotionTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setMotionTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::outputTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setOutputTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setOutputTexture_ ), pTexture ); +} + +_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScaler::exposureTexture() const +{ + return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( exposureTexture ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setExposureTexture( MTL::Texture* pTexture ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setExposureTexture_ ), pTexture ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::preExposure() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( preExposure ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setPreExposure( float preExposure ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setPreExposure_ ), preExposure ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::jitterOffsetX() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setJitterOffsetX( float offset ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setJitterOffsetX_ ), offset ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::jitterOffsetY() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setJitterOffsetY( float offset ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setJitterOffsetY_ ), offset ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::motionVectorScaleX() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setMotionVectorScaleX( float scale ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setMotionVectorScaleX_ ), scale ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::motionVectorScaleY() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setMotionVectorScaleY( float scale ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setMotionVectorScaleY_ ), scale ); +} + +_MTLFX_INLINE bool MTLFX::TemporalScaler::reset() const +{ + return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( reset ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setReset( bool reset ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setReset_ ), reset ); +} + +_MTLFX_INLINE bool MTLFX::TemporalScaler::isDepthReversed() const +{ + return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setDepthReversed( bool depthReversed ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setDepthReversed_ ), depthReversed ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScaler::colorTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScaler::depthTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScaler::motionTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) ); +} + +_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScaler::outputTextureFormat() const +{ + return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::inputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::inputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::outputWidth() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) ); +} + +_MTLFX_INLINE NS::UInteger MTLFX::TemporalScaler::outputHeight() const +{ + return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::inputContentMinScale() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) ); +} + +_MTLFX_INLINE float MTLFX::TemporalScaler::inputContentMaxScale() const +{ + return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) ); +} + +_MTLFX_INLINE MTL::Fence* MTLFX::TemporalScaler::fence() const +{ + return Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::setFence( MTL::Fence* pFence ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( setFence_ ), pFence ); +} + +_MTLFX_INLINE void MTLFX::TemporalScaler::encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer ) +{ + Object::sendMessage< void >( this, _MTL_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer ); +} +