peachsim 0.1.1684 → 0.1.1700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/bridge-flow-runner.ts +61 -39
- package/cli/commands/agent-wrapper.ts +21 -10
- package/cli/commands/control.ts +27 -7
- package/cli/commands/coverage-swift.ts +72 -5
- package/cli/commands/coverage.ts +1 -1
- package/cli/commands/detect.ts +17 -4
- package/cli/commands/inspect/actions.ts +1 -0
- package/cli/commands/maestro-compare.ts +25 -99
- package/cli/commands/screenshot.ts +12 -0
- package/cli/help-core.ts +3 -4
- package/cli/maestro-compare.ts +172 -4
- package/cli/outbound-endpoints.ts +2 -10
- package/detox/index.ts +15 -0
- package/detox/launch-permissions.ts +169 -0
- package/dist-lib/agent-daemon-client.cjs +2 -2
- package/dist-lib/agent-events.cjs +2 -2
- package/dist-lib/attached-projects.cjs +2 -2
- package/dist-lib/auth/shared-session.cjs +2 -2
- package/dist-lib/backend-origin.cjs +2 -2
- package/dist-lib/beta.cjs +2 -2
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +2 -2
- package/dist-lib/bridge-contract-input.cjs +2 -2
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +6729 -3591
- package/dist-lib/capture-contract.cjs +2 -2
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +2 -2
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +2 -2
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +104 -3
- package/dist-lib/dev-bundle-resolution.cjs +208 -44
- package/dist-lib/expo-swift-bundle.cjs +3475 -2137
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +2 -2
- package/dist-lib/host/bridge-host.cjs +8970 -3652
- package/dist-lib/host/fetch-proxy-handler.cjs +332 -40
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +2 -2
- package/dist-lib/host/websocket-proxy.cjs +2 -2
- package/dist-lib/index.cjs +469 -143
- package/dist-lib/jump-to-source-babel.cjs +2 -2
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +2 -2
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +2 -2
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +465 -139
- package/dist-lib/native-app-identity-project.cjs +209 -86
- package/dist-lib/native-app-identity-project.mjs +251 -116
- package/dist-lib/native-app-identity.cjs +2 -2
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +2 -2
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +2 -2
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/public-origins-lib-esm.json +27 -23
- package/dist-lib/public-origins-lib.json +221 -88
- package/dist-lib/react-native-host-modules.cjs +2 -2
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
- package/dist-lib/sdk.cjs +3 -3
- package/dist-lib/sdk.mjs +2 -2
- package/dist-lib/skills.cjs +20997 -16596
- package/dist-lib/swift-compile.cjs +3075 -459
- package/dist-lib/swift-compile.mjs +3028 -415
- package/dist-lib/swift-package.cjs +131 -69
- package/dist-lib/swift-package.mjs +126 -68
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +31 -4
- package/dist-lib/swift.cjs +2 -2
- package/dist-lib/vite-swift.cjs +5049 -1704
- package/dist-lib/vite.cjs +261 -58
- package/dist-lib/worklet-executable.cjs +8 -5
- package/dist-lib/worklet-executable.mjs +7 -4
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +15 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
- package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -220
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +98 -3
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
- package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
- package/sdk/ios/usr/include/complex.h +167 -0
- package/sdk/ios/usr/include/copyfile.h +143 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +5 -0
- package/sdk/ios/usr/include/mach/mach_types.h +1 -0
- package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
- package/sdk/ios/usr/include/malloc/_platform.h +80 -0
- package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
- package/sdk/ios/usr/include/malloc/malloc.h +768 -0
- package/sdk/ios/usr/include/math.h +835 -2
- package/sdk/ios/usr/include/os/availability.h +168 -6
- package/sdk/ios/usr/include/os/base.h +351 -0
- package/sdk/ios/usr/include/os/clock.h +18 -0
- package/sdk/ios/usr/include/os/lock.h +232 -10
- package/sdk/ios/usr/include/os/log.h +521 -38
- package/sdk/ios/usr/include/os/object.h +320 -3
- package/sdk/ios/usr/include/os/trace.h +492 -0
- package/sdk/ios/usr/include/os/trace_base.h +167 -0
- package/sdk/ios/usr/include/os/workgroup.h +37 -0
- package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
- package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
- package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
- package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
- package/sdk/ios/usr/include/sys/cdefs.h +38 -1
- package/sdk/ios/wasm/include/unistd.h +3 -0
- package/skills/contrast/SKILL.md +3 -0
- package/src/codex-client.ts +11 -6
- package/src/dev-bundle-resolution.ts +124 -48
- package/src/expo-native-workspace.ts +176 -0
- package/src/expo-swift-host.ts +161 -26
- package/src/expo-swift-ready.ts +14 -28
- package/src/expoSwiftContract.ts +4 -1
- package/src/generated/swift-c-predefines.json +2044 -0
- package/src/host/bridge-host.ts +5 -0
- package/src/installed-package-versions.ts +14 -1
- package/src/metro-project-root.ts +44 -33
- package/src/native-app-identity-project.ts +1 -0
- package/src/nitro-adapter.lock.json +916 -10
- package/src/nitro-adapter.ts +33 -24
- package/src/nitro-bundle.ts +108 -21
- package/src/nitro-compile.ts +36 -5
- package/src/nitro-source.ts +13 -3
- package/src/nitroAdapterContract.ts +100 -20
- package/src/nitroContract.ts +18 -2
- package/src/node-http-fetch.ts +116 -0
- package/src/packageVersionsContract.ts +46 -0
- package/src/serverDiscoveryContract.ts +1 -0
- package/src/settingsContract.ts +0 -30
- package/src/swift-binary-modules.ts +20 -5
- package/src/swift-compile.ts +598 -81
- package/src/swift-coverage/package.ts +3 -1
- package/src/swift-coverage/xcode-assets.ts +66 -5
- package/src/swift-coverage/xcode-packages.ts +11 -6
- package/src/swift-host.ts +347 -60
- package/src/swift-objc-compile.ts +52 -10
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-platform.ts +2 -2
- package/src/swift-objc-standin.ts +53 -13
- package/src/swift-package-manifest.ts +151 -28
- package/src/swift-package.ts +158 -75
- package/src/swift-packages.ts +141 -44
- package/src/swift-source-file.ts +10 -15
- package/src/swift-source-pods.ts +126 -41
- package/src/swift-standin-digest.ts +77 -0
- package/src/swift-standin-emit.ts +40 -4
- package/src/swift-standins.ts +154 -31
- package/src/swift-submit.ts +5 -0
- package/src/swift-toolchain.ts +38 -0
- package/src/swiftContract.ts +168 -75
- package/src/target-matcher.ts +15 -2
- package/src/vite-plugin.ts +0 -10
- package/src/worklet-executable.ts +7 -3
- package/src/xcode-json-project.ts +14 -2
- package/src/xcode-project.ts +215 -100
- package/src/settings-flags.ts +0 -107
|
@@ -0,0 +1,1212 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MTLAccelerationStructure.h
|
|
3
|
+
// Metal
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2020 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <Metal/MTLDefines.h>
|
|
10
|
+
#import <Metal/MTLTypes.h>
|
|
11
|
+
#import <Metal/MTLArgument.h>
|
|
12
|
+
#import <Metal/MTLStageInputOutputDescriptor.h>
|
|
13
|
+
#import <Metal/MTLRenderCommandEncoder.h>
|
|
14
|
+
#import <Metal/MTLAccelerationStructureTypes.h>
|
|
15
|
+
#import <Metal/MTLResource.h>
|
|
16
|
+
#import <Metal/MTLStageInputOutputDescriptor.h>
|
|
17
|
+
|
|
18
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
19
|
+
|
|
20
|
+
/*!
|
|
21
|
+
@enum MTLAccelerationStructureRefitOptions
|
|
22
|
+
@abstract Controls the acceleration structure refit operation
|
|
23
|
+
*/
|
|
24
|
+
typedef NS_OPTIONS(NSUInteger, MTLAccelerationStructureRefitOptions) {
|
|
25
|
+
/**
|
|
26
|
+
* @brief Refitting shall result in updated vertex data from the provided geometry descriptor.
|
|
27
|
+
* If not set, vertex buffers shall be ignored on the geometry descriptor and vertex data previously
|
|
28
|
+
* encoded shall be copied.
|
|
29
|
+
*/
|
|
30
|
+
MTLAccelerationStructureRefitOptionVertexData = (1 << 0),
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @brief Refitting shall result in updated per primitive data from the provided geometry descriptor.
|
|
34
|
+
* If not set, per primitive data buffers shall be ignored on the geometry descriptor and per primitive
|
|
35
|
+
* data previously encoded shall be copied.
|
|
36
|
+
*/
|
|
37
|
+
MTLAccelerationStructureRefitOptionPerPrimitiveData = (1 << 1),
|
|
38
|
+
} API_AVAILABLE(macos(13.0), ios(16.0));
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@protocol MTLBuffer;
|
|
42
|
+
@protocol MTLAccelerationStructure;
|
|
43
|
+
|
|
44
|
+
typedef NS_OPTIONS(NSUInteger, MTLAccelerationStructureUsage) {
|
|
45
|
+
/**
|
|
46
|
+
* @brief Default usage
|
|
47
|
+
*/
|
|
48
|
+
MTLAccelerationStructureUsageNone = 0,
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @brief Enable refitting for this acceleration structure. Note that this may reduce
|
|
52
|
+
* acceleration structure quality.
|
|
53
|
+
*/
|
|
54
|
+
MTLAccelerationStructureUsageRefit = (1 << 0),
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @brief Prefer building this acceleration structure quickly at the cost of reduced ray
|
|
58
|
+
* tracing performance.
|
|
59
|
+
*/
|
|
60
|
+
MTLAccelerationStructureUsagePreferFastBuild = (1 << 1),
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @brief Enable extended limits for this acceleration structure, possibly at the cost of
|
|
64
|
+
* reduced ray tracing performance.
|
|
65
|
+
*/
|
|
66
|
+
MTLAccelerationStructureUsageExtendedLimits API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0)) = (1 << 2),
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @brief Prioritize intersection performance over acceleration structure build time
|
|
70
|
+
*/
|
|
71
|
+
MTLAccelerationStructureUsagePreferFastIntersection API_AVAILABLE(macos(26.0), ios(26.0)) = (1 << 4),
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @brief Minimize the size of the acceleration structure in memory, potentially at
|
|
75
|
+
* the cost of increased build time or reduced intersection performance.
|
|
76
|
+
*/
|
|
77
|
+
MTLAccelerationStructureUsageMinimizeMemory API_AVAILABLE(macos(26.0), ios(26.0)) = (1 << 5),
|
|
78
|
+
} API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
|
|
79
|
+
|
|
80
|
+
typedef NS_OPTIONS(uint32_t, MTLAccelerationStructureInstanceOptions) {
|
|
81
|
+
/**
|
|
82
|
+
* @brief No options
|
|
83
|
+
*/
|
|
84
|
+
MTLAccelerationStructureInstanceOptionNone = 0,
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @brief Disable triangle back or front face culling
|
|
88
|
+
*/
|
|
89
|
+
MTLAccelerationStructureInstanceOptionDisableTriangleCulling = (1 << 0),
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @brief Override triangle front-facing winding. By default, the winding is
|
|
93
|
+
* assumed to be clockwise unless overridden by the intersector object. This overrides
|
|
94
|
+
* the intersector's winding order.
|
|
95
|
+
*/
|
|
96
|
+
MTLAccelerationStructureInstanceOptionTriangleFrontFacingWindingCounterClockwise = (1 << 1),
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @brief Geometry is opaque
|
|
100
|
+
*/
|
|
101
|
+
MTLAccelerationStructureInstanceOptionOpaque = (1 << 2),
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @brief Geometry is non-opaque
|
|
105
|
+
*/
|
|
106
|
+
MTLAccelerationStructureInstanceOptionNonOpaque = (1 << 3),
|
|
107
|
+
} API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
|
|
108
|
+
|
|
109
|
+
typedef NS_ENUM(NSInteger, MTLMatrixLayout) {
|
|
110
|
+
/**
|
|
111
|
+
* @brief Column-major order
|
|
112
|
+
*/
|
|
113
|
+
MTLMatrixLayoutColumnMajor = 0,
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @brief Row-major order
|
|
117
|
+
*/
|
|
118
|
+
MTLMatrixLayoutRowMajor = 1,
|
|
119
|
+
} API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @brief Base class for acceleration structure descriptors. Do not use this class directly. Use
|
|
123
|
+
* one of the derived classes instead.
|
|
124
|
+
*/
|
|
125
|
+
MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
|
|
126
|
+
@interface MTLAccelerationStructureDescriptor : NSObject <NSCopying>
|
|
127
|
+
|
|
128
|
+
@property (nonatomic) MTLAccelerationStructureUsage usage;
|
|
129
|
+
|
|
130
|
+
@end
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @brief Base class for all geometry descriptors. Do not use this class directly. Use one of the derived
|
|
134
|
+
* classes instead.
|
|
135
|
+
*/
|
|
136
|
+
MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
|
|
137
|
+
@interface MTLAccelerationStructureGeometryDescriptor : NSObject <NSCopying>
|
|
138
|
+
|
|
139
|
+
@property (nonatomic) NSUInteger intersectionFunctionTableOffset;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @brief Whether the geometry is opaque
|
|
143
|
+
*/
|
|
144
|
+
@property (nonatomic) BOOL opaque;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @brief Whether intersection functions may be invoked more than once per ray/primitive
|
|
148
|
+
* intersection. Defaults to YES.
|
|
149
|
+
*/
|
|
150
|
+
@property (nonatomic) BOOL allowDuplicateIntersectionFunctionInvocation;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @brief Label
|
|
154
|
+
*/
|
|
155
|
+
@property (nonatomic, copy, nullable) NSString* label API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @brief Data buffer containing per-primitive data. May be nil.
|
|
159
|
+
*/
|
|
160
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> primitiveDataBuffer API_AVAILABLE(macos(13.0), ios(16.0));
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @brief Primitive data buffer offset in bytes. Must be aligned to the platform's buffer offset alignment. Defaults to 0 bytes.
|
|
164
|
+
*/
|
|
165
|
+
@property (nonatomic) NSUInteger primitiveDataBufferOffset API_AVAILABLE(macos(13.0), ios(16.0));
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @brief Stride, in bytes, between per-primitive data in the primitive data buffer. Must be at least primitiveDataElementSize and must be a
|
|
169
|
+
* multiple of 4 bytes. Defaults to 0 bytes. Assumed to be equal to primitiveDataElementSize if zero.
|
|
170
|
+
*/
|
|
171
|
+
@property (nonatomic) NSUInteger primitiveDataStride API_AVAILABLE(macos(13.0), ios(16.0));
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @brief Size, in bytes, of the data for each primitive in the primitive data buffer. Must be at most primitiveDataStride and must be a
|
|
175
|
+
* multiple of 4 bytes. Defaults to 0 bytes.
|
|
176
|
+
*/
|
|
177
|
+
@property (nonatomic) NSUInteger primitiveDataElementSize API_AVAILABLE(macos(13.0), ios(16.0));
|
|
178
|
+
@end
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @brief Describes what happens to the object before the first motion key and after the last
|
|
182
|
+
* motion key.
|
|
183
|
+
*/
|
|
184
|
+
typedef NS_ENUM(uint32_t, MTLMotionBorderMode){
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @brief Motion is stopped. (default)
|
|
188
|
+
*/
|
|
189
|
+
MTLMotionBorderModeClamp = 0,
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @brief Object disappears
|
|
193
|
+
*/
|
|
194
|
+
MTLMotionBorderModeVanish = 1
|
|
195
|
+
} API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @brief Descriptor for a primitive acceleration structure
|
|
199
|
+
*/
|
|
200
|
+
MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
|
|
201
|
+
@interface MTLPrimitiveAccelerationStructureDescriptor : MTLAccelerationStructureDescriptor
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @brief Array of geometry descriptors. If motionKeyframeCount is greater than one all geometryDescriptors
|
|
205
|
+
* must be motion versions and have motionKeyframeCount of primitive buffers.
|
|
206
|
+
*/
|
|
207
|
+
@property (nonatomic, retain, nullable) NSArray <MTLAccelerationStructureGeometryDescriptor *> * geometryDescriptors;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @brief Motion border mode describing what happens if acceleration structure is sampled before
|
|
211
|
+
* motionStartTime. If not set defaults to MTLMotionBorderModeClamp.
|
|
212
|
+
*/
|
|
213
|
+
@property (nonatomic) MTLMotionBorderMode motionStartBorderMode API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @brief Motion border mode describing what happens if acceleration structure is sampled after
|
|
217
|
+
* motionEndTime. If not set defaults to MTLMotionBorderModeClamp.
|
|
218
|
+
*/
|
|
219
|
+
@property (nonatomic) MTLMotionBorderMode motionEndBorderMode API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @brief Motion start time of this geometry. If not set defaults to 0.0f.
|
|
223
|
+
*/
|
|
224
|
+
@property (nonatomic) float motionStartTime API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @brief Motion end time of this geometry. If not set defaults to 1.0f.
|
|
228
|
+
*/
|
|
229
|
+
@property (nonatomic) float motionEndTime API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @brief Motion keyframe count. Is 1 by default which means no motion.
|
|
233
|
+
*/
|
|
234
|
+
@property (nonatomic) NSUInteger motionKeyframeCount API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
235
|
+
|
|
236
|
+
+ (instancetype)descriptor;
|
|
237
|
+
|
|
238
|
+
@end
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @brief Descriptor for triangle geometry
|
|
242
|
+
*/
|
|
243
|
+
MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
|
|
244
|
+
@interface MTLAccelerationStructureTriangleGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @brief Vertex buffer containing triangle vertices. Each vertex position must be formatted
|
|
248
|
+
* according to the vertex format. Must not be nil.
|
|
249
|
+
*/
|
|
250
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> vertexBuffer;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @brief Vertex buffer offset. Must be a multiple of the vertex stride and must be aligned to the
|
|
254
|
+
* platform's buffer offset alignment.
|
|
255
|
+
*/
|
|
256
|
+
@property (nonatomic) NSUInteger vertexBufferOffset;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* @brief Format type of the vertex buffer.
|
|
260
|
+
* Defaults to MTLAttributeFormatFloat3 (packed).
|
|
261
|
+
*/
|
|
262
|
+
@property (nonatomic) MTLAttributeFormat vertexFormat API_AVAILABLE(macos(13.0), ios(16.0));
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* @brief Stride, in bytes, between vertices in the vertex buffer. Must be a multiple of the vertex format data type size and must be aligned to
|
|
266
|
+
* the vertex format data type's alignment. Defaults to 0, which will result in a stride of the vertex format data size.
|
|
267
|
+
*/
|
|
268
|
+
@property (nonatomic) NSUInteger vertexStride;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Optional index buffer containing references to vertices in the vertex buffer. May be nil.
|
|
272
|
+
*/
|
|
273
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> indexBuffer;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @brief Index buffer offset. Must be a multiple of the index data type size and must be aligned to both
|
|
277
|
+
* the index data type's alignment and the platform's buffer offset alignment.
|
|
278
|
+
*/
|
|
279
|
+
@property (nonatomic) NSUInteger indexBufferOffset;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @brief Index type
|
|
283
|
+
*/
|
|
284
|
+
@property (nonatomic) MTLIndexType indexType;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @brief Number of triangles
|
|
288
|
+
*/
|
|
289
|
+
@property (nonatomic) NSUInteger triangleCount;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @brief Buffer containing packed float4x3 transformation matrix. Transform is applied to the vertex data when building the acceleration structure. Input vertex buffers are not modified.
|
|
293
|
+
* When set to nil, transformation matrix is not applied to vertex data.
|
|
294
|
+
*/
|
|
295
|
+
@property (nonatomic, retain, nullable) id<MTLBuffer> transformationMatrixBuffer API_AVAILABLE(macos(13.0), ios(16.0));
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @brief Transformation matrix buffer offset. Must be a multiple of 4 bytes. Defaults to 0.
|
|
299
|
+
*/
|
|
300
|
+
@property (nonatomic) NSUInteger transformationMatrixBufferOffset API_AVAILABLE(macos(13.0), ios(16.0));
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @brief Matrix layout for the transformation matrix in the transformation
|
|
304
|
+
* matrix buffer. Defaults to MTLMatrixLayoutColumnMajor.
|
|
305
|
+
*/
|
|
306
|
+
@property (nonatomic) MTLMatrixLayout transformationMatrixLayout API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
307
|
+
+ (instancetype)descriptor;
|
|
308
|
+
|
|
309
|
+
@end
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* @brief Descriptor for bounding box geometry
|
|
313
|
+
*/
|
|
314
|
+
MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
|
|
315
|
+
@interface MTLAccelerationStructureBoundingBoxGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @brief Bounding box buffer containing MTLAxisAlignedBoundingBoxes. Must not be nil.
|
|
319
|
+
*/
|
|
320
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> boundingBoxBuffer;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @brief Bounding box buffer offset. Must be a multiple of the bounding box stride and must be
|
|
324
|
+
* aligned to the platform's buffer offset alignment.
|
|
325
|
+
*/
|
|
326
|
+
@property (nonatomic) NSUInteger boundingBoxBufferOffset;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @brief Stride, in bytes, between bounding boxes in the bounding box buffer. Must be at least 24
|
|
330
|
+
* bytes and must be a multiple of 4 bytes. Defaults to 24 bytes.
|
|
331
|
+
*/
|
|
332
|
+
@property (nonatomic) NSUInteger boundingBoxStride;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* @brief Number of bounding boxes
|
|
336
|
+
*/
|
|
337
|
+
@property (nonatomic) NSUInteger boundingBoxCount;
|
|
338
|
+
|
|
339
|
+
+ (instancetype)descriptor;
|
|
340
|
+
|
|
341
|
+
@end
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* @brief MTLbuffer and description how the data is stored in it.
|
|
345
|
+
*/
|
|
346
|
+
MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0))
|
|
347
|
+
@interface MTLMotionKeyframeData : NSObject
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* @brief Buffer containing the data of a single keyframe. Multiple keyframes can be interleaved in one MTLBuffer.
|
|
351
|
+
*/
|
|
352
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> buffer;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @brief Buffer offset. Must be a multiple of 4 bytes.
|
|
356
|
+
*/
|
|
357
|
+
@property (nonatomic) NSUInteger offset;
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
+ (instancetype)data;
|
|
361
|
+
|
|
362
|
+
@end
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @brief Descriptor for motion triangle geometry
|
|
366
|
+
*/
|
|
367
|
+
MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0))
|
|
368
|
+
@interface MTLAccelerationStructureMotionTriangleGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* @brief Vertex buffer containing triangle vertices similar to what MTLAccelerationStructureTriangleGeometryDescriptor has but array of the values.
|
|
372
|
+
*/
|
|
373
|
+
@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> * vertexBuffers;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* @brief Format type of the vertex buffers across all keyframes.
|
|
377
|
+
* Defaults to MTLAttributeFormatFloat3 (packed).
|
|
378
|
+
*/
|
|
379
|
+
@property (nonatomic) MTLAttributeFormat vertexFormat API_AVAILABLE(macos(13.0), ios(16.0));
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @brief Stride, in bytes, between vertices in each keyframe's vertex buffer. Must be a multiple of the vertex format data type size and must be aligned to
|
|
383
|
+
* the vertex format data type's alignment. Defaults to 0, which will result in a stride of the vertex format data size.
|
|
384
|
+
*/
|
|
385
|
+
@property (nonatomic) NSUInteger vertexStride;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Optional index buffer containing references to vertices in the vertex buffer. May be nil.
|
|
389
|
+
*/
|
|
390
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> indexBuffer;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @brief Index buffer offset. Must be a multiple of the index data type size and must be aligned to both
|
|
394
|
+
* the index data type's alignment and the platform's buffer offset alignment.
|
|
395
|
+
*/
|
|
396
|
+
@property (nonatomic) NSUInteger indexBufferOffset;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* @brief Index type
|
|
400
|
+
*/
|
|
401
|
+
@property (nonatomic) MTLIndexType indexType;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* @brief Number of triangles
|
|
405
|
+
*/
|
|
406
|
+
@property (nonatomic) NSUInteger triangleCount;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* @brief Buffer containing packed float4x3 transformation matrix. Transform is applied to the vertex data when building the acceleration structure. Input vertex buffers are not modified.
|
|
410
|
+
* The transformation matrix is applied to all keyframes' vertex data.
|
|
411
|
+
* When set to nil, transformation matrix is not applied to vertex data.
|
|
412
|
+
*/
|
|
413
|
+
@property (nonatomic, retain, nullable) id<MTLBuffer> transformationMatrixBuffer API_AVAILABLE(macos(13.0), ios(16.0));
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* @brief Transformation matrix buffer offset. Must be a multiple of 4 bytes. Defaults to 0.
|
|
417
|
+
*/
|
|
418
|
+
@property (nonatomic) NSUInteger transformationMatrixBufferOffset API_AVAILABLE(macos(13.0), ios(16.0));
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* @brief Matrix layout for the transformation matrix in the transformation
|
|
422
|
+
* matrix buffer. Defaults to MTLMatrixLayoutColumnMajor.
|
|
423
|
+
*/
|
|
424
|
+
@property (nonatomic) MTLMatrixLayout transformationMatrixLayout API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
425
|
+
+ (instancetype)descriptor;
|
|
426
|
+
|
|
427
|
+
@end
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @brief Descriptor for motion bounding box geometry
|
|
431
|
+
*/
|
|
432
|
+
MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0))
|
|
433
|
+
@interface MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* @brief Bounding box buffer containing MTLAxisAlignedBoundingBoxes similar to what MTLAccelerationStructureBoundingBoxGeometryDescriptor has but array of the values.
|
|
437
|
+
*/
|
|
438
|
+
@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> * boundingBoxBuffers;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* @brief Stride, in bytes, between bounding boxes in the bounding box buffer. Must be at least 24
|
|
442
|
+
* bytes and must be a multiple of 4 bytes. Defaults to 24 bytes.
|
|
443
|
+
*/
|
|
444
|
+
@property (nonatomic) NSUInteger boundingBoxStride;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* @brief Number of bounding boxes
|
|
448
|
+
*/
|
|
449
|
+
@property (nonatomic) NSUInteger boundingBoxCount;
|
|
450
|
+
|
|
451
|
+
+ (instancetype)descriptor;
|
|
452
|
+
|
|
453
|
+
@end
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* @brief Curve types
|
|
458
|
+
*/
|
|
459
|
+
typedef NS_ENUM(NSInteger, MTLCurveType) {
|
|
460
|
+
/**
|
|
461
|
+
* @brief Curve with a circular cross-section. These curves have the
|
|
462
|
+
* advantage of having a real 3D shape consistent across different ray
|
|
463
|
+
* directions, well-defined surface normals, etc. However, they may be
|
|
464
|
+
* slower to intersect. These curves are ideal for viewing close-up.
|
|
465
|
+
*/
|
|
466
|
+
MTLCurveTypeRound = 0,
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* @brief Curve with a flat cross-section aligned with the ray direction.
|
|
470
|
+
* These curves may be faster to intersect but do not have a consistent
|
|
471
|
+
* 3D structure across different rays. These curves are ideal for viewing
|
|
472
|
+
* at a distance or curves with a small radius such as hair and fur.
|
|
473
|
+
*/
|
|
474
|
+
MTLCurveTypeFlat = 1,
|
|
475
|
+
} API_AVAILABLE(macos(14.0), ios(17.0));
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* @brief Basis function to use to interpolate curve control points
|
|
479
|
+
*/
|
|
480
|
+
typedef NS_ENUM(NSInteger, MTLCurveBasis) {
|
|
481
|
+
/**
|
|
482
|
+
* @brief B-Spline basis. Each curve segment must have 3 or 4 control
|
|
483
|
+
* points. Curve segments join with C^(N - 2) continuity, where N is
|
|
484
|
+
* the number of control points. The curve does not necessarily pass
|
|
485
|
+
* through the control points without additional control points at the
|
|
486
|
+
* beginning and end of the curve. Each curve segment can overlap
|
|
487
|
+
* N-1 control points.
|
|
488
|
+
*/
|
|
489
|
+
MTLCurveBasisBSpline = 0,
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @brief Catmull-Rom basis. Curves represented in this basis can also be
|
|
493
|
+
* easily converted to and from the Bézier basis. Each curve segment must
|
|
494
|
+
* have 4 control points. Each index in the control point index buffer
|
|
495
|
+
* points to the first of 4 consecutive control points in the control point
|
|
496
|
+
* buffer.
|
|
497
|
+
*
|
|
498
|
+
* The tangent at each control point is given by
|
|
499
|
+
* (P_(i+1) - P_(i-1)) / 2. Therefore, the curve does not pass through the
|
|
500
|
+
* first and last control point of each connected sequence of curve
|
|
501
|
+
* segments. Instead, the first and last control point are used to control
|
|
502
|
+
* the tangent vector at the beginning and end of the curve.
|
|
503
|
+
*
|
|
504
|
+
* Curve segments join with C^1 continuity and the
|
|
505
|
+
* curve passes through the control points. Each curve segment can overlap
|
|
506
|
+
* 3 control points.
|
|
507
|
+
*/
|
|
508
|
+
MTLCurveBasisCatmullRom = 1,
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @brief Linear basis. The curve is made of a sequence of connected line
|
|
512
|
+
* segments each with 2 control points.
|
|
513
|
+
*/
|
|
514
|
+
MTLCurveBasisLinear = 2,
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* @brief Bezier basis
|
|
518
|
+
*/
|
|
519
|
+
MTLCurveBasisBezier = 3,
|
|
520
|
+
} API_AVAILABLE(macos(14.0), ios(17.0));
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* @brief Type of end cap to insert at the beginning and end of each connected
|
|
524
|
+
* sequence of curve segments.
|
|
525
|
+
*/
|
|
526
|
+
typedef NS_ENUM(NSInteger, MTLCurveEndCaps) {
|
|
527
|
+
/**
|
|
528
|
+
* @brief No end caps
|
|
529
|
+
*/
|
|
530
|
+
MTLCurveEndCapsNone = 0,
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* @brief Disk end caps
|
|
534
|
+
*/
|
|
535
|
+
MTLCurveEndCapsDisk = 1,
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* @brief Spherical end caps
|
|
539
|
+
*/
|
|
540
|
+
MTLCurveEndCapsSphere = 2,
|
|
541
|
+
} API_AVAILABLE(macos(14.0), ios(17.0));
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* @brief Acceleration structure geometry descriptor describing geometry
|
|
545
|
+
* made of curve primitives
|
|
546
|
+
*/
|
|
547
|
+
MTL_EXPORT API_AVAILABLE(macos(14.0), ios(17.0))
|
|
548
|
+
@interface MTLAccelerationStructureCurveGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* @brief Buffer containing curve control points. Each control point must
|
|
552
|
+
* be of the format specified by the control point format. Must not be
|
|
553
|
+
* nil when the acceleration structure is built.
|
|
554
|
+
*/
|
|
555
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> controlPointBuffer;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* @brief Control point buffer offset. Must be a multiple of the control
|
|
559
|
+
* point format's element size and must be aligned to the platform's
|
|
560
|
+
* buffer offset alignment.
|
|
561
|
+
*/
|
|
562
|
+
@property (nonatomic) NSUInteger controlPointBufferOffset;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* @brief Number of control points in the control point buffer
|
|
566
|
+
*/
|
|
567
|
+
@property (nonatomic) NSUInteger controlPointCount;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* @brief Stride, in bytes, between control points in the control point
|
|
571
|
+
* buffer. Must be a multiple of the control point format's element size
|
|
572
|
+
* and must be at least the control point format's size. Defaults to 0
|
|
573
|
+
* bytes, indicating that the control points are tightly packed.
|
|
574
|
+
*/
|
|
575
|
+
@property (nonatomic) NSUInteger controlPointStride;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* @brief Format of the control points in the control point buffer.
|
|
579
|
+
* Defaults to MTLAttributeFormatFloat3 (packed).
|
|
580
|
+
*/
|
|
581
|
+
@property (nonatomic) MTLAttributeFormat controlPointFormat;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* @brief Buffer containing the curve radius for each control point. Each
|
|
585
|
+
* radius must be of the type specified by the radius format. Each radius
|
|
586
|
+
* must be at least zero. Must not be nil when the acceleration structure
|
|
587
|
+
* is built.
|
|
588
|
+
*/
|
|
589
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> radiusBuffer;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* @brief Radius buffer offset. Must be a multiple of the radius format
|
|
593
|
+
* size and must be aligned to the platform's buffer offset alignment.
|
|
594
|
+
*/
|
|
595
|
+
@property (nonatomic) NSUInteger radiusBufferOffset;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* @brief Format of the radii in the radius buffer. Defaults to
|
|
599
|
+
* MTLAttributeFormatFloat.
|
|
600
|
+
*/
|
|
601
|
+
@property (nonatomic) MTLAttributeFormat radiusFormat;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* @brief Stride, in bytes, between radii in the radius buffer. Must be
|
|
605
|
+
* a multiple of the radius format size. Defaults to 0 bytes, indicating
|
|
606
|
+
* that the radii are tightly packed.
|
|
607
|
+
*/
|
|
608
|
+
@property (nonatomic) NSUInteger radiusStride;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Index buffer containing references to control points in the control
|
|
612
|
+
* point buffer. Must not be nil when the acceleration structure is built.
|
|
613
|
+
*/
|
|
614
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> indexBuffer;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* @brief Index buffer offset. Must be a multiple of the index data type
|
|
618
|
+
* size and must be aligned to both the index data type's alignment and
|
|
619
|
+
* the platform's buffer offset alignment.
|
|
620
|
+
*/
|
|
621
|
+
@property (nonatomic) NSUInteger indexBufferOffset;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* @brief Index type
|
|
625
|
+
*/
|
|
626
|
+
@property (nonatomic) MTLIndexType indexType;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* @brief Number of curve segments
|
|
630
|
+
*/
|
|
631
|
+
@property (nonatomic) NSUInteger segmentCount;
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* @brief Number of control points per curve segment. Must be 2, 3, or 4.
|
|
635
|
+
*/
|
|
636
|
+
@property (nonatomic) NSUInteger segmentControlPointCount;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* @brief Curve type. Defaults to MTLCurveTypeRound.
|
|
640
|
+
*/
|
|
641
|
+
@property (nonatomic) MTLCurveType curveType;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* @brief Curve basis. Defaults to MTLCurveBasisBSpline.
|
|
645
|
+
*/
|
|
646
|
+
@property (nonatomic) MTLCurveBasis curveBasis;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* @brief Type of curve end caps. Defaults to MTLCurveEndCapsNone.
|
|
650
|
+
*/
|
|
651
|
+
@property (nonatomic) MTLCurveEndCaps curveEndCaps;
|
|
652
|
+
|
|
653
|
+
+ (instancetype)descriptor;
|
|
654
|
+
|
|
655
|
+
@end
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* @brief Acceleration structure motion geometry descriptor describing
|
|
659
|
+
* geometry made of curve primitives
|
|
660
|
+
*/
|
|
661
|
+
MTL_EXPORT API_AVAILABLE(macos(14.0), ios(17.0))
|
|
662
|
+
@interface MTLAccelerationStructureMotionCurveGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* @brief Buffers containing curve control points for each keyframe.
|
|
666
|
+
* Each control point must be of the format specified by the control
|
|
667
|
+
* point format. Buffer offsets musts be multiples of the control
|
|
668
|
+
* point format's element size and must be aligned to the platform's
|
|
669
|
+
* buffer offset alignment. Must not be nil when the acceleration
|
|
670
|
+
* structure is built.
|
|
671
|
+
*/
|
|
672
|
+
@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> *controlPointBuffers;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* @brief Number of control points in the control point buffers
|
|
676
|
+
*/
|
|
677
|
+
@property (nonatomic) NSUInteger controlPointCount;
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* @brief Stride, in bytes, between control points in the control point
|
|
681
|
+
* buffer. Must be a multiple of the control point format's element size
|
|
682
|
+
* and must be at least the control point format's size. Defaults to 0
|
|
683
|
+
* bytes, indicating that the control points are tightly packed.
|
|
684
|
+
*/
|
|
685
|
+
@property (nonatomic) NSUInteger controlPointStride;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* @brief Format of the control points in the control point buffer.
|
|
689
|
+
* Defaults to MTLAttributeFormatFloat3 (packed).
|
|
690
|
+
*/
|
|
691
|
+
@property (nonatomic) MTLAttributeFormat controlPointFormat;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* @brief Buffers containing the curve radius for each control point for
|
|
695
|
+
* each keyframe. Each radius must be of the type specified by the radius
|
|
696
|
+
* format. Buffer offsets must be multiples of the radius format size
|
|
697
|
+
* and must be aligned to the platform's buffer offset alignment. Each radius
|
|
698
|
+
* must be at least zero. Must not be nil when the acceleration structure
|
|
699
|
+
* is built.
|
|
700
|
+
*/
|
|
701
|
+
@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> *radiusBuffers;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* @brief Format of the radii in the radius buffer. Defaults to
|
|
705
|
+
* MTLAttributeFormatFloat.
|
|
706
|
+
*/
|
|
707
|
+
@property (nonatomic) MTLAttributeFormat radiusFormat;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* @brief Stride, in bytes, between radii in the radius buffer. Must be
|
|
711
|
+
* a multiple of 4 bytes. Defaults to 4 bytes.
|
|
712
|
+
*/
|
|
713
|
+
@property (nonatomic) NSUInteger radiusStride;
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Index buffer containing references to control points in the control
|
|
717
|
+
* point buffer. Must not be nil.
|
|
718
|
+
*/
|
|
719
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> indexBuffer;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* @brief Index buffer offset. Must be a multiple of the index data type
|
|
723
|
+
* size and must be aligned to both the index data type's alignment and
|
|
724
|
+
* the platform's buffer offset alignment.
|
|
725
|
+
*/
|
|
726
|
+
@property (nonatomic) NSUInteger indexBufferOffset;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* @brief Index type
|
|
730
|
+
*/
|
|
731
|
+
@property (nonatomic) MTLIndexType indexType;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* @brief Number of curve segments
|
|
735
|
+
*/
|
|
736
|
+
@property (nonatomic) NSUInteger segmentCount;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* @brief Number of control points per curve segment. Must be 2, 3, or 4.
|
|
740
|
+
*/
|
|
741
|
+
@property (nonatomic) NSUInteger segmentControlPointCount;
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* @brief Curve type. Defaults to MTLCurveTypeRound.
|
|
745
|
+
*/
|
|
746
|
+
@property (nonatomic) MTLCurveType curveType;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* @brief Curve basis. Defaults to MTLCurveBasisBSpline.
|
|
750
|
+
*/
|
|
751
|
+
@property (nonatomic) MTLCurveBasis curveBasis;
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* @brief Type of curve end caps. Defaults to MTLCurveEndCapsNone.
|
|
755
|
+
*/
|
|
756
|
+
@property (nonatomic) MTLCurveEndCaps curveEndCaps;
|
|
757
|
+
|
|
758
|
+
+ (instancetype)descriptor;
|
|
759
|
+
|
|
760
|
+
@end
|
|
761
|
+
|
|
762
|
+
typedef struct {
|
|
763
|
+
/**
|
|
764
|
+
* @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
|
|
765
|
+
*/
|
|
766
|
+
MTLPackedFloat4x3 transformationMatrix;
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* @brief Instance options
|
|
770
|
+
*/
|
|
771
|
+
MTLAccelerationStructureInstanceOptions options;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* @brief Instance mask used to ignore geometry during ray tracing
|
|
775
|
+
*/
|
|
776
|
+
uint32_t mask;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* @brief Used to index into intersection function tables
|
|
780
|
+
*/
|
|
781
|
+
uint32_t intersectionFunctionTableOffset;
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* @brief Acceleration structure index to use for this instance
|
|
785
|
+
*/
|
|
786
|
+
uint32_t accelerationStructureIndex;
|
|
787
|
+
} MTLAccelerationStructureInstanceDescriptor API_AVAILABLE(macos(11.0), ios(14.0));
|
|
788
|
+
|
|
789
|
+
typedef struct {
|
|
790
|
+
/**
|
|
791
|
+
* @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
|
|
792
|
+
*/
|
|
793
|
+
MTLPackedFloat4x3 transformationMatrix;
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* @brief Instance options
|
|
797
|
+
*/
|
|
798
|
+
MTLAccelerationStructureInstanceOptions options;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* @brief Instance mask used to ignore geometry during ray tracing
|
|
802
|
+
*/
|
|
803
|
+
uint32_t mask;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* @brief Used to index into intersection function tables
|
|
807
|
+
*/
|
|
808
|
+
uint32_t intersectionFunctionTableOffset;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* @brief Acceleration structure index to use for this instance
|
|
812
|
+
*/
|
|
813
|
+
uint32_t accelerationStructureIndex;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* @brief User-assigned instance ID to help identify this instance in an
|
|
817
|
+
* application-defined way
|
|
818
|
+
*/
|
|
819
|
+
uint32_t userID;
|
|
820
|
+
} MTLAccelerationStructureUserIDInstanceDescriptor API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
821
|
+
|
|
822
|
+
typedef NS_ENUM(NSUInteger, MTLAccelerationStructureInstanceDescriptorType) {
|
|
823
|
+
/**
|
|
824
|
+
* @brief Default instance descriptor: MTLAccelerationStructureInstanceDescriptor
|
|
825
|
+
*/
|
|
826
|
+
MTLAccelerationStructureInstanceDescriptorTypeDefault = 0,
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* @brief Instance descriptor with an added user-ID
|
|
830
|
+
*/
|
|
831
|
+
MTLAccelerationStructureInstanceDescriptorTypeUserID = 1,
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* @brief Instance descriptor with support for motion
|
|
835
|
+
*/
|
|
836
|
+
MTLAccelerationStructureInstanceDescriptorTypeMotion = 2,
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* @brief Instance descriptor with a resource handle for the instanced acceleration structure
|
|
840
|
+
*/
|
|
841
|
+
MTLAccelerationStructureInstanceDescriptorTypeIndirect API_AVAILABLE(macos(14.0), ios(17.0)) = 3,
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* @brief Motion instance descriptor with a resource handle for the instanced acceleration structure.
|
|
845
|
+
*/
|
|
846
|
+
MTLAccelerationStructureInstanceDescriptorTypeIndirectMotion API_AVAILABLE(macos(14.0), ios(17.0)) = 4,
|
|
847
|
+
} API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
848
|
+
|
|
849
|
+
typedef struct {
|
|
850
|
+
/**
|
|
851
|
+
* @brief Instance options
|
|
852
|
+
*/
|
|
853
|
+
MTLAccelerationStructureInstanceOptions options;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* @brief Instance mask used to ignore geometry during ray tracing
|
|
857
|
+
*/
|
|
858
|
+
uint32_t mask;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* @brief Used to index into intersection function tables
|
|
862
|
+
*/
|
|
863
|
+
uint32_t intersectionFunctionTableOffset;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* @brief Acceleration structure index to use for this instance
|
|
867
|
+
*/
|
|
868
|
+
uint32_t accelerationStructureIndex;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* @brief User-assigned instance ID to help identify this instance in an
|
|
872
|
+
* application-defined way
|
|
873
|
+
*/
|
|
874
|
+
uint32_t userID;
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* @brief The index of the first set of transforms describing one keyframe of the animation.
|
|
878
|
+
* These transforms are stored in a separate buffer and they are uniformly distributed over
|
|
879
|
+
* time time span of the motion.
|
|
880
|
+
*/
|
|
881
|
+
uint32_t motionTransformsStartIndex;
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* @brief The count of motion transforms belonging to this motion which are stored in consecutive
|
|
885
|
+
* memory addresses at the separate motionTransforms buffer.
|
|
886
|
+
*/
|
|
887
|
+
uint32_t motionTransformsCount;
|
|
888
|
+
/**
|
|
889
|
+
* @brief Motion border mode describing what happens if acceleration structure is sampled
|
|
890
|
+
* before motionStartTime
|
|
891
|
+
*/
|
|
892
|
+
MTLMotionBorderMode motionStartBorderMode;
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* @brief Motion border mode describing what happens if acceleration structure is sampled
|
|
896
|
+
* after motionEndTime
|
|
897
|
+
*/
|
|
898
|
+
MTLMotionBorderMode motionEndBorderMode;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* @brief Motion start time of this instance
|
|
902
|
+
*/
|
|
903
|
+
float motionStartTime;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* @brief Motion end time of this instance
|
|
907
|
+
*/
|
|
908
|
+
float motionEndTime;
|
|
909
|
+
} MTLAccelerationStructureMotionInstanceDescriptor API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
typedef struct {
|
|
913
|
+
/**
|
|
914
|
+
* @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
|
|
915
|
+
*/
|
|
916
|
+
MTLPackedFloat4x3 transformationMatrix;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* @brief Instance options
|
|
920
|
+
*/
|
|
921
|
+
MTLAccelerationStructureInstanceOptions options;
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* @brief Instance mask used to ignore geometry during ray tracing
|
|
925
|
+
*/
|
|
926
|
+
uint32_t mask;
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* @brief Used to index into intersection function tables
|
|
930
|
+
*/
|
|
931
|
+
uint32_t intersectionFunctionTableOffset;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* @brief User-assigned instance ID to help identify this instance in an
|
|
935
|
+
* application-defined way
|
|
936
|
+
*/
|
|
937
|
+
uint32_t userID;
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* @brief Acceleration structure resource handle to use for this instance
|
|
941
|
+
*/
|
|
942
|
+
MTLResourceID accelerationStructureID;
|
|
943
|
+
} MTLIndirectAccelerationStructureInstanceDescriptor API_AVAILABLE(macos(14.0), ios(17.0));
|
|
944
|
+
|
|
945
|
+
typedef struct {
|
|
946
|
+
/**
|
|
947
|
+
* @brief Instance options
|
|
948
|
+
*/
|
|
949
|
+
MTLAccelerationStructureInstanceOptions options;
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* @brief Instance mask used to ignore geometry during ray tracing
|
|
953
|
+
*/
|
|
954
|
+
uint32_t mask;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* @brief Used to index into intersection function tables
|
|
958
|
+
*/
|
|
959
|
+
uint32_t intersectionFunctionTableOffset;
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* @brief User-assigned instance ID to help identify this instance in an
|
|
963
|
+
* application-defined way
|
|
964
|
+
*/
|
|
965
|
+
uint32_t userID;
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* @brief Acceleration structure resource handle to use for this instance
|
|
969
|
+
*/
|
|
970
|
+
MTLResourceID accelerationStructureID;
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* @brief The index of the first set of transforms describing one keyframe of the animation.
|
|
974
|
+
* These transforms are stored in a separate buffer and they are uniformly distributed over
|
|
975
|
+
* time time span of the motion.
|
|
976
|
+
*/
|
|
977
|
+
uint32_t motionTransformsStartIndex;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* @brief The count of motion transforms belonging to this motion which are stored in consecutive
|
|
981
|
+
* memory addresses at the separate motionTransforms buffer.
|
|
982
|
+
*/
|
|
983
|
+
uint32_t motionTransformsCount;
|
|
984
|
+
/**
|
|
985
|
+
* @brief Motion border mode describing what happens if acceleration structure is sampled
|
|
986
|
+
* before motionStartTime
|
|
987
|
+
*/
|
|
988
|
+
MTLMotionBorderMode motionStartBorderMode;
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* @brief Motion border mode describing what happens if acceleration structure is sampled
|
|
992
|
+
* after motionEndTime
|
|
993
|
+
*/
|
|
994
|
+
MTLMotionBorderMode motionEndBorderMode;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* @brief Motion start time of this instance
|
|
998
|
+
*/
|
|
999
|
+
float motionStartTime;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* @brief Motion end time of this instance
|
|
1003
|
+
*/
|
|
1004
|
+
float motionEndTime;
|
|
1005
|
+
} MTLIndirectAccelerationStructureMotionInstanceDescriptor API_AVAILABLE(macos(14.0), ios(17.0));
|
|
1006
|
+
|
|
1007
|
+
typedef NS_ENUM(NSInteger, MTLTransformType) {
|
|
1008
|
+
/**
|
|
1009
|
+
* @brief A tightly packed matrix with 4 columns and 3 rows. The full transform is assumed
|
|
1010
|
+
* to be a 4x4 matrix with the last row being (0, 0, 0, 1).
|
|
1011
|
+
*/
|
|
1012
|
+
MTLTransformTypePackedFloat4x3 = 0,
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* @brief A transformation represented by individual components such as translation and
|
|
1016
|
+
* rotation. The rotation is represented by a quaternion, allowing for correct motion
|
|
1017
|
+
* interpolation.
|
|
1018
|
+
*/
|
|
1019
|
+
MTLTransformTypeComponent = 1,
|
|
1020
|
+
} API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* @brief Descriptor for an instance acceleration structure
|
|
1024
|
+
*/
|
|
1025
|
+
MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
|
|
1026
|
+
@interface MTLInstanceAccelerationStructureDescriptor : MTLAccelerationStructureDescriptor
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* @brief Buffer containing instance descriptors of the type specified by the instanceDescriptorType property
|
|
1030
|
+
*/
|
|
1031
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> instanceDescriptorBuffer;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* @brief Offset into the instance descriptor buffer. Must be a multiple of 64 bytes and must be
|
|
1035
|
+
* aligned to the platform's buffer offset alignment.
|
|
1036
|
+
*/
|
|
1037
|
+
@property (nonatomic) NSUInteger instanceDescriptorBufferOffset;
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* @brief Stride, in bytes, between instance descriptors in the instance descriptor buffer. Must
|
|
1041
|
+
* be at least the size of the instance descriptor type and must be a multiple of 4 bytes.
|
|
1042
|
+
* Defaults to the size of the instance descriptor type.
|
|
1043
|
+
*/
|
|
1044
|
+
@property (nonatomic) NSUInteger instanceDescriptorStride;
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* @brief Number of instance descriptors
|
|
1048
|
+
*/
|
|
1049
|
+
@property (nonatomic) NSUInteger instanceCount;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* @brief Acceleration structures to be instanced
|
|
1053
|
+
*/
|
|
1054
|
+
@property (nonatomic, retain, nullable) NSArray <id <MTLAccelerationStructure>> * instancedAccelerationStructures;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* @brief Type of instance descriptor in the instance descriptor buffer. Defaults to
|
|
1058
|
+
* MTLAccelerationStructureInstanceDescriptorTypeDefault.
|
|
1059
|
+
*/
|
|
1060
|
+
@property (nonatomic) MTLAccelerationStructureInstanceDescriptorType instanceDescriptorType API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* @brief Buffer containing transformation information for motion
|
|
1064
|
+
*/
|
|
1065
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> motionTransformBuffer API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* @brief Offset into the instance motion descriptor buffer. Must be a multiple of 64 bytes and
|
|
1069
|
+
* must be aligned to the platform's buffer offset alignment.
|
|
1070
|
+
*/
|
|
1071
|
+
@property (nonatomic) NSUInteger motionTransformBufferOffset API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* @brief Number of motion transforms
|
|
1075
|
+
*/
|
|
1076
|
+
@property (nonatomic) NSUInteger motionTransformCount API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Matrix layout of the transformation matrices in the instance descriptors
|
|
1080
|
+
* in the instance descriptor buffer and the transformation matrices in the
|
|
1081
|
+
* transformation matrix buffer. Defaults to MTLMatrixLayoutColumnMajor.
|
|
1082
|
+
*/
|
|
1083
|
+
@property (nonatomic) MTLMatrixLayout instanceTransformationMatrixLayout API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* @brief Type of motion transforms. Defaults to MTLTransformTypePackedFloat4x3.
|
|
1087
|
+
*/
|
|
1088
|
+
@property (nonatomic) MTLTransformType motionTransformType API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
1089
|
+
/**
|
|
1090
|
+
* @brief Motion transform stride. Defaults to 0, indicating that transforms are tightly packed according to the
|
|
1091
|
+
* motion transform type.
|
|
1092
|
+
*/
|
|
1093
|
+
@property (nonatomic) NSUInteger motionTransformStride API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
1094
|
+
|
|
1095
|
+
+ (instancetype)descriptor;
|
|
1096
|
+
|
|
1097
|
+
@end
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* @brief Descriptor for an instance acceleration structure built with an indirected buffer of instances.
|
|
1101
|
+
*/
|
|
1102
|
+
MTL_EXPORT API_AVAILABLE(macos(14.0), ios(17.0))
|
|
1103
|
+
@interface MTLIndirectInstanceAccelerationStructureDescriptor : MTLAccelerationStructureDescriptor
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* @brief Buffer containing instance descriptors of the type specified by the instanceDescriptorType property
|
|
1107
|
+
*/
|
|
1108
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> instanceDescriptorBuffer;
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* @brief Offset into the instance descriptor buffer. Must be a multiple of 64 bytes and must be
|
|
1112
|
+
* aligned to the platform's buffer offset alignment.
|
|
1113
|
+
*/
|
|
1114
|
+
@property (nonatomic) NSUInteger instanceDescriptorBufferOffset;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* @brief Stride, in bytes, between instance descriptors in the instance descriptor buffer. Must
|
|
1118
|
+
* be at least the size of the instance descriptor type and must be a multiple of 4 bytes.
|
|
1119
|
+
* Defaults to the size of the instance descriptor type.
|
|
1120
|
+
*/
|
|
1121
|
+
@property (nonatomic) NSUInteger instanceDescriptorStride;
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* @brief Maximum number of instance descriptors
|
|
1125
|
+
*/
|
|
1126
|
+
@property (nonatomic) NSUInteger maxInstanceCount;
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* @brief Buffer containing the instance count as a uint32_t value. Value at build time
|
|
1130
|
+
* must be less than or equal to maxInstanceCount.
|
|
1131
|
+
*/
|
|
1132
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> instanceCountBuffer;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* @brief Offset into the instance count buffer. Must be a multiple of 4 bytes and must be
|
|
1136
|
+
* aligned to the platform's buffer offset alignment.
|
|
1137
|
+
*/
|
|
1138
|
+
@property (nonatomic) NSUInteger instanceCountBufferOffset;
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* @brief Type of instance descriptor in the instance descriptor buffer. Defaults to
|
|
1142
|
+
* MTLAccelerationStructureInstanceDescriptorTypeIndirect. Must be
|
|
1143
|
+
* MTLAccelerationStructureInstanceDescriptorTypeIndirect or
|
|
1144
|
+
* MTLAccelerationStructureInstanceDescriptorTypeIndirectMotion.
|
|
1145
|
+
*/
|
|
1146
|
+
@property (nonatomic) MTLAccelerationStructureInstanceDescriptorType instanceDescriptorType;
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* @brief Buffer containing transformation information for motion
|
|
1150
|
+
*/
|
|
1151
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> motionTransformBuffer;
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* @brief Offset into the instance motion descriptor buffer. Must be a multiple of 64 bytes and
|
|
1155
|
+
* must be aligned to the platform's buffer offset alignment.
|
|
1156
|
+
*/
|
|
1157
|
+
@property (nonatomic) NSUInteger motionTransformBufferOffset;
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* @brief Maximum number of motion transforms
|
|
1161
|
+
*/
|
|
1162
|
+
@property (nonatomic) NSUInteger maxMotionTransformCount;
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* @brief Buffer containing the motion transform count as a uint32_t value. Value at build time
|
|
1166
|
+
* must be less than or equal to maxMotionTransformCount.
|
|
1167
|
+
*/
|
|
1168
|
+
@property (nonatomic, retain, nullable) id <MTLBuffer> motionTransformCountBuffer;
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* @brief Offset into the motion transform count buffer. Must be a multiple of 4 bytes and must be
|
|
1172
|
+
* aligned to the platform's buffer offset alignment.
|
|
1173
|
+
*/
|
|
1174
|
+
@property (nonatomic) NSUInteger motionTransformCountBufferOffset;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Matrix layout of the transformation matrices in the instance descriptors
|
|
1178
|
+
* in the instance descriptor buffer and the transformation matrices in the
|
|
1179
|
+
* transformation matrix buffer. Defaults to MTLMatrixLayoutColumnMajor.
|
|
1180
|
+
*/
|
|
1181
|
+
@property (nonatomic) MTLMatrixLayout instanceTransformationMatrixLayout API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* @brief Type of motion transforms. Defaults to MTLTransformTypePackedFloat4x3.
|
|
1185
|
+
*/
|
|
1186
|
+
@property (nonatomic) MTLTransformType motionTransformType API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* @brief Motion transform stride. Defaults to 0, indicating that transforms are tightly packed according to the
|
|
1190
|
+
* motion transform type.
|
|
1191
|
+
*/
|
|
1192
|
+
@property (nonatomic) NSUInteger motionTransformStride API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.1), visionos(2.1));
|
|
1193
|
+
|
|
1194
|
+
+ (instancetype)descriptor;
|
|
1195
|
+
|
|
1196
|
+
@end
|
|
1197
|
+
|
|
1198
|
+
API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
|
|
1199
|
+
@protocol MTLAccelerationStructure <MTLResource>
|
|
1200
|
+
|
|
1201
|
+
@property (nonatomic, readonly) NSUInteger size;
|
|
1202
|
+
|
|
1203
|
+
/*!
|
|
1204
|
+
@property gpuResourceID
|
|
1205
|
+
@abstract Handle of the GPU resource suitable for storing in an Argument Buffer
|
|
1206
|
+
*/
|
|
1207
|
+
@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
|
|
1208
|
+
|
|
1209
|
+
@end
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
NS_ASSUME_NONNULL_END
|