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.
Files changed (406) hide show
  1. package/cli/bridge-flow-runner.ts +61 -39
  2. package/cli/commands/agent-wrapper.ts +21 -10
  3. package/cli/commands/control.ts +27 -7
  4. package/cli/commands/coverage-swift.ts +72 -5
  5. package/cli/commands/coverage.ts +1 -1
  6. package/cli/commands/detect.ts +17 -4
  7. package/cli/commands/inspect/actions.ts +1 -0
  8. package/cli/commands/maestro-compare.ts +25 -99
  9. package/cli/commands/screenshot.ts +12 -0
  10. package/cli/help-core.ts +3 -4
  11. package/cli/maestro-compare.ts +172 -4
  12. package/cli/outbound-endpoints.ts +2 -10
  13. package/detox/index.ts +15 -0
  14. package/detox/launch-permissions.ts +169 -0
  15. package/dist-lib/agent-daemon-client.cjs +2 -2
  16. package/dist-lib/agent-events.cjs +2 -2
  17. package/dist-lib/attached-projects.cjs +2 -2
  18. package/dist-lib/auth/shared-session.cjs +2 -2
  19. package/dist-lib/backend-origin.cjs +2 -2
  20. package/dist-lib/beta.cjs +2 -2
  21. package/dist-lib/beta.mjs +1 -1
  22. package/dist-lib/bridge-constants.cjs +2 -2
  23. package/dist-lib/bridge-contract-input.cjs +2 -2
  24. package/dist-lib/bridge-contract-input.mjs +1 -1
  25. package/dist-lib/bridge-contract.cjs +2 -2
  26. package/dist-lib/bridge-contract.mjs +1 -1
  27. package/dist-lib/bundle-channel.cjs +6729 -3591
  28. package/dist-lib/capture-contract.cjs +2 -2
  29. package/dist-lib/capture-contract.mjs +1 -1
  30. package/dist-lib/cloud-contract.cjs +2 -2
  31. package/dist-lib/cloud-contract.mjs +1 -1
  32. package/dist-lib/cloud-test-args.cjs +2 -2
  33. package/dist-lib/cloud-test-args.mjs +1 -1
  34. package/dist-lib/cloud.cjs +2 -2
  35. package/dist-lib/cloud.mjs +1 -1
  36. package/dist-lib/config.cjs +2 -2
  37. package/dist-lib/config.mjs +1 -1
  38. package/dist-lib/detox/index.cjs +104 -3
  39. package/dist-lib/dev-bundle-resolution.cjs +208 -44
  40. package/dist-lib/expo-swift-bundle.cjs +3475 -2137
  41. package/dist-lib/expo-swift-metadata.cjs +2 -2
  42. package/dist-lib/expo-swift-metadata.mjs +1 -1
  43. package/dist-lib/home-paths.cjs +2 -2
  44. package/dist-lib/host/bridge-host.cjs +8970 -3652
  45. package/dist-lib/host/fetch-proxy-handler.cjs +332 -40
  46. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  47. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  48. package/dist-lib/host/replacement-module-handler.cjs +2 -2
  49. package/dist-lib/host/websocket-proxy.cjs +2 -2
  50. package/dist-lib/index.cjs +469 -143
  51. package/dist-lib/jump-to-source-babel.cjs +2 -2
  52. package/dist-lib/jump-to-source-native.cjs +2 -2
  53. package/dist-lib/kotlin-host.cjs +2 -2
  54. package/dist-lib/menu.cjs +2 -2
  55. package/dist-lib/menu.mjs +1 -1
  56. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  57. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  58. package/dist-lib/metro-production-bundle.cjs +2 -2
  59. package/dist-lib/metro-production-bundle.mjs +1 -1
  60. package/dist-lib/metro.cjs +465 -139
  61. package/dist-lib/native-app-identity-project.cjs +209 -86
  62. package/dist-lib/native-app-identity-project.mjs +251 -116
  63. package/dist-lib/native-app-identity.cjs +2 -2
  64. package/dist-lib/native-app-identity.mjs +1 -1
  65. package/dist-lib/native-firebase-metadata.cjs +2 -2
  66. package/dist-lib/native-firebase-metadata.mjs +1 -1
  67. package/dist-lib/plist.cjs +2 -2
  68. package/dist-lib/plist.mjs +1 -1
  69. package/dist-lib/profiles.cjs +2 -2
  70. package/dist-lib/public-brand.cjs +2 -2
  71. package/dist-lib/public-origins-lib-esm.json +27 -23
  72. package/dist-lib/public-origins-lib.json +221 -88
  73. package/dist-lib/react-native-host-modules.cjs +2 -2
  74. package/dist-lib/react-native-host-modules.mjs +1 -1
  75. package/dist-lib/reap-browser.cjs +2 -2
  76. package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
  77. package/dist-lib/sdk.cjs +3 -3
  78. package/dist-lib/sdk.mjs +2 -2
  79. package/dist-lib/skills.cjs +20997 -16596
  80. package/dist-lib/swift-compile.cjs +3075 -459
  81. package/dist-lib/swift-compile.mjs +3028 -415
  82. package/dist-lib/swift-package.cjs +131 -69
  83. package/dist-lib/swift-package.mjs +126 -68
  84. package/dist-lib/swift-submit.cjs +2 -2
  85. package/dist-lib/swift-submit.mjs +1 -1
  86. package/dist-lib/swift-toolchain.cjs +31 -4
  87. package/dist-lib/swift.cjs +2 -2
  88. package/dist-lib/vite-swift.cjs +5049 -1704
  89. package/dist-lib/vite.cjs +261 -58
  90. package/dist-lib/worklet-executable.cjs +8 -5
  91. package/dist-lib/worklet-executable.mjs +7 -4
  92. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +15 -1
  93. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
  94. package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
  95. package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
  96. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
  97. package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
  98. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  99. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
  100. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
  101. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
  102. package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
  103. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
  104. package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
  105. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +6 -0
  106. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  107. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
  108. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
  109. package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
  110. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  111. package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
  112. package/package.json +1 -1
  113. package/runtime-companion.json +1 -1
  114. package/scripts/dev-server-scanner.ts +4 -0
  115. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
  116. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
  117. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
  118. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
  119. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
  120. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
  121. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
  122. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
  123. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
  124. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
  125. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
  126. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
  127. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
  128. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
  129. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
  130. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
  131. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
  132. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
  133. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
  134. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
  135. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
  136. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
  137. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
  138. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
  139. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
  140. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
  141. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
  142. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
  143. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
  144. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
  145. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
  146. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
  147. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
  148. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
  149. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
  150. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
  151. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
  152. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
  153. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
  154. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
  155. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
  156. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
  157. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
  158. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
  159. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
  160. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
  161. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
  162. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
  163. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
  164. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
  165. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
  166. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
  167. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
  181. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
  182. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -220
  183. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
  184. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
  185. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
  186. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
  187. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
  188. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
  189. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
  198. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
  199. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
  200. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
  201. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
  202. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
  203. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
  204. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
  205. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
  206. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
  207. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
  208. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
  209. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
  210. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
  211. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
  212. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
  213. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
  214. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +98 -3
  215. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
  216. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
  217. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
  218. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
  219. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
  220. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
  221. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
  222. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
  223. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
  224. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
  225. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
  226. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
  227. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
  228. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
  229. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
  230. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
  231. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
  232. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
  233. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
  234. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
  235. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
  236. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
  237. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
  238. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
  239. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
  240. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
  241. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
  242. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
  243. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
  244. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
  245. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
  246. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
  247. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
  248. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
  249. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
  250. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
  251. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
  252. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
  253. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
  254. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
  255. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
  256. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
  257. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
  258. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
  259. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
  260. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
  261. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
  262. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
  263. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
  264. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
  265. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
  266. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
  267. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
  268. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
  269. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
  270. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
  271. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
  272. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
  273. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
  274. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
  275. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
  276. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
  277. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
  278. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
  279. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
  280. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
  281. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
  282. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
  283. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
  284. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
  285. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
  286. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
  287. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
  288. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
  289. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
  290. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
  291. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
  292. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
  293. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
  294. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
  295. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
  296. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
  297. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
  298. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
  299. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
  300. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
  301. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
  302. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
  303. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
  304. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
  305. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
  306. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
  307. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
  308. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
  309. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
  310. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
  311. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
  312. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
  313. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
  314. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
  315. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
  316. package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
  317. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
  318. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
  319. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
  320. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
  321. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
  322. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
  323. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
  324. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
  325. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
  326. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
  327. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
  328. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
  329. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
  330. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
  331. package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
  332. package/sdk/ios/usr/include/complex.h +167 -0
  333. package/sdk/ios/usr/include/copyfile.h +143 -0
  334. package/sdk/ios/usr/include/dispatch/dispatch.h +5 -0
  335. package/sdk/ios/usr/include/mach/mach_types.h +1 -0
  336. package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
  337. package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
  338. package/sdk/ios/usr/include/malloc/_platform.h +80 -0
  339. package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
  340. package/sdk/ios/usr/include/malloc/malloc.h +768 -0
  341. package/sdk/ios/usr/include/math.h +835 -2
  342. package/sdk/ios/usr/include/os/availability.h +168 -6
  343. package/sdk/ios/usr/include/os/base.h +351 -0
  344. package/sdk/ios/usr/include/os/clock.h +18 -0
  345. package/sdk/ios/usr/include/os/lock.h +232 -10
  346. package/sdk/ios/usr/include/os/log.h +521 -38
  347. package/sdk/ios/usr/include/os/object.h +320 -3
  348. package/sdk/ios/usr/include/os/trace.h +492 -0
  349. package/sdk/ios/usr/include/os/trace_base.h +167 -0
  350. package/sdk/ios/usr/include/os/workgroup.h +37 -0
  351. package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
  352. package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
  353. package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
  354. package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
  355. package/sdk/ios/usr/include/sys/cdefs.h +38 -1
  356. package/sdk/ios/wasm/include/unistd.h +3 -0
  357. package/skills/contrast/SKILL.md +3 -0
  358. package/src/codex-client.ts +11 -6
  359. package/src/dev-bundle-resolution.ts +124 -48
  360. package/src/expo-native-workspace.ts +176 -0
  361. package/src/expo-swift-host.ts +161 -26
  362. package/src/expo-swift-ready.ts +14 -28
  363. package/src/expoSwiftContract.ts +4 -1
  364. package/src/generated/swift-c-predefines.json +2044 -0
  365. package/src/host/bridge-host.ts +5 -0
  366. package/src/installed-package-versions.ts +14 -1
  367. package/src/metro-project-root.ts +44 -33
  368. package/src/native-app-identity-project.ts +1 -0
  369. package/src/nitro-adapter.lock.json +916 -10
  370. package/src/nitro-adapter.ts +33 -24
  371. package/src/nitro-bundle.ts +108 -21
  372. package/src/nitro-compile.ts +36 -5
  373. package/src/nitro-source.ts +13 -3
  374. package/src/nitroAdapterContract.ts +100 -20
  375. package/src/nitroContract.ts +18 -2
  376. package/src/node-http-fetch.ts +116 -0
  377. package/src/packageVersionsContract.ts +46 -0
  378. package/src/serverDiscoveryContract.ts +1 -0
  379. package/src/settingsContract.ts +0 -30
  380. package/src/swift-binary-modules.ts +20 -5
  381. package/src/swift-compile.ts +598 -81
  382. package/src/swift-coverage/package.ts +3 -1
  383. package/src/swift-coverage/xcode-assets.ts +66 -5
  384. package/src/swift-coverage/xcode-packages.ts +11 -6
  385. package/src/swift-host.ts +347 -60
  386. package/src/swift-objc-compile.ts +52 -10
  387. package/src/swift-objc-metadata.ts +2 -2
  388. package/src/swift-objc-platform.ts +2 -2
  389. package/src/swift-objc-standin.ts +53 -13
  390. package/src/swift-package-manifest.ts +151 -28
  391. package/src/swift-package.ts +158 -75
  392. package/src/swift-packages.ts +141 -44
  393. package/src/swift-source-file.ts +10 -15
  394. package/src/swift-source-pods.ts +126 -41
  395. package/src/swift-standin-digest.ts +77 -0
  396. package/src/swift-standin-emit.ts +40 -4
  397. package/src/swift-standins.ts +154 -31
  398. package/src/swift-submit.ts +5 -0
  399. package/src/swift-toolchain.ts +38 -0
  400. package/src/swiftContract.ts +168 -75
  401. package/src/target-matcher.ts +15 -2
  402. package/src/vite-plugin.ts +0 -10
  403. package/src/worklet-executable.ts +7 -3
  404. package/src/xcode-json-project.ts +14 -2
  405. package/src/xcode-project.ts +215 -100
  406. package/src/settings-flags.ts +0 -107
@@ -0,0 +1,322 @@
1
+ //
2
+ // MTLAccelerationStructureCommandEncoder.h
3
+ // Metal
4
+ //
5
+ // Copyright © 2019 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/MTLBuffer.h>
12
+ #import <Metal/MTLArgument.h>
13
+ #import <Metal/MTLCommandEncoder.h>
14
+ #import <Metal/MTLFence.h>
15
+ #import <Metal/MTLCommandBuffer.h>
16
+ #import <Metal/MTLAccelerationStructure.h>
17
+
18
+
19
+ NS_ASSUME_NONNULL_BEGIN
20
+
21
+ API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
22
+ @protocol MTLAccelerationStructureCommandEncoder <MTLCommandEncoder>
23
+
24
+ /*!
25
+ * @brief Encode an acceleration structure build into the command buffer. All bottom-level acceleration
26
+ * structure builds must have completed before a top-level acceleration structure build may begin. The
27
+ * resulting acceleration structure will not retain any references to the input vertex buffer, instance buffer, etc.
28
+ *
29
+ * The acceleration structure build will not be completed until the command buffer has been committed
30
+ * and finished executing. However, it is safe to encode ray tracing work against the acceleration
31
+ * structure as long as the command buffers are scheduled and synchronized such that the command buffer
32
+ * will have completed by the time the ray tracing starts.
33
+ *
34
+ * The acceleration structure and scratch buffer must be at least the size returned by the
35
+ * [MTLDevice accelerationStructureSizesWithDescriptor:] query.
36
+ *
37
+ * @param accelerationStructure Acceleration structure storage to build into
38
+ * @param descriptor Object describing the acceleration structure to build
39
+ * @param scratchBuffer Scratch buffer to use while building the acceleration structure. The
40
+ * contents may be overwritten and are undefined after the build has
41
+ * started/completed.
42
+ * @param scratchBufferOffset Offset into the scratch buffer
43
+ */
44
+ - (void)buildAccelerationStructure:(id <MTLAccelerationStructure>)accelerationStructure
45
+ descriptor:(MTLAccelerationStructureDescriptor *)descriptor
46
+ scratchBuffer:(id <MTLBuffer>)scratchBuffer
47
+ scratchBufferOffset:(NSUInteger)scratchBufferOffset;
48
+
49
+ /*!
50
+ * @brief Encode an acceleration structure refit into the command buffer. Refitting can be used to
51
+ * update the acceleration structure when geometry changes and is much faster than rebuilding from
52
+ * scratch. However, the quality of the acceleration structure and the subsequent ray tracing
53
+ * performance will degrade depending on how much the geometry changes.
54
+ *
55
+ * Refitting can not be used after certain changes, such as adding or removing geometry. Acceleration
56
+ * structures can be refit in place by specifying the same source and destination acceleration structures
57
+ * or by providing a nil destination acceleration structure. If the source and destination acceleration
58
+ * structures are not the same, they must not overlap in memory.
59
+ *
60
+ * The destination acceleration structure must be at least as large as the source acceleration structure,
61
+ * unless the source acceleration structure has been compacted, in which case the destination acceleration
62
+ * structure must be at least as large as the compacted size of the source acceleration structure.
63
+ *
64
+ * The scratch buffer must be at least the size returned by the accelerationStructureSizesWithDescriptor
65
+ * method of the MTLDevice.
66
+ *
67
+ * @param descriptor Object describing the acceleration structure to build
68
+ * @param sourceAccelerationStructure Acceleration structure to copy from
69
+ * @param destinationAccelerationStructure Acceleration structure to copy to
70
+ * @param scratchBuffer Scratch buffer to use while refitting the acceleration
71
+ * structure. The contents may be overwritten and are undefined
72
+ * after the refit has started/completed.
73
+ * @param scratchBufferOffset Offset into the scratch buffer.
74
+ */
75
+ - (void)refitAccelerationStructure:(id <MTLAccelerationStructure>)sourceAccelerationStructure
76
+ descriptor:(MTLAccelerationStructureDescriptor *)descriptor
77
+ destination:(nullable id <MTLAccelerationStructure>)destinationAccelerationStructure
78
+ scratchBuffer:(nullable id <MTLBuffer>)scratchBuffer
79
+ scratchBufferOffset:(NSUInteger)scratchBufferOffset;
80
+
81
+ /*!
82
+ * @brief Encode an acceleration structure refit into the command buffer. Refitting can be used to
83
+ * update the acceleration structure when geometry changes and is much faster than rebuilding from
84
+ * scratch. However, the quality of the acceleration structure and the subsequent ray tracing
85
+ * performance will degrade depending on how much the geometry changes.
86
+ *
87
+ * Refitting can not be used after certain changes, such as adding or removing geometry. Acceleration
88
+ * structures can be refit in place by specifying the same source and destination acceleration structures
89
+ * or by providing a nil destination acceleration structure. If the source and destination acceleration
90
+ * structures are not the same, they must not overlap in memory.
91
+ *
92
+ * The destination acceleration structure must be at least as large as the source acceleration structure,
93
+ * unless the source acceleration structure has been compacted, in which case the destination acceleration
94
+ * structure must be at least as large as the compacted size of the source acceleration structure.
95
+ *
96
+ * The scratch buffer must be at least the size returned by the accelerationStructureSizesWithDescriptor
97
+ * method of the MTLDevice.
98
+ *
99
+ * @param descriptor Object describing the acceleration structure to build
100
+ * @param sourceAccelerationStructure Acceleration structure to copy from
101
+ * @param destinationAccelerationStructure Acceleration structure to copy to
102
+ * @param scratchBuffer Scratch buffer to use while refitting the acceleration
103
+ * structure. The contents may be overwritten and are undefined
104
+ * after the refit has started/completed.
105
+ * @param scratchBufferOffset Offset into the scratch buffer.
106
+ * @param options Options specifying the elements of the acceleration structure to refit.
107
+ */
108
+ - (void)refitAccelerationStructure:(id <MTLAccelerationStructure>)sourceAccelerationStructure
109
+ descriptor:(MTLAccelerationStructureDescriptor *)descriptor
110
+ destination:(nullable id <MTLAccelerationStructure>)destinationAccelerationStructure
111
+ scratchBuffer:(nullable id <MTLBuffer>)scratchBuffer
112
+ scratchBufferOffset:(NSUInteger)scratchBufferOffset
113
+ options:(MTLAccelerationStructureRefitOptions)options
114
+ API_AVAILABLE(macos(13.0), ios(16.0));
115
+
116
+ /*!
117
+ * @brief Copy an acceleration structure. The source and destination acceleration structures must not
118
+ * overlap in memory. If this is a top level acceleration structure, references to bottom level
119
+ * acceleration structures will be preserved.
120
+ *
121
+ * The destination acceleration structure must be at least as large as the source acceleration structure,
122
+ * unless the source acceleration structure has been compacted, in which case the destination acceleration
123
+ * structure must be at least as large as the compacted size of the source acceleration structure.
124
+ *
125
+ * @param sourceAccelerationStructure Acceleration structure to copy from
126
+ * @param destinationAccelerationStructure Acceleration structure to copy to
127
+ */
128
+ - (void)copyAccelerationStructure:(id <MTLAccelerationStructure>)sourceAccelerationStructure
129
+ toAccelerationStructure:(id <MTLAccelerationStructure>)destinationAccelerationStructure;
130
+
131
+ /*!
132
+ * @brief Compute the compacted size for an acceleration structure and write it into a buffer.
133
+ *
134
+ * This size is potentially smaller than the source acceleration structure. To perform compaction,
135
+ * read this size from the buffer once the command buffer has completed and use it to allocate a
136
+ * smaller acceleration structure. Then create another encoder and call the
137
+ * copyAndCompactAccelerationStructure method.
138
+ *
139
+ * @param accelerationStructure Source acceleration structure
140
+ * @param buffer Destination size buffer. The compacted size will be written as a 32 bit
141
+ * unsigned integer representing the compacted size in bytes.
142
+ * @param offset Offset into the size buffer
143
+ */
144
+ - (void)writeCompactedAccelerationStructureSize:(id <MTLAccelerationStructure>)accelerationStructure
145
+ toBuffer:(id <MTLBuffer>)buffer
146
+ offset:(NSUInteger)offset;
147
+
148
+ /*!
149
+ * @brief Compute the compacted size for an acceleration structure and write it into a buffer.
150
+ *
151
+ * This size is potentially smaller than the source acceleration structure. To perform compaction,
152
+ * read this size from the buffer once the command buffer has completed and use it to allocate a
153
+ * smaller acceleration structure. Then create another encoder and call the
154
+ * copyAndCompactAccelerationStructure method.
155
+ *
156
+ * @param accelerationStructure Source acceleration structure
157
+ * @param buffer Destination size buffer. The compacted size will be written as either
158
+ * a 32 bit or 64 bit value depending on the sizeDataType argument
159
+ * unsigned integer representing the compacted size in bytes.
160
+ * @param offset Offset into the size buffer
161
+ * @param sizeDataType Data type of the size to write into the buffer. Must be either
162
+ * MTLDataTypeUInt (32 bit) or MTLDataTypeULong (64 bit)
163
+ */
164
+ - (void)writeCompactedAccelerationStructureSize:(id <MTLAccelerationStructure>)accelerationStructure
165
+ toBuffer:(id <MTLBuffer>)buffer
166
+ offset:(NSUInteger)offset
167
+ sizeDataType:(MTLDataType)sizeDataType API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
168
+
169
+ /*!
170
+ * @brief Copy and compact an acceleration structure. The source and destination acceleration structures
171
+ * must not overlap in memory. If this is a top level acceleration structure, references to bottom level
172
+ * acceleration structures will be preserved.
173
+ *
174
+ * The destination acceleration structure must be at least as large as the compacted size of the source
175
+ * acceleration structure, which is computed by the writeCompactedAccelerationStructureSize method.
176
+ *
177
+ * @param sourceAccelerationStructure Acceleration structure to copy and compact
178
+ * @param destinationAccelerationStructure Acceleration structure to copy to
179
+ */
180
+ - (void)copyAndCompactAccelerationStructure:(id <MTLAccelerationStructure>)sourceAccelerationStructure
181
+ toAccelerationStructure:(id <MTLAccelerationStructure>)destinationAccelerationStructure;
182
+
183
+ /*!
184
+ @method updateFence:
185
+ @abstract Update the fence to capture all GPU work so far enqueued by this encoder.
186
+ @discussion The fence is updated at build submission to maintain global order and prevent deadlock.
187
+ Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
188
+ */
189
+ - (void)updateFence:(id <MTLFence>)fence;
190
+
191
+ /*!
192
+ @method waitForFence:
193
+ @abstract Prevent further GPU work until the fence is reached.
194
+ @discussion The fence is evaluated at build submission to maintain global order and prevent deadlock.
195
+ Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
196
+ */
197
+ - (void)waitForFence:(id <MTLFence>)fence;
198
+
199
+ /*!
200
+ * @method useResource:usage:
201
+ * @abstract Declare that a resource may be accessed by the command encoder through an argument buffer
202
+ *
203
+ * @discussion For tracked MTLResources, this method protects against data hazards. This method must be called before encoding any acceleration structure commands which may access the resource through an argument buffer.
204
+ * @warning Prior to iOS 13, macOS 10.15, this method does not protect against data hazards. If you are deploying to older versions of macOS or iOS, use fences to ensure data hazards are resolved.
205
+ */
206
+ - (void)useResource:(id <MTLResource>)resource usage:(MTLResourceUsage)usage;
207
+
208
+ /*!
209
+ * @method useResources:count:usage:
210
+ * @abstract Declare that an array of resources may be accessed through an argument buffer by the command encoder
211
+ * @discussion For tracked MTL Resources, this method protects against data hazards. This method must be called before encoding any acceleration structure commands which may access the resources through an argument buffer.
212
+ * @warning Prior to iOS 13, macOS 10.15, this method does not protect against data hazards. If you are deploying to older versions of macOS or iOS, use fences to ensure data hazards are resolved.
213
+ */
214
+ - (void)useResources:(const id <MTLResource> __nonnull[__nonnull])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage;
215
+
216
+ /*!
217
+ * @method useHeap:
218
+ * @abstract Declare that the resources allocated from a heap may be accessed as readonly by the encoder through an argument buffer
219
+ * @discussion For tracked MTLHeaps, this method protects against data hazards. This method must be called before encoding any acceleration structure commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
220
+ * @warning Prior to iOS 13, macOS 10.15, this method does not protect against data hazards. If you are deploying to older versions of macOS or iOS, use fences to ensure data hazards are resolved.
221
+ */
222
+ - (void)useHeap:(id <MTLHeap>)heap;
223
+
224
+ /*!
225
+ * @method useHeaps:count:
226
+ * @abstract Declare that the resources allocated from an array of heaps may be accessed as readonly by the encoder through an argument buffer
227
+ * @discussion For tracked MTLHeaps, this method protects against data hazards. This method must be called before encoding any acceleration structure commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
228
+ * @warning Prior to iOS 13, macOS 10.15, this method does not protect against data hazards. If you are deploying to older versions of macOS or iOS, use fences to ensure data hazards are resolved.
229
+ */
230
+ - (void)useHeaps:(const id <MTLHeap> __nonnull[__nonnull])heaps count:(NSUInteger)count;
231
+
232
+ /*!
233
+ @method sampleCountersInBuffer:atSampleIndex:withBarrier:
234
+ @abstract Sample hardware counters at this point in the acceleration structure
235
+ encoder and store the counter sample into the sample buffer at the specified index.
236
+ @param sampleBuffer The sample buffer to sample into
237
+ @param sampleIndex The index into the counter buffer to write the sample
238
+ @param barrier Insert a barrier before taking the sample. Passing
239
+ YES will ensure that all work encoded before this operation in the encoder is
240
+ complete but does not isolate the work with respect to other encoders. Passing
241
+ NO will allow the sample to be taken concurrently with other operations in this
242
+ encoder.
243
+ In general, passing YES will lead to more repeatable counter results but
244
+ may negatively impact performance. Passing NO will generally be higher performance
245
+ but counter results may not be repeatable.
246
+ */
247
+ -(void)sampleCountersInBuffer:(id<MTLCounterSampleBuffer>)sampleBuffer
248
+ atSampleIndex:(NSUInteger)sampleIndex
249
+ withBarrier:(BOOL)barrier API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
250
+
251
+ @end
252
+
253
+
254
+ MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
255
+ @interface MTLAccelerationStructurePassSampleBufferAttachmentDescriptor : NSObject<NSCopying>
256
+ /*!
257
+ @property sampleBuffer
258
+ @abstract The sample buffer to store samples for the acceleration structure pass defined samples.
259
+ If sampleBuffer is non-nil, the sample indices will be used to store samples into
260
+ the sample buffer. If no sample buffer is provided, no samples will be taken.
261
+ If any of the sample indices are specified as MTLCounterDontSample, no sample
262
+ will be taken for that action.
263
+ */
264
+ @property (nullable, nonatomic, retain) id<MTLCounterSampleBuffer> sampleBuffer;
265
+
266
+ /*!
267
+ @property startOfEncoderSampleIndex
268
+ @abstract The sample index to use to store the sample taken at the start of
269
+ command encoder processing. Setting the value to MTLCounterDontSample will cause
270
+ this sample to be omitted.
271
+ @discussion On devices where MTLCounterSamplingPointAtStageBoundary is unsupported,
272
+ this sample index is invalid and must be set to MTLCounterDontSample or creation of an
273
+ acceleration structure pass will fail.
274
+ */
275
+ @property (nonatomic) NSUInteger startOfEncoderSampleIndex;
276
+ /*!
277
+ @property endOfEncoderSampleIndex
278
+ @abstract The sample index to use to store the sample taken at the end of
279
+ command encoder processing. Setting the value to MTLCounterDontSample will cause
280
+ this sample to be omitted.
281
+ @discussion On devices where MTLCounterSamplingPointAtStageBoundary is unsupported,
282
+ this sample index is invalid and must be set to MTLCounterDontSample or creation of an
283
+ acceleration structure pass will fail.
284
+ */
285
+ @property (nonatomic) NSUInteger endOfEncoderSampleIndex;
286
+ @end
287
+
288
+ MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
289
+ @interface MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray : NSObject
290
+
291
+ /* Individual attachment state access */
292
+ - (MTLAccelerationStructurePassSampleBufferAttachmentDescriptor *)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
293
+
294
+ /* This always uses 'copy' semantics. It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
295
+ - (void)setObject:(nullable MTLAccelerationStructurePassSampleBufferAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
296
+
297
+ @end
298
+
299
+ /*!
300
+ @class MTLAccelerationStructurePassDescriptor
301
+ @abstract MTLAccelerationStructurePassDescriptor represents a collection of attachments to be used to create a concrete acceleration structure encoder.
302
+ */
303
+ MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
304
+ @interface MTLAccelerationStructurePassDescriptor : NSObject <NSCopying>
305
+
306
+ /*!
307
+ @method accelerationStructurePassDescriptor
308
+ @abstract Create an autoreleased default acceleration structure pass descriptor
309
+ */
310
+ + (MTLAccelerationStructurePassDescriptor *)accelerationStructurePassDescriptor;
311
+
312
+ /*!
313
+ @property sampleBufferAttachments
314
+ @abstract An array of sample buffers and associated sample indices.
315
+ */
316
+ @property (readonly) MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray * sampleBufferAttachments;
317
+
318
+ @end
319
+
320
+
321
+ NS_ASSUME_NONNULL_END
322
+
@@ -0,0 +1,224 @@
1
+ #ifdef __METAL_VERSION__
2
+ #import <metal_stdlib>
3
+
4
+ typedef metal::packed_float3 MTLPackedFloat3;
5
+ typedef metal::packed_float4 MTLPackedFloatQuaternion;
6
+ #else
7
+ #include <math.h>
8
+ #include <stdint.h>
9
+
10
+ #ifndef _WIN32
11
+ #import <Metal/MTLDefines.h>
12
+ #else
13
+ #include <Metal/MTLDefines.h>
14
+ #endif // _WIN32
15
+
16
+ #include <Metal/MTL4BufferRange.h>
17
+
18
+ typedef struct _MTLPackedFloat3 {
19
+ union {
20
+ struct {
21
+ float x;
22
+ float y;
23
+ float z;
24
+ };
25
+ float elements[3];
26
+ };
27
+
28
+ #ifdef __cplusplus
29
+ _MTLPackedFloat3()
30
+ : x(0.0f), y(0.0f), z(0.0f)
31
+ {
32
+ }
33
+
34
+ _MTLPackedFloat3(float x, float y, float z)
35
+ : x(x), y(y), z(z)
36
+ {
37
+ }
38
+
39
+ float & operator[](int idx) {
40
+ return elements[idx];
41
+ }
42
+
43
+ const float & operator[](int idx) const {
44
+ return elements[idx];
45
+ }
46
+ #endif
47
+ } MTLPackedFloat3;
48
+
49
+ MTL_INLINE MTLPackedFloat3 MTLPackedFloat3Make(float x, float y, float z)
50
+ {
51
+ MTLPackedFloat3 packedFloat3;
52
+ packedFloat3.x = x;
53
+ packedFloat3.y = y;
54
+ packedFloat3.z = z;
55
+ return packedFloat3;
56
+ }
57
+
58
+ typedef struct MTLPackedFloatQuaternion {
59
+ float x;
60
+ float y;
61
+ float z;
62
+ float w;
63
+
64
+ #ifdef __cplusplus
65
+ MTLPackedFloatQuaternion()
66
+ : x(0.0f), y(0.0f), z(0.0f), w(1.0f)
67
+ {
68
+ }
69
+
70
+ MTLPackedFloatQuaternion(float x, float y, float z, float w)
71
+ : x(x), y(y), z(z), w(w)
72
+ {
73
+ }
74
+
75
+ float & operator[](int idx) {
76
+ float *elements = &x;
77
+
78
+ return elements[idx];
79
+ }
80
+
81
+ const float & operator[](int idx) const {
82
+ const float *elements = &x;
83
+
84
+ return elements[idx];
85
+ }
86
+ #endif
87
+ } MTLPackedFloatQuaternion;
88
+
89
+ MTL_INLINE MTLPackedFloatQuaternion MTLPackedFloatQuaternionMake(float x, float y, float z, float w)
90
+ {
91
+ MTLPackedFloatQuaternion packedQuaternion;
92
+ packedQuaternion.x = x;
93
+ packedQuaternion.y = y;
94
+ packedQuaternion.z = z;
95
+ packedQuaternion.w = w;
96
+ return packedQuaternion;
97
+ }
98
+
99
+ #endif
100
+
101
+ typedef struct _MTLPackedFloat4x3 {
102
+ MTLPackedFloat3 columns[4];
103
+
104
+ #ifdef __cplusplus
105
+ _MTLPackedFloat4x3() {
106
+ columns[0] = MTLPackedFloat3(0.0f, 0.0f, 0.0f);
107
+ columns[1] = MTLPackedFloat3(0.0f, 0.0f, 0.0f);
108
+ columns[2] = MTLPackedFloat3(0.0f, 0.0f, 0.0f);
109
+ columns[3] = MTLPackedFloat3(0.0f, 0.0f, 0.0f);
110
+ }
111
+
112
+ _MTLPackedFloat4x3(MTLPackedFloat3 column0, MTLPackedFloat3 column1, MTLPackedFloat3 column2, MTLPackedFloat3 column3) {
113
+ columns[0] = column0;
114
+ columns[1] = column1;
115
+ columns[2] = column2;
116
+ columns[3] = column3;
117
+ }
118
+
119
+ #ifndef __METAL_VERSION__
120
+ MTLPackedFloat3 & operator[](int idx) {
121
+ return columns[idx];
122
+ }
123
+
124
+ const MTLPackedFloat3 & operator[](int idx) const {
125
+ return columns[idx];
126
+ }
127
+ #else
128
+ thread MTLPackedFloat3 & operator[](int idx) thread {
129
+ return columns[idx];
130
+ }
131
+
132
+ const thread MTLPackedFloat3 & operator[](int idx) const thread {
133
+ return columns[idx];
134
+ }
135
+
136
+ device MTLPackedFloat3 & operator[](int idx) device {
137
+ return columns[idx];
138
+ }
139
+
140
+ const device MTLPackedFloat3 & operator[](int idx) const device {
141
+ return columns[idx];
142
+ }
143
+
144
+ const constant MTLPackedFloat3 & operator[](int idx) const constant {
145
+ return columns[idx];
146
+ }
147
+ #endif
148
+ #endif
149
+ } MTLPackedFloat4x3;
150
+
151
+ /**
152
+ * @brief An axis aligned bounding box with a min and max point
153
+ */
154
+ typedef struct _MTLAxisAlignedBoundingBox {
155
+ /**
156
+ * @brief Minimum point
157
+ */
158
+ MTLPackedFloat3 min;
159
+
160
+ /**
161
+ * @brief Maximum point
162
+ */
163
+ MTLPackedFloat3 max;
164
+
165
+ #ifdef __cplusplus
166
+ _MTLAxisAlignedBoundingBox()
167
+ : min(INFINITY, INFINITY, INFINITY),
168
+ max(-INFINITY, -INFINITY, -INFINITY)
169
+ {
170
+ }
171
+
172
+ #ifdef __METAL_VERSION__
173
+ _MTLAxisAlignedBoundingBox() threadgroup = default;
174
+ #endif
175
+
176
+
177
+ _MTLAxisAlignedBoundingBox(MTLPackedFloat3 p)
178
+ : min(p),
179
+ max(p)
180
+ {
181
+ }
182
+
183
+ _MTLAxisAlignedBoundingBox(MTLPackedFloat3 min, MTLPackedFloat3 max)
184
+ : min(min),
185
+ max(max)
186
+ {
187
+ }
188
+ #endif
189
+ } MTLAxisAlignedBoundingBox;
190
+
191
+ /**
192
+ * @brief A transformation represented by individual components such as translation and
193
+ * rotation. The rotation is represented by a quaternion, allowing for correct motion
194
+ * interpolation.
195
+ */
196
+ typedef struct {
197
+ /**
198
+ * @brief The scale of the instance applied before rotation alongside shear and pivot
199
+ */
200
+ MTLPackedFloat3 scale;
201
+
202
+ /**
203
+ * @brief The shear of the instance applied before rotation alongside scale and pivot
204
+ */
205
+ MTLPackedFloat3 shear;
206
+
207
+ /**
208
+ * @brief Translation applied before rotation alongside scale and shear. Allows
209
+ * rotation to pivot around a point.
210
+ */
211
+ MTLPackedFloat3 pivot;
212
+
213
+ /**
214
+ * @brief The rotation of the instance as a normalized quaternion. Applied after scale,
215
+ * shear, and pivot and before translation
216
+ */
217
+ MTLPackedFloatQuaternion rotation;
218
+
219
+ /**
220
+ * @brief The translation of the instance. Applied after rotation. Typically contains
221
+ * the composition of object translation and the inverse of the pivot translation.
222
+ */
223
+ MTLPackedFloat3 translation;
224
+ } MTLComponentTransform;
@@ -0,0 +1,22 @@
1
+ //
2
+ // MTLAllocation.h
3
+ // Metal
4
+ //
5
+ // Copyright (c) 2024 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <Metal/MTLDefines.h>
10
+
11
+
12
+ /// Base class for Metal allocations.
13
+ ///
14
+ /// This protocol provides a common interface for adding Metal resources to ``MTLResidencySet`` instances. Call
15
+ /// ``MTLResidencySet/addAllocation:`` to add a Metal resource allocation to a residency set.
16
+ ///
17
+ /// <doc:simplifying-gpu-resource-management-with-residency-sets.md>
18
+ API_AVAILABLE(macos(15.0), ios(18.0))
19
+ @protocol MTLAllocation <NSObject>
20
+ @property (readonly) NSUInteger allocatedSize API_AVAILABLE(macos(15.0), ios(18.0));
21
+ @end
22
+