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,1122 @@
1
+ //
2
+ // MTLDevice.h
3
+ // Metal
4
+ //
5
+ // Copyright (c) 2014 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Availability.h>
9
+ #import <Foundation/Foundation.h>
10
+ #import <Metal/MTLDefines.h>
11
+ #import <Metal/MTLGPUAddress.h>
12
+ #import <Metal/MTLTypes.h>
13
+ #import <Metal/MTLPixelFormat.h>
14
+ #import <Metal/MTLResource.h>
15
+ #import <Metal/MTLTensor.h>
16
+ #import <Metal/MTLLibrary.h>
17
+ #import <IOSurface/IOSurfaceRef.h>
18
+ #import <Metal/MTLCounters.h>
19
+
20
+
21
+
22
+ NS_ASSUME_NONNULL_BEGIN
23
+ @protocol MTLCommandQueue;
24
+ @protocol MTLDevice;
25
+ @protocol MTLBuffer;
26
+ @protocol MTLDepthStencilState;
27
+ @protocol MTLFunction;
28
+ @protocol MTLLibrary;
29
+ @protocol MTLTexture;
30
+ @protocol MTLSamplerState;
31
+ @protocol MTLRenderPipelineState;
32
+ @protocol MTLComputePipelineState;
33
+ @protocol MTLHeap;
34
+ @protocol MTLFence;
35
+ @protocol MTLArgumentEncoder;
36
+ @protocol MTLRasterizationRateMap;
37
+ @class MTLRasterizationRateLayerDescriptor;
38
+ @class MTLRasterizationRateMapDescriptor;
39
+ @class MTLTileRenderPipelineDescriptor;
40
+ @class MTLTilePipelineColorAttachmentDescriptor;
41
+ @class MTLMeshRenderPipelineDescriptor;
42
+ @class MTLSamplerDescriptor;
43
+ @class MTLRenderPipelineColorAttachmentDescriptor;
44
+ @class MTLDepthStencilDescriptor;
45
+ @class MTLTextureDescriptor;
46
+ @class MTLCompileOptions;
47
+ @class MTLRenderPipelineDescriptor;
48
+ @class MTLRenderPassDescriptor;
49
+ @class MTLComputePassDescriptor;
50
+ @class MTLBlitPassDescriptor;
51
+ @class MTLRenderPipelineReflection;
52
+ @class MTLComputePipelineDescriptor;
53
+ @class MTLComputePipelineReflection;
54
+ @class MTLCommandQueueDescriptor;
55
+ @class MTLHeapDescriptor;
56
+ @class MTLIndirectCommandBufferDescriptor;
57
+ @protocol MTLIndirectRenderCommandEncoder;
58
+ @protocol MTLIndirectComputeCommandEncoder;
59
+ @protocol MTLIndirectCommandBuffer;
60
+ @protocol MTLEvent;
61
+ @protocol MTLSharedEvent;
62
+ @class MTLSharedEventHandle;
63
+ @protocol MTLDynamicLibrary;
64
+ @protocol MTLBinaryArchive;
65
+ @class MTLBinaryArchiveDescriptor;
66
+ @class MTLAccelerationStructureDescriptor;
67
+ @protocol MTLAccelerationStructure;
68
+ @protocol MTLFunctionHandle;
69
+ @protocol MTLVisibleFunctionTable;
70
+ @class MTLVisibleFunctionTableDescriptor;
71
+ @protocol MTLIntersectionFunctionTable;
72
+ @class MTLIntersectionFunctionTableDescriptor;
73
+ @class MTLStitchedLibraryDescriptor;
74
+ @protocol MTLLogState;
75
+ @class MTLLogStateDescriptor;
76
+ @protocol MTLArgumentEncoder;
77
+ @class MTLResidencySetDescriptor;
78
+ @protocol MTLResidencySet;
79
+
80
+
81
+
82
+ /*!
83
+ @brief Returns a reference to the preferred system default Metal device.
84
+ @discussion On Mac OS X systems that support automatic graphics switching, calling
85
+ this API to get a Metal device will cause the system to switch to the high power
86
+ GPU. On other systems that support more than one GPU it will return the GPU that
87
+ is associated with the main display.
88
+ */
89
+ MTL_EXTERN id <MTLDevice> __nullable MTLCreateSystemDefaultDevice(void) API_AVAILABLE(macos(10.11), ios(8.0)) NS_RETURNS_RETAINED;
90
+
91
+ /*!
92
+ @brief Returns all Metal devices in the system.
93
+ @discussion On macOS and macCatalyst, this API will not cause the system to switch devices and leaves the decision about which GPU to use up to the application based on whatever criteria it deems appropriate.
94
+ On iOS, tvOS and visionOS, this API returns an array containing the same device that MTLCreateSystemDefaultDevice would have returned, or an empty array if it would have failed.
95
+ */
96
+ MTL_EXTERN NSArray <id<MTLDevice>> *MTLCopyAllDevices(void) API_AVAILABLE(macos(10.11), macCatalyst(13.0), ios(18.0)) NS_RETURNS_RETAINED;
97
+
98
+ typedef NS_ENUM(NSUInteger, MTLFeatureSet)
99
+ {
100
+ MTLFeatureSet_iOS_GPUFamily1_v1 API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 0,
101
+ MTLFeatureSet_iOS_GPUFamily2_v1 API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 1,
102
+
103
+ MTLFeatureSet_iOS_GPUFamily1_v2 API_AVAILABLE(ios(9.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 2,
104
+ MTLFeatureSet_iOS_GPUFamily2_v2 API_AVAILABLE(ios(9.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 3,
105
+ MTLFeatureSet_iOS_GPUFamily3_v1 API_AVAILABLE(ios(9.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 4,
106
+
107
+ MTLFeatureSet_iOS_GPUFamily1_v3 API_AVAILABLE(ios(10.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 5,
108
+ MTLFeatureSet_iOS_GPUFamily2_v3 API_AVAILABLE(ios(10.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 6,
109
+ MTLFeatureSet_iOS_GPUFamily3_v2 API_AVAILABLE(ios(10.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 7,
110
+
111
+ MTLFeatureSet_iOS_GPUFamily1_v4 API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 8,
112
+ MTLFeatureSet_iOS_GPUFamily2_v4 API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 9,
113
+ MTLFeatureSet_iOS_GPUFamily3_v3 API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 10,
114
+ MTLFeatureSet_iOS_GPUFamily4_v1 API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 11,
115
+
116
+ MTLFeatureSet_iOS_GPUFamily1_v5 API_AVAILABLE(ios(12.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 12,
117
+ MTLFeatureSet_iOS_GPUFamily2_v5 API_AVAILABLE(ios(12.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 13,
118
+ MTLFeatureSet_iOS_GPUFamily3_v4 API_AVAILABLE(ios(12.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 14,
119
+ MTLFeatureSet_iOS_GPUFamily4_v2 API_AVAILABLE(ios(12.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 15,
120
+ MTLFeatureSet_iOS_GPUFamily5_v1 API_AVAILABLE(ios(12.0)) API_UNAVAILABLE(macos, macCatalyst, tvos) = 16,
121
+
122
+ MTLFeatureSet_macOS_GPUFamily1_v1 API_AVAILABLE(macos(10.11)) API_UNAVAILABLE(ios) API_UNAVAILABLE(macCatalyst) = 10000,
123
+ MTLFeatureSet_OSX_GPUFamily1_v1 API_AVAILABLE(macos(10.11)) API_UNAVAILABLE(ios) = MTLFeatureSet_macOS_GPUFamily1_v1, // deprecated
124
+
125
+ MTLFeatureSet_macOS_GPUFamily1_v2 API_AVAILABLE(macos(10.12)) API_UNAVAILABLE(ios) API_UNAVAILABLE(macCatalyst) = 10001,
126
+ MTLFeatureSet_OSX_GPUFamily1_v2 API_AVAILABLE(macos(10.12)) API_UNAVAILABLE(ios) = MTLFeatureSet_macOS_GPUFamily1_v2, // deprecated
127
+ MTLFeatureSet_macOS_ReadWriteTextureTier2 API_AVAILABLE(macos(10.12)) API_UNAVAILABLE(ios) = 10002,
128
+ MTLFeatureSet_OSX_ReadWriteTextureTier2 API_AVAILABLE(macos(10.12)) API_UNAVAILABLE(ios) = MTLFeatureSet_macOS_ReadWriteTextureTier2, // deprecated
129
+
130
+ MTLFeatureSet_macOS_GPUFamily1_v3 API_AVAILABLE(macos(10.13)) API_UNAVAILABLE(ios) API_UNAVAILABLE(macCatalyst) = 10003,
131
+
132
+ MTLFeatureSet_macOS_GPUFamily1_v4 API_AVAILABLE(macos(10.14)) API_UNAVAILABLE(ios) API_UNAVAILABLE(macCatalyst) = 10004,
133
+ MTLFeatureSet_macOS_GPUFamily2_v1 API_AVAILABLE(macos(10.14)) API_UNAVAILABLE(ios) API_UNAVAILABLE(macCatalyst) = 10005,
134
+
135
+
136
+ MTLFeatureSet_tvOS_GPUFamily1_v1 API_AVAILABLE(tvos(9.0)) API_UNAVAILABLE(macos, ios) = 30000,
137
+ MTLFeatureSet_TVOS_GPUFamily1_v1 API_AVAILABLE(tvos(9.0)) API_UNAVAILABLE(macos, ios) = MTLFeatureSet_tvOS_GPUFamily1_v1, // deprecated
138
+
139
+ MTLFeatureSet_tvOS_GPUFamily1_v2 API_AVAILABLE(tvos(10.0)) API_UNAVAILABLE(macos, ios) = 30001,
140
+
141
+ MTLFeatureSet_tvOS_GPUFamily1_v3 API_AVAILABLE(tvos(11.0)) API_UNAVAILABLE(macos, ios) = 30002,
142
+ MTLFeatureSet_tvOS_GPUFamily2_v1 API_AVAILABLE(tvos(11.0)) API_UNAVAILABLE(macos, ios) = 30003,
143
+
144
+ MTLFeatureSet_tvOS_GPUFamily1_v4 API_AVAILABLE(tvos(12.0)) API_UNAVAILABLE(macos, ios) = 30004,
145
+ MTLFeatureSet_tvOS_GPUFamily2_v2 API_AVAILABLE(tvos(12.0)) API_UNAVAILABLE(macos, ios) = 30005,
146
+ } API_DEPRECATED("Use MTLGPUFamily instead", macos(10.11, 13.0), ios(8.0, 16.0), tvos(9.0, 16.0));
147
+
148
+ typedef NS_ENUM(NSInteger, MTLGPUFamily)
149
+ {
150
+ MTLGPUFamilyApple1 = 1001,
151
+ MTLGPUFamilyApple2 = 1002,
152
+ MTLGPUFamilyApple3 = 1003,
153
+ MTLGPUFamilyApple4 = 1004,
154
+ MTLGPUFamilyApple5 = 1005,
155
+ MTLGPUFamilyApple6 = 1006,
156
+ MTLGPUFamilyApple7 = 1007,
157
+ MTLGPUFamilyApple8 = 1008,
158
+ MTLGPUFamilyApple9 = 1009,
159
+ MTLGPUFamilyApple10 = 1010,
160
+ MTLGPUFamilyApple11 = 1011,
161
+
162
+ MTLGPUFamilyMac1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple7", macos(10.15, 13.0), ios(13.0, 16.0)) = 2001,
163
+ MTLGPUFamilyMac2 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple7", macos(10.15, 27.0), ios(13.0, 27.0)) = 2002,
164
+
165
+ MTLGPUFamilyCommon1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple1", macos(10.15, 27.0), ios(13.0, 27.0)) = 3001,
166
+ MTLGPUFamilyCommon2 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple3", macos(10.15, 27.0), ios(13.0, 27.0)) = 3002,
167
+ MTLGPUFamilyCommon3 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple5", macos(10.15, 27.0), ios(13.0, 27.0)) = 3003,
168
+
169
+ MTLGPUFamilyMacCatalyst1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple7", macos(10.15, 13.0), ios(13.0, 16.0)) = 4001,
170
+ MTLGPUFamilyMacCatalyst2 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple7", macos(10.15, 13.0), ios(13.0, 16.0)) = 4002,
171
+
172
+ MTLGPUFamilyMetal3 API_AVAILABLE(macos(13.0), ios(16.0)) = 5001,
173
+ } API_AVAILABLE(macos(10.15), ios(13.0));
174
+
175
+
176
+ /*!
177
+ @enum MTLPipelineOption
178
+ @abstract Controls the creation of the pipeline
179
+ */
180
+ typedef NS_OPTIONS(NSUInteger, MTLPipelineOption)
181
+ {
182
+ MTLPipelineOptionNone = 0,
183
+ MTLPipelineOptionArgumentInfo API_DEPRECATED_WITH_REPLACEMENT("MTLPipelineOptionBindingInfo", macos(10.11, 13.0), ios(8.0, 16.0)) = 1 << 0,
184
+ MTLPipelineOptionBindingInfo = 1 << 0,
185
+ MTLPipelineOptionBufferTypeInfo = 1 << 1,
186
+ MTLPipelineOptionFailOnBinaryArchiveMiss API_AVAILABLE(macos(11.0), ios(14.0)) = 1 << 2,
187
+ } API_AVAILABLE(macos(10.11), ios(8.0));
188
+
189
+ /*!
190
+ @enum MTLReadWriteTextureTier
191
+ @abstract MTLReadWriteTextureTier determines support level for read-write texture formats.
192
+ */
193
+ typedef NS_ENUM(NSUInteger, MTLReadWriteTextureTier)
194
+ {
195
+ MTLReadWriteTextureTierNone = 0,
196
+ MTLReadWriteTextureTier1 = 1,
197
+ MTLReadWriteTextureTier2 = 2,
198
+ } API_AVAILABLE(macos(10.13), ios(11.0));
199
+
200
+ /*!
201
+ @enum MTLArgumentBuffersTier
202
+ @abstract MTLArgumentBuffersTier determines support level for argument buffers.
203
+ */
204
+ typedef NS_ENUM(NSUInteger, MTLArgumentBuffersTier)
205
+ {
206
+ MTLArgumentBuffersTier1 = 0,
207
+ MTLArgumentBuffersTier2 = 1,
208
+ } API_AVAILABLE(macos(10.13), ios(11.0));
209
+
210
+ /*!
211
+ @enum MTLSparseTextureRegionAlignmentMode
212
+ @abstract MTLSparseTextureRegionAlignmentMode determines type of alignment used when converting from pixel region to tile region.
213
+ */
214
+ typedef NS_ENUM(NSUInteger, MTLSparseTextureRegionAlignmentMode)
215
+ {
216
+ MTLSparseTextureRegionAlignmentModeOutward = 0,
217
+ MTLSparseTextureRegionAlignmentModeInward = 1,
218
+ } API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
219
+
220
+ /**
221
+ * @brief Describes the memory requirements for an acceleration structure
222
+ */
223
+ typedef struct {
224
+ /**
225
+ * @brief The required size, in bytes, of the built acceleration structure
226
+ */
227
+ NSUInteger accelerationStructureSize;
228
+
229
+ /**
230
+ * @brief The required size, in bytes, of the scratch buffer used to build the acceleration structure
231
+ */
232
+ NSUInteger buildScratchBufferSize;
233
+
234
+ /**
235
+ * @brief The required size, in bytes, of the scratch buffer used to refit the acceleration structure
236
+ */
237
+ NSUInteger refitScratchBufferSize;
238
+ } MTLAccelerationStructureSizes;
239
+
240
+ /*!
241
+ @enum MTLCounterSamplingPoint
242
+ @abstract MTLCounterSamplingPoint determines type of sampling points that are supported on given device.
243
+
244
+ @constant MTLCounterSamplingPointAtStageBoundary
245
+ Counter sampling points at render, compute, and blit command encoder stage boundary are supported.
246
+
247
+ @constant MTLCounterSamplingPointAtDrawBoundary
248
+ Counter sampling at draw boundary is supported, render encoder method sampleCountersInBuffer can be used for sampling.
249
+
250
+ @constant MTLCounterSamplingPointAtDispatchBoundary
251
+ Counter sampling at compute dispatch boundary is supported, compute encoder method sampleCountersInBuffer can be used for sampling.
252
+
253
+ @constant MTLCounterSamplingPointAtTileDispatchBoundary
254
+ Counter sampling at tile shader dispatch boundary is supported.
255
+
256
+ @constant MTLCounterSamplingPointAtBlitBoundary
257
+ Counter sampling at blit boundary is supported, blit encoder method sampleCountersInBuffer can be used for sampling.
258
+ */
259
+ typedef NS_ENUM(NSUInteger, MTLCounterSamplingPoint)
260
+ {
261
+ MTLCounterSamplingPointAtStageBoundary,
262
+ MTLCounterSamplingPointAtDrawBoundary,
263
+ MTLCounterSamplingPointAtDispatchBoundary,
264
+ MTLCounterSamplingPointAtTileDispatchBoundary,
265
+ MTLCounterSamplingPointAtBlitBoundary
266
+ } API_AVAILABLE(macos(11.0), ios(14.0));
267
+
268
+
269
+ /// Enumeration of kinds of errors that methods on MTLDevice can produce.
270
+ typedef NS_ENUM(NSInteger, MTLDeviceError)
271
+ {
272
+ /// Indicates the absence of any problems.
273
+ MTLDeviceErrorNone = 0,
274
+
275
+ /// Indicates the requested feature is not supported by the current device.
276
+ MTLDeviceErrorNotSupported = 1,
277
+ } API_AVAILABLE(macos(26.4), ios(26.4));
278
+
279
+ API_AVAILABLE(macos(26.4), ios(26.4))
280
+ MTL_EXTERN NSErrorDomain const MTLDeviceErrorDomain;
281
+
282
+
283
+ /*!
284
+ @abstract Represent a memory size and alignment in bytes.
285
+ */
286
+ typedef struct {
287
+ NSUInteger size;
288
+ NSUInteger align;
289
+ } MTLSizeAndAlign;
290
+
291
+
292
+
293
+ /*!
294
+ * @class MTLArgumentDescriptor
295
+ * @abstract Represents a member of an argument buffer
296
+ */
297
+ MTL_EXPORT API_AVAILABLE(macos(10.13), ios(11.0))
298
+ @interface MTLArgumentDescriptor : NSObject <NSCopying>
299
+
300
+ /*!
301
+ * @method argumentDescriptor
302
+ * @abstract Create an autoreleased default argument descriptor
303
+ */
304
+ + (MTLArgumentDescriptor *)argumentDescriptor;
305
+
306
+ /*!
307
+ * @property dataType
308
+ * @abstract For constants, the data type. Otherwise, MTLDataTypeTexture, MTLDataTypeSampler, or
309
+ * MTLDataTypePointer.
310
+ */
311
+ @property (nonatomic) MTLDataType dataType;
312
+
313
+ /*!
314
+ * @property index
315
+ * @abstract The binding point index of the argument
316
+ */
317
+ @property (nonatomic) NSUInteger index;
318
+
319
+ /*!
320
+ * @property arrayLength
321
+ * @abstract The length of an array of constants, textures, or samplers, or 0 for non-array arguments
322
+ */
323
+ @property (nonatomic) NSUInteger arrayLength;
324
+
325
+ /*!
326
+ * @property access
327
+ * @abstract Access flags for the argument
328
+ */
329
+ @property (nonatomic) MTLBindingAccess access;
330
+
331
+ /*!
332
+ * @property textureType
333
+ * @abstract For texture arguments, the texture type
334
+ */
335
+ @property (nonatomic) MTLTextureType textureType;
336
+
337
+ /*!
338
+ @property constantBlockAlignment
339
+ @abstract if set forces the constant block to be aligned to the given alignment
340
+ @discussion Should only be set on the first constant of the block and is only valid if a corresponding
341
+ explicit "alignas" is applied to the constant in the metal shader language.
342
+ */
343
+ @property (nonatomic) NSUInteger constantBlockAlignment;
344
+
345
+ @end
346
+
347
+
348
+ /*!
349
+ @class MTLArchitecture
350
+ @abstract Contains information about the device's architecture
351
+ */
352
+ MTL_EXPORT API_AVAILABLE(macos(14.0), ios(17.0))
353
+ @interface MTLArchitecture : NSObject <NSCopying>
354
+ /*!
355
+ @property name
356
+ @abstract The device's architecture name.
357
+ */
358
+ @property (readonly, nonnull) NSString *name;
359
+ @end
360
+
361
+ /*!
362
+ @protocol MTLDevice
363
+ @abstract MTLDevice represents a processor capable of data parallel computations
364
+ */
365
+ API_AVAILABLE(macos(10.11), ios(8.0)) NS_SWIFT_SENDABLE
366
+ @protocol MTLDevice <NSObject>
367
+
368
+ /*!
369
+ @property name
370
+ @abstract The full name of the vendor device.
371
+ */
372
+ @property (nonnull, readonly) NSString *name;
373
+
374
+ /*!
375
+ @property registryID
376
+ @abstract Returns the IORegistry ID for the Metal device
377
+ @discussion The registryID value for a Metal device is global to all tasks, and may be used
378
+ to identify the GPU across task boundaries.
379
+ */
380
+ @property (readonly) uint64_t registryID API_AVAILABLE(macos(10.13), ios(11.0)) ;
381
+
382
+ /*!
383
+ @property architecture
384
+ @abstract Returns the device's architecture information.
385
+ */
386
+ @property (nonnull, readonly) MTLArchitecture *architecture API_AVAILABLE(macos(14.0), ios(17.0));
387
+
388
+ /*!
389
+ @property maxThreadsPerThreadgroup
390
+ @abstract The maximum number of threads along each dimension.
391
+ */
392
+ @property (readonly) MTLSize maxThreadsPerThreadgroup API_AVAILABLE(macos(10.11), ios(9.0));
393
+
394
+ /*!
395
+ @property lowPower
396
+ @abstract On systems that support automatic graphics switching, this will return YES for the the low power device.
397
+ */
398
+ @property (readonly, getter=isLowPower) BOOL lowPower API_DEPRECATED("Not applicable on Apple Silicon", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
399
+
400
+ /*!
401
+ @property headless
402
+ @abstract On systems that include more that one GPU, this will return YES for any device that does not support any displays. Only available on Mac OS X.
403
+ */
404
+ @property (readonly, getter=isHeadless) BOOL headless API_DEPRECATED("Not applicable on Apple Silicon", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
405
+
406
+ /*!
407
+ @property removable
408
+ @abstract If this GPU is removable, this property will return YES.
409
+ @discussion If a GPU is is removed without warning, APIs may fail even with good input, even before a notification can get posted informing
410
+ the application that the device has been removed.
411
+ */
412
+ @property (readonly, getter=isRemovable) BOOL removable API_DEPRECATED("Not applicable on Apple Silicon", macos(10.13, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
413
+
414
+ /*!
415
+ @property hasUnifiedMemory
416
+ @abstract Returns YES if this GPU shares its memory with the rest of the machine (CPU, etc.)
417
+ @discussion Some GPU architectures do not have dedicated local memory and instead only use the same memory shared with the rest
418
+ of the machine. This property will return YES for GPUs that fall into that category.
419
+ */
420
+ @property (readonly) BOOL hasUnifiedMemory API_AVAILABLE(macos(10.15), ios(13.0));
421
+
422
+ /*!
423
+ @property recommendedMaxWorkingSetSize
424
+ @abstract Returns an approximation of how much memory this device can use with good performance.
425
+ @discussion Performance may be improved by keeping the total size of all resources (texture and buffers)
426
+ and heaps less than this threshold, beyond which the device is likely to be overcommitted and incur a
427
+ performance penalty. */
428
+ @property (readonly) uint64_t recommendedMaxWorkingSetSize API_AVAILABLE(macos(10.12), macCatalyst(13.0), ios(16.0));
429
+
430
+
431
+ /*!
432
+ @property depth24Stencil8PixelFormatSupported
433
+ @abstract If YES, device supports MTLPixelFormatDepth24Unorm_Stencil8.
434
+ */
435
+ @property (readonly, getter=isDepth24Stencil8PixelFormatSupported) BOOL depth24Stencil8PixelFormatSupported API_DEPRECATED("Never supported on Apple Silicon", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
436
+
437
+ /*!
438
+ @property readWriteTextureSupport
439
+ @abstract Query support tier for read-write texture formats.
440
+ @return MTLReadWriteTextureTier enum value.
441
+ */
442
+ @property (readonly) MTLReadWriteTextureTier readWriteTextureSupport API_AVAILABLE(macos(10.13), ios(11.0));
443
+
444
+ /*!
445
+ @property argumentBuffersSupport
446
+ @abstract Query support tier for Argument Buffers.
447
+ @return MTLArgumentBuffersTier enum value.
448
+ */
449
+ @property (readonly) MTLArgumentBuffersTier argumentBuffersSupport API_AVAILABLE(macos(10.13), ios(11.0));
450
+
451
+ /*!
452
+ @property rasterOrderGroupsSupported
453
+ @abstract Query device for raster order groups support.
454
+ @return BOOL value. If YES, the device supports raster order groups. If NO, the device does not.
455
+ */
456
+ @property (readonly, getter=areRasterOrderGroupsSupported) BOOL rasterOrderGroupsSupported API_AVAILABLE(macos(10.13), ios(11.0));
457
+
458
+ /*!
459
+ @property supports32BitFloatFiltering
460
+ @abstract Query device for 32-bit Float texture filtering support. Specifically, R32Float, RG32Float, and RGBA32Float.
461
+ @return BOOL value. If YES, the device supports filtering 32-bit Float textures. If NO, the device does not.
462
+ */
463
+ @property(readonly) BOOL supports32BitFloatFiltering API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
464
+
465
+ /*!
466
+ @property supports32BitMSAA
467
+ @abstract Query device for 32-bit MSAA texture support. Specifically, added support for allocating 32-bit Integer format textures (R32Uint, R32Sint, RG32Uint, RG32Sint, RGBA32Uint, and RGBA32Sint) and resolving 32-bit Float format textures (R32Float, RG32Float, and RGBA32Float).
468
+ @return BOOL value. If YES, the device supports these additional 32-bit MSAA texture capabilities. If NO, the devices does not.
469
+ */
470
+ @property(readonly) BOOL supports32BitMSAA API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
471
+
472
+ /*!
473
+ @property supportsQueryTextureLOD
474
+ @abstract Query device for whether it supports the `calculate_clampled_lod` and `calculate_unclamped_lod` Metal shading language functionality.
475
+ @return BOOL value. If YES, the device supports the calculate LOD functionality. If NO, the device does not.
476
+ */
477
+ @property (readonly) BOOL supportsQueryTextureLOD API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
478
+
479
+ /*!
480
+ @property supportsBCTextureCompression
481
+ @abstract Query device for BC Texture format support
482
+ @return BOOL value. If YES, the device supports compressed BC Texture formats. If NO, the device does not.
483
+ */
484
+ @property (readonly) BOOL supportsBCTextureCompression API_AVAILABLE(macos(11.0), ios(16.4));
485
+
486
+ /*!
487
+ @property supportsPullModelInterpolation
488
+ @abstract Query device for pull model interpolation support which allows a fragment shader to compute multiple interpolations (at center, at centroid, at offset, at sample) of a fragment input.
489
+ @return BOOL value. If YES, the device supports pull model interpolation. If NO, the device does not.
490
+ */
491
+ @property(readonly) BOOL supportsPullModelInterpolation API_AVAILABLE(macos(11.0),ios(14.0));
492
+
493
+ /*!
494
+ @property barycentricsSupported
495
+ @abstract Query device for Barycentric coordinates support; deprecated, use supportsShaderBarycentricCoordinates
496
+ @return BOOL value. If YES, the device barycentric coordinates
497
+ */
498
+ @property(readonly, getter=areBarycentricCoordsSupported) BOOL barycentricCoordsSupported API_DEPRECATED_WITH_REPLACEMENT("supportsShaderBarycentricCoordinates", macos(10.15, 13.0), ios(14.0, 16.0)) API_UNAVAILABLE(tvos);
499
+
500
+ /*!
501
+ @property supportsShaderBarycentricCoordinates
502
+ @abstract Query device for Barycentric Coordinates support.
503
+ @return BOOL value. If YES, the device supports barycentric coordinates. If NO, the device does not.
504
+ */
505
+ @property (readonly) BOOL supportsShaderBarycentricCoordinates API_AVAILABLE(macos(10.15), ios(14.0), tvos(16.0));
506
+
507
+ /*!
508
+ @property currentAllocatedSize
509
+ @abstract The current size in bytes of all resources allocated by this device
510
+ */
511
+ @property (readonly) NSUInteger currentAllocatedSize API_AVAILABLE(macos(10.13), ios(11.0));
512
+
513
+
514
+
515
+ /*!
516
+ @method newLogStateWithDescriptor
517
+ @abstract This method will create a new MTLLogState.
518
+ */
519
+ - (nullable id <MTLLogState>) newLogStateWithDescriptor:(MTLLogStateDescriptor* _Nonnull) descriptor error:(NSError** )error API_AVAILABLE(macos(15.0), ios(18.0));
520
+
521
+ /*!
522
+ @method newCommandQueue
523
+ @brief Create and return a new command queue. Command Queues created via this method will only allow up to 64 non-completed command buffers.
524
+ @return The new command queue object
525
+ */
526
+ - (nullable id <MTLCommandQueue>)newCommandQueue;
527
+
528
+ /*!
529
+ @method newCommandQueueWithMaxCommandBufferCount
530
+ @brief Create and return a new command queue with a given upper bound on non-completed command buffers.
531
+ @return The new command queue object
532
+ */
533
+ - (nullable id <MTLCommandQueue>)newCommandQueueWithMaxCommandBufferCount:(NSUInteger)maxCommandBufferCount;
534
+
535
+ /*!
536
+ @method newCommandQueueWithDescriptor:
537
+ @brief Create a MTLCommandQueue according to MTLCommandQueueDescriptor.
538
+ */
539
+ - (nullable id <MTLCommandQueue>)newCommandQueueWithDescriptor:(MTLCommandQueueDescriptor *)descriptor API_AVAILABLE(macos(15.0), ios(18.0));
540
+
541
+ /*!
542
+ @method heapTextureSizeAndAlignWithDescriptor:
543
+ @abstract Determine the byte size of textures when sub-allocated from a heap.
544
+ @discussion This method can be used to help determine the required heap size.
545
+ */
546
+ - (MTLSizeAndAlign)heapTextureSizeAndAlignWithDescriptor:(MTLTextureDescriptor *)desc API_AVAILABLE(macos(10.13), ios(10.0));
547
+
548
+ /*!
549
+ @method heapBufferSizeAndAlignWithLength:options:
550
+ @abstract Determine the byte size of buffers when sub-allocated from a heap.
551
+ @discussion This method can be used to help determine the required heap size.
552
+ */
553
+ - (MTLSizeAndAlign)heapBufferSizeAndAlignWithLength:(NSUInteger)length options:(MTLResourceOptions)options API_AVAILABLE(macos(10.13), ios(10.0));
554
+
555
+ /*!
556
+ @method newHeapWithDescriptor:
557
+ @abstract Create a new heap with the given descriptor.
558
+ */
559
+ - (nullable id <MTLHeap>)newHeapWithDescriptor:(MTLHeapDescriptor *)descriptor API_AVAILABLE(macos(10.13), ios(10.0));
560
+
561
+ /*!
562
+ @method newBufferWithLength:options:
563
+ @brief Create a buffer by allocating new memory.
564
+ */
565
+ - (nullable id <MTLBuffer>)newBufferWithLength:(NSUInteger)length options:(MTLResourceOptions)options;
566
+
567
+ /*!
568
+ @method newBufferWithBytes:length:options:
569
+ @brief Create a buffer by allocating new memory and specifing the initial contents to be copied into it.
570
+ */
571
+ - (nullable id <MTLBuffer>)newBufferWithBytes:(const void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options;
572
+
573
+ /*!
574
+ @method newBufferWithBytesNoCopy:length:options:deallocator:
575
+ @brief Create a buffer by wrapping an existing part of the address space.
576
+ */
577
+ - (nullable id <MTLBuffer>)newBufferWithBytesNoCopy:(void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options deallocator:(void (^ NS_SWIFT_SENDABLE __nullable)(void *pointer, NSUInteger length))deallocator;
578
+
579
+ /*!
580
+ @method newDepthStencilStateWithDescriptor:
581
+ @brief Create a depth/stencil test state object.
582
+ */
583
+ - (nullable id <MTLDepthStencilState>)newDepthStencilStateWithDescriptor:(MTLDepthStencilDescriptor *)descriptor;
584
+
585
+ /*!
586
+ @method newTextureWithDescriptor:
587
+ @abstract Allocate a new texture with privately owned storage.
588
+ */
589
+ - (nullable id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor;
590
+
591
+ /*!
592
+ @method newTextureWithDescriptor:iosurface:plane
593
+ @abstract Create a new texture from an IOSurface.
594
+ @param descriptor A description of the properties for the new texture.
595
+ @param iosurface The IOSurface to use as storage for the new texture.
596
+ @param plane The plane within the IOSurface to use.
597
+ @return A new texture object.
598
+ */
599
+ - (nullable id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor iosurface:(IOSurfaceRef)iosurface plane:(NSUInteger)plane API_AVAILABLE(macos(10.11), ios(11.0));
600
+
601
+
602
+ /*!
603
+ @method newSamplerStateWithDescriptor:
604
+ @abstract Create a new sampler.
605
+ */
606
+ - (nullable id <MTLSamplerState>)newSamplerStateWithDescriptor:(MTLSamplerDescriptor *)descriptor;
607
+
608
+ /*!
609
+ @method newDefaultLibrary
610
+ @abstract Returns the default library for the main bundle.
611
+ @discussion use newDefaultLibraryWithBundle:error: to get an NSError in case of failure.
612
+ */
613
+ - (nullable id <MTLLibrary>)newDefaultLibrary;
614
+
615
+ /*
616
+ @method newDefaultLibraryWithBundle:error:
617
+ @abstract Returns the default library for a given bundle.
618
+ @return A pointer to the library, nil if an error occurs.
619
+ */
620
+ - (nullable id <MTLLibrary>)newDefaultLibraryWithBundle:(NSBundle *)bundle error:(__autoreleasing NSError **)error API_AVAILABLE(macos(10.12), ios(10.0));
621
+
622
+ /*!
623
+ @method newLibraryWithFile:
624
+ @abstract Load a MTLLibrary from a metallib file.
625
+ */
626
+ - (nullable id <MTLLibrary>)newLibraryWithFile:(NSString *)filepath error:(__autoreleasing NSError **)error
627
+ API_DEPRECATED("Use -newLibraryWithURL:error: instead", macos(10.11, 13.0), ios(8.0, 16.0));
628
+
629
+ /*!
630
+ @method newLibraryWithURL:
631
+ @abstract Load a MTLLibrary from a metallib file.
632
+ */
633
+ - (nullable id <MTLLibrary>)newLibraryWithURL:(NSURL *)url error:(__autoreleasing NSError **)error API_AVAILABLE(macos(10.13), ios(11.0));
634
+
635
+ /*!
636
+ @method newLibraryWithData:
637
+ @abstract Load a MTLLibrary from a dispatch_data_t
638
+ @param data A metallib file already loaded as data in the form of dispatch_data_t.
639
+ @param error An error if we fail to open the metallib data.
640
+ */
641
+ - (nullable id <MTLLibrary>)newLibraryWithData:(dispatch_data_t)data error:(__autoreleasing NSError **)error;
642
+
643
+ /*!
644
+ @method newLibraryWithSource:options:error:
645
+ @abstract Load a MTLLibrary from source.
646
+ */
647
+ - (nullable id <MTLLibrary>)newLibraryWithSource:(NSString *)source options:(nullable MTLCompileOptions *)options error:(__autoreleasing NSError **)error;
648
+
649
+ /*!
650
+ @method newLibraryWithSource:options:completionHandler:
651
+ @abstract Load a MTLLibrary from source.
652
+ */
653
+ - (void)newLibraryWithSource:(NSString *)source options:(nullable MTLCompileOptions *)options completionHandler:(MTLNewLibraryCompletionHandler)completionHandler;
654
+
655
+ /*!
656
+ @method newLibraryWithStitchedDescriptor:error:
657
+ @abstract Returns a library generated using the graphs in the descriptor.
658
+ */
659
+ - (nullable id <MTLLibrary>)newLibraryWithStitchedDescriptor:(MTLStitchedLibraryDescriptor *)descriptor error:(__autoreleasing NSError **)error API_AVAILABLE(macos(12.0), ios(15.0));
660
+
661
+ /*!
662
+ @method newLibraryWithStitchedDescriptor:completionHandler:
663
+ @abstract Generates a new library using the graphs in the descriptor.
664
+ */
665
+ - (void)newLibraryWithStitchedDescriptor:(MTLStitchedLibraryDescriptor *)descriptor completionHandler:(MTLNewLibraryCompletionHandler)completionHandler API_AVAILABLE(macos(12.0), ios(15.0));
666
+
667
+ /*!
668
+ @method newRenderPipelineStateWithDescriptor:error:
669
+ @abstract Create and compile a new MTLRenderPipelineState object synchronously.
670
+ */
671
+ - (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor error:(__autoreleasing NSError **)error;
672
+
673
+ /*!
674
+ @method newRenderPipelineStateWithDescriptor:options:reflection:error:
675
+ @abstract Create and compile a new MTLRenderPipelineState object synchronously and returns additional reflection information.
676
+ */
677
+ - (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor options:(MTLPipelineOption)options reflection:(MTLAutoreleasedRenderPipelineReflection * __nullable)reflection error:(__autoreleasing NSError **)error;
678
+
679
+ /*!
680
+ @method newRenderPipelineState:completionHandler:
681
+ @abstract Create and compile a new MTLRenderPipelineState object asynchronously.
682
+ */
683
+ - (void)newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor completionHandler:(MTLNewRenderPipelineStateCompletionHandler)completionHandler;
684
+
685
+ /*!
686
+ @method newRenderPipelineState:options:completionHandler:
687
+ @abstract Create and compile a new MTLRenderPipelineState object asynchronously and returns additional reflection information
688
+ */
689
+ - (void)newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor options:(MTLPipelineOption)options completionHandler:(MTLNewRenderPipelineStateWithReflectionCompletionHandler)completionHandler;
690
+
691
+ /*!
692
+ @method newComputePipelineStateWithDescriptor:error:
693
+ @abstract Create and compile a new MTLComputePipelineState object synchronously.
694
+ */
695
+ - (nullable id <MTLComputePipelineState>)newComputePipelineStateWithFunction:(id <MTLFunction>)computeFunction error:(__autoreleasing NSError **)error;
696
+
697
+ /*!
698
+ @method newComputePipelineStateWithDescriptor:options:reflection:error:
699
+ @abstract Create and compile a new MTLComputePipelineState object synchronously.
700
+ */
701
+ - (nullable id <MTLComputePipelineState>)newComputePipelineStateWithFunction:(id <MTLFunction>)computeFunction options:(MTLPipelineOption)options reflection:(MTLAutoreleasedComputePipelineReflection * __nullable)reflection error:(__autoreleasing NSError **)error;
702
+
703
+ /*!
704
+ @method newComputePipelineStateWithDescriptor:completionHandler:
705
+ @abstract Create and compile a new MTLComputePipelineState object asynchronously.
706
+ */
707
+ - (void)newComputePipelineStateWithFunction:(id <MTLFunction>)computeFunction completionHandler:(MTLNewComputePipelineStateCompletionHandler)completionHandler;
708
+
709
+ /*!
710
+ @method newComputePipelineStateWithDescriptor:options:completionHandler:
711
+ @abstract Create and compile a new MTLComputePipelineState object asynchronously.
712
+ */
713
+ - (void)newComputePipelineStateWithFunction:(id <MTLFunction>)computeFunction options:(MTLPipelineOption)options completionHandler:(MTLNewComputePipelineStateWithReflectionCompletionHandler)completionHandler;
714
+
715
+ /*!
716
+ @method newComputePipelineStateWithDescriptor:options:reflection:error:
717
+ @abstract Create and compile a new MTLComputePipelineState object synchronously.
718
+ */
719
+ - (nullable id <MTLComputePipelineState>)newComputePipelineStateWithDescriptor:(MTLComputePipelineDescriptor *)descriptor options:(MTLPipelineOption)options reflection:(MTLAutoreleasedComputePipelineReflection * __nullable)reflection error:(__autoreleasing NSError **)error API_AVAILABLE(macos(10.11), ios(9.0));
720
+
721
+ /*!
722
+ @method newComputePipelineStateWithDescriptor:options:completionHandler:
723
+ @abstract Create and compile a new MTLComputePipelineState object asynchronously.
724
+ */
725
+ - (void)newComputePipelineStateWithDescriptor:(MTLComputePipelineDescriptor *)descriptor options:(MTLPipelineOption)options completionHandler:(MTLNewComputePipelineStateWithReflectionCompletionHandler)completionHandler API_AVAILABLE(macos(10.11), ios(9.0));
726
+
727
+ /*!
728
+ @method newFence
729
+ @abstract Create a new MTLFence object
730
+ */
731
+ - (nullable id <MTLFence>)newFence API_AVAILABLE(macos(10.13), ios(10.0));
732
+
733
+ /*!
734
+ @method supportsFeatureSet:
735
+ @abstract Returns TRUE if the feature set is supported by this MTLDevice.
736
+ */
737
+ - (BOOL)supportsFeatureSet:(MTLFeatureSet)featureSet API_DEPRECATED("Use supportsFamily instead", macos(10.11, 13.0), ios(8.0, 16.0), tvos(9.0, 16.0));
738
+
739
+ /*!
740
+ @method supportsFamily:
741
+ @abstract Returns TRUE if the GPU Family is supported by this MTLDevice.
742
+ */
743
+ - (BOOL)supportsFamily:(MTLGPUFamily)gpuFamily API_AVAILABLE(macos(10.15), ios(13.0));
744
+
745
+ /*!
746
+ @method supportsTextureSampleCount:
747
+ @brief Query device if it support textures with a given sampleCount.
748
+ @return BOOL value. If YES, device supports the given sampleCount for textures. If NO, device does not support the given sampleCount.
749
+ */
750
+ - (BOOL)supportsTextureSampleCount:(NSUInteger)sampleCount API_AVAILABLE(macos(10.11), ios(9.0));
751
+
752
+ /*!
753
+ @method minimumLinearTextureAlignmentForPixelFormat:
754
+ @abstract Returns the minimum alignment required for offset and rowBytes when creating a linear texture. An error is thrown for queries with invalid pixel formats (depth, stencil, or compressed formats).
755
+ */
756
+ - (NSUInteger)minimumLinearTextureAlignmentForPixelFormat:(MTLPixelFormat)format API_AVAILABLE(macos(10.13), ios(11.0));
757
+
758
+ /*!
759
+ @method minimumTextureBufferAlignmentForPixelFormat:
760
+ @abstract Returns the minimum alignment required for offset and rowBytes when creating a texture buffer from a buffer.
761
+ */
762
+ - (NSUInteger)minimumTextureBufferAlignmentForPixelFormat:(MTLPixelFormat)format API_AVAILABLE(macos(10.14), ios(12.0));
763
+
764
+
765
+ /*!
766
+ @method newRenderPipelineStateWithTileDescriptor:options:reflection:error:
767
+ @abstract Create and compile a new MTLRenderPipelineState object synchronously given a MTLTileRenderPipelineDescriptor.
768
+ */
769
+ - (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor*)descriptor options:(MTLPipelineOption)options reflection:(MTLAutoreleasedRenderPipelineReflection * __nullable)reflection error:(__autoreleasing NSError **)error API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
770
+
771
+
772
+ /*!
773
+ @method newRenderPipelineStateWithTileDescriptor:options:completionHandler:
774
+ @abstract Create and compile a new MTLRenderPipelineState object asynchronously given a MTLTileRenderPipelineDescriptor.
775
+ */
776
+ - (void)newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor *)descriptor options:(MTLPipelineOption)options completionHandler:(MTLNewRenderPipelineStateWithReflectionCompletionHandler)completionHandler API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
777
+
778
+ /*!
779
+ @method newRenderPipelineStateWithMeshDescriptor:options:reflection:error:
780
+ @abstract Create and compile a new MTLRenderPipelineState object synchronously given a MTLMeshRenderPipelineDescriptor.
781
+ */
782
+ - (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithMeshDescriptor:(MTLMeshRenderPipelineDescriptor*)descriptor
783
+ options:(MTLPipelineOption)options
784
+ reflection:(MTLAutoreleasedRenderPipelineReflection * __nullable)reflection
785
+ error:(__autoreleasing NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
786
+
787
+ /*!
788
+ @method newRenderPipelineStateWithMeshDescriptor:options:completionHandler:
789
+ @abstract Create and compile a new MTLRenderPipelineState object asynchronously given a MTLMeshRenderPipelineDescriptor.
790
+ */
791
+ - (void)newRenderPipelineStateWithMeshDescriptor:(MTLMeshRenderPipelineDescriptor *)descriptor
792
+ options:(MTLPipelineOption)options
793
+ completionHandler:(MTLNewRenderPipelineStateWithReflectionCompletionHandler)completionHandler API_AVAILABLE(macos(13.0), ios(16.0));
794
+
795
+ /*!
796
+ @property maxThreadgroupMemoryLength
797
+ @abstract The maximum threadgroup memory available, in bytes.
798
+ */
799
+ @property (readonly) NSUInteger maxThreadgroupMemoryLength API_AVAILABLE(macos(10.13), ios(11.0));
800
+
801
+ /*!
802
+ @property maxArgumentBufferSamplerCount
803
+ @abstract The maximum number of unique argument buffer samplers per app.
804
+ @discussion This limit is only applicable to samplers that have their supportArgumentBuffers property set to true. A MTLSamplerState object is considered unique if the configuration of its originating MTLSamplerDescriptor properties is unique. For example, two samplers with equal minFilter values but different magFilter values are considered unique.
805
+ */
806
+ @property (readonly) NSUInteger maxArgumentBufferSamplerCount API_AVAILABLE(macos(10.14), ios(12.0));
807
+
808
+
809
+ /*!
810
+ @property programmableSaplePositionsSupported
811
+ @abstract Query device for programmable sample position support.
812
+ @return BOOL value. If YES, the device supports programmable sample positions. If NO, the device does not.
813
+ */
814
+ @property (readonly, getter=areProgrammableSamplePositionsSupported) BOOL programmableSamplePositionsSupported API_AVAILABLE(macos(10.13), ios(11.0));
815
+
816
+
817
+ /*!
818
+ @method getDefaultSamplePositions:count:
819
+ @abstract Retrieve the default sample positions.
820
+ @param positions The destination array for default sample position data.
821
+ @param count Specifies the sample count for which to retrieve the default positions, the length of the positions array, and must be set to a valid sample count.
822
+ */
823
+ - (void)getDefaultSamplePositions:(MTLSamplePosition *)positions count:(NSUInteger)count API_AVAILABLE(macos(10.13), ios(11.0));
824
+
825
+ /*!
826
+ * @method newArgumentEncoderWithArguments:count:
827
+ * @abstract Creates an argument encoder for an array of argument descriptors which will be encoded sequentially.
828
+ */
829
+ - (nullable id <MTLArgumentEncoder>)newArgumentEncoderWithArguments:(NSArray <MTLArgumentDescriptor *> *)arguments API_AVAILABLE(macos(10.13), ios(11.0));
830
+
831
+
832
+ /*!
833
+ @method supportsRasterizationRateMapWithLayerCount:
834
+ @abstract Query device for variable rasterization rate support with the given number of layers.
835
+ @param layerCount The number of layers for which to query device support.
836
+ @return YES if the device supports creation of rendering using a MTLRasterizationRateMap with the given number of layers.
837
+ */
838
+ -(BOOL)supportsRasterizationRateMapWithLayerCount:(NSUInteger)layerCount API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
839
+
840
+ /*!
841
+ @method newRasterizationRateMapWithDescriptor:
842
+ @abstract Creates a new variable rasterization rate map with the given descriptor.
843
+ @discussion If '[self supportsRasterizationRateMapWithLayerCount:descriptor.layerCount]' returns NO, or descriptor.screenSize describes an empty region, the result will always be nil.
844
+ @return A MTLRasterizationRateMap instance that can be used for rendering on this MTLDevice, or nil if the device does not support the combination of parameters stored in the descriptor.
845
+ */
846
+ -(nullable id<MTLRasterizationRateMap>)newRasterizationRateMapWithDescriptor:(MTLRasterizationRateMapDescriptor*)descriptor API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
847
+
848
+ /*!
849
+ * @method newIndirectCommandBufferWithDescriptor:maxCommandCount:options
850
+ * @abstract Creates a new indirect command buffer with the given descriptor and count.
851
+ * @param descriptor The descriptor encodes the maximum logical stride of each command.
852
+ * @param maxCount The maximum number of commands that this buffer can contain.
853
+ * @param options The options for the indirect command buffer.
854
+ * @discussion The returned buffer can be safely executed without first encoding into (but is wasteful).
855
+ */
856
+ - (nullable id <MTLIndirectCommandBuffer>)newIndirectCommandBufferWithDescriptor:(MTLIndirectCommandBufferDescriptor*)descriptor maxCommandCount:(NSUInteger)maxCount options:(MTLResourceOptions)options API_AVAILABLE(macos(10.14), ios(12.0));
857
+
858
+ /*!
859
+ @method newEvent
860
+ @abstract Returns a new single-device non-shareable Metal event object
861
+ */
862
+ - (nullable id <MTLEvent>)newEvent API_AVAILABLE(macos(10.14), ios(12.0));
863
+
864
+ /*!
865
+ @method newSharedEvent
866
+ @abstract Returns a shareable multi-device event.
867
+ */
868
+ - (nullable id <MTLSharedEvent>)newSharedEvent API_AVAILABLE(macos(10.14), ios(12.0));
869
+
870
+ /*!
871
+ @method newSharedEventWithHandle
872
+ @abstract Creates a shareable multi-device event from an existing shared event handle.
873
+ */
874
+ - (nullable id <MTLSharedEvent>)newSharedEventWithHandle:(MTLSharedEventHandle *)sharedEventHandle API_AVAILABLE(macos(10.14), ios(12.0));
875
+
876
+
877
+
878
+
879
+
880
+
881
+ /*!
882
+ * @method sparseTileSizeWithTextureType:pixelFormat:sampleCount:
883
+ * @abstract Returns tile size for sparse texture with given type, pixel format and sample count.
884
+ */
885
+ -(MTLSize) sparseTileSizeWithTextureType:(MTLTextureType)textureType
886
+ pixelFormat:(MTLPixelFormat)pixelFormat
887
+ sampleCount:(NSUInteger)sampleCount API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
888
+
889
+ /*!
890
+ @property sparseTileSizeInBytes
891
+ @abstract Returns the number of bytes required to map one sparse texture tile.
892
+ */
893
+ @property (readonly) NSUInteger sparseTileSizeInBytes API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
894
+
895
+ @optional
896
+ /*!
897
+ * @method convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:
898
+ * @abstract Converts regions in pixels to regions in sparse tiles using specified alignment mode.
899
+ Tile size can be obtained from tileSizeWithTextureType:pixelFormat:sampleCount: method.
900
+ */
901
+ -(void) convertSparsePixelRegions:(const MTLRegion[_Nonnull])pixelRegions
902
+ toTileRegions:(MTLRegion[_Nonnull])tileRegions
903
+ withTileSize:(MTLSize)tileSize
904
+ alignmentMode:(MTLSparseTextureRegionAlignmentMode)mode
905
+ numRegions:(NSUInteger)numRegions API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
906
+
907
+ /*!
908
+ * @method convertSparseTileRegions:toPixelRegions:withTileSize:numRegions:
909
+ * @abstract Convertes region in sparse tiles to region in pixels
910
+ Tile size can be obtained from tileSizeWithTextureType:pixelFormat:sampleCount: method.
911
+ */
912
+ -(void) convertSparseTileRegions:(const MTLRegion[_Nonnull])tileRegions
913
+ toPixelRegions:(MTLRegion[_Nonnull])pixelRegions
914
+ withTileSize:(MTLSize)tileSize
915
+ numRegions:(NSUInteger)numRegions API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
916
+ @required
917
+
918
+
919
+ /*!
920
+ @property sparseTileSizeInBytesForSparsePageSize
921
+ @abstract Returns the number of bytes required to map one sparse texture tile for a given MTLSparsePageSize
922
+ */
923
+ - (NSUInteger) sparseTileSizeInBytesForSparsePageSize:(MTLSparsePageSize)sparsePageSize API_AVAILABLE(macos(13.0), ios(16.0));
924
+
925
+ /*!
926
+ * @method sparseTileSizeWithTextureType:pixelFormat:sampleCount:sparsePageSize
927
+ * @abstract Returns tile size for sparse texture with given type, pixel format and sample count.
928
+ */
929
+ -(MTLSize) sparseTileSizeWithTextureType:(MTLTextureType)textureType
930
+ pixelFormat:(MTLPixelFormat)pixelFormat
931
+ sampleCount:(NSUInteger)sampleCount
932
+ sparsePageSize:(MTLSparsePageSize)sparsePageSize API_AVAILABLE(macos(13.0), ios(16.0));
933
+
934
+
935
+
936
+ @property (readonly) NSUInteger maxBufferLength API_AVAILABLE(macos(10.14), ios(12.0));
937
+
938
+ /*!
939
+ @property counterSets
940
+ @abstract Returns the set of Counter Sets exposed by the device.
941
+ */
942
+ @property (readonly, nullable) NSArray<id<MTLCounterSet>>* counterSets API_AVAILABLE(macos(10.15), ios(14.0));
943
+
944
+
945
+ /*!
946
+ @method newCounterSampleBufferWithDescriptor:error:
947
+ @abstract Given a counter sample buffer descriptor, allocate a new counter
948
+ sample buffer.
949
+ This may return nil if the counters may not all be collected simultaneously.
950
+ @param descriptor The descriptor to create a sample buffer for
951
+ @param error An error return on failure.
952
+ */
953
+ - (nullable id<MTLCounterSampleBuffer>) newCounterSampleBufferWithDescriptor:(MTLCounterSampleBufferDescriptor*)descriptor
954
+ error:(NSError**)error
955
+ API_AVAILABLE(macos(10.15), ios(14.0));
956
+
957
+ #if defined(MTL_TIMESTAMP_AS_NSUINTEGER) && MTL_TIMESTAMP_AS_NSUINTEGER
958
+ typedef NSUInteger MTLTimestamp;
959
+ #else
960
+ typedef uint64_t MTLTimestamp;
961
+ #endif
962
+ /*!
963
+ @method sampleTimestamps:gpuTimestamp:
964
+ @abstract Sample the CPU and GPU timestamps as closely as possible.
965
+ @param cpuTimestamp The timestamp on the CPU
966
+ @param gpuTimestamp The timestamp on the GPU
967
+ */
968
+ -(void)sampleTimestamps:(MTLTimestamp *)cpuTimestamp
969
+ gpuTimestamp:(MTLTimestamp *)gpuTimestamp
970
+ API_AVAILABLE(macos(10.15), ios(14.0));
971
+
972
+
973
+ -(id<MTLArgumentEncoder>)newArgumentEncoderWithBufferBinding:(id<MTLBufferBinding>)bufferBinding API_AVAILABLE(macos(13.0), ios(16.0));
974
+
975
+ /*!
976
+ @method supportsCounterSampling:
977
+ @abstract Query device for counter sampling points support.
978
+ @param samplingPoint Query index
979
+ @return BOOL value. If YES, the device supports counter sampling at given point.
980
+ */
981
+ - (BOOL)supportsCounterSampling:(MTLCounterSamplingPoint)samplingPoint API_AVAILABLE(macos(11.0), ios(14.0));
982
+
983
+ /*!
984
+ @property supportsVertexAmplificationCount:
985
+ @abstract Query device for vertex amplification support.
986
+ @param count The amplification count to check
987
+ @return BOOL value. If YES, the device supports vertex amplification with the given count. If NO, the device does not.
988
+ */
989
+ - (BOOL)supportsVertexAmplificationCount:(NSUInteger)count API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
990
+
991
+ /*!
992
+ @property supportsDynamicLibraries
993
+ @abstract Query device support for creating and using dynamic libraries in a compute pipeline.
994
+ @return BOOL value. If YES, the device supports creating and using dynamic libraries in a compute pipeline. If NO, the device does not.
995
+ */
996
+ @property(readonly) BOOL supportsDynamicLibraries API_AVAILABLE(macos(11.0), ios(14.0));
997
+
998
+ /*!
999
+ @property supportsRenderDynamicLibraries
1000
+ @abstract Query device support for creating and using dynamic libraries in render pipeline stages.
1001
+ @return BOOL value. If YES, the device supports creating and using dynamic libraries in render pipeline stages. If NO, the device does not.
1002
+ */
1003
+ @property (readonly) BOOL supportsRenderDynamicLibraries API_AVAILABLE(macos(12.0), ios(15.0));
1004
+
1005
+ /*!
1006
+ @method newDynamicLibrary:error:
1007
+ @abstract Creates a MTLDynamicLibrary by compiling the code in a MTLLibrary.
1008
+ @see MTLDynamicLibrary
1009
+ @param library The MTLLibrary from which to compile code. This library must have .type set to MTLLibraryTypeDynamic.
1010
+ @param error If an error occurs during creation, this parameter is updated to describe the failure.
1011
+ @return On success, the MTLDynamicLibrary containing compiled code. On failure, nil.
1012
+ */
1013
+ - (nullable id<MTLDynamicLibrary>) newDynamicLibrary:(id<MTLLibrary>)library error:(NSError **) error API_AVAILABLE(macos(11.0), ios(14.0));
1014
+
1015
+ /*!
1016
+ @method newDynamicLibraryWithURL:error:
1017
+ @abstract Creates a MTLDynamicLibrary by loading compiled code from a file.
1018
+ @see MTLDynamicLibrary
1019
+ @param url The file URL from which to load. If the file contains no compiled code for this device, compilation is attempted as with newDynamicLibrary:error:
1020
+ @param error If an error occurs during creation, this parameter is updated to describe the failure.
1021
+ @return On success, the MTLDynamicLibrary containing compiled code (either loaded or compiled). On failure, nil.
1022
+ */
1023
+ - (nullable id<MTLDynamicLibrary>) newDynamicLibraryWithURL:(NSURL *)url error:(NSError **) error API_AVAILABLE(macos(11.0), ios(14.0));
1024
+ /*!
1025
+ @method newBinaryArchiveWithDescriptor:error:
1026
+ @abstract Creates a MTLBinaryArchive using the configuration in the descriptor.
1027
+ @see MTLBinaryArchive
1028
+ @param descriptor The descriptor for the configuration of the binary archive to create.
1029
+ @param error If an error occurs during creation, this parameter is updated to describe the failure.
1030
+ @return On success, the created MTLBinaryArchive. On failure, nil.
1031
+ */
1032
+ - (nullable id<MTLBinaryArchive>) newBinaryArchiveWithDescriptor:(MTLBinaryArchiveDescriptor*)descriptor
1033
+ error:(NSError**)error API_AVAILABLE(macos(11.0), ios(14.0));
1034
+
1035
+ /*!
1036
+ @property supportsRaytracing
1037
+ @abstract Query device support for using ray tracing from compute pipelines.
1038
+ @return BOOL value. If YES, the device supports ray tracing from compute pipelines. If NO, the device does not.
1039
+ */
1040
+ @property (readonly) BOOL supportsRaytracing API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
1041
+
1042
+ - (MTLAccelerationStructureSizes)accelerationStructureSizesWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
1043
+
1044
+ - (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithSize:(NSUInteger)size API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
1045
+ - (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
1046
+
1047
+
1048
+ /*!
1049
+ @method heapAccelerationStructureSizeAndAlignWithSize:
1050
+ @abstract Determine the byte size of acceleration structures when sub-allocated from a heap.
1051
+ @discussion This method can be used to help determine the required heap size.
1052
+ */
1053
+ - (MTLSizeAndAlign)heapAccelerationStructureSizeAndAlignWithSize:(NSUInteger)size API_AVAILABLE(macos(13.0), ios(16.0));
1054
+
1055
+ /*!
1056
+ @method heapAccelerationStructureSizeAndAlignWithDescriptor:
1057
+ @abstract Determine the byte size of acceleration structures when sub-allocated from a heap. This is a convenience method which computes the acceleration structure size based on the descriptor.
1058
+ @discussion This method can be used to help determine the required heap size.
1059
+ */
1060
+ - (MTLSizeAndAlign)heapAccelerationStructureSizeAndAlignWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(13.0), ios(16.0));
1061
+
1062
+
1063
+ /*!
1064
+ @property supportsFunctionPointers
1065
+ @abstract Query device support for using function pointers from compute pipelines.
1066
+ @return BOOL value. If YES, the device supports function pointers from compute pipelines. If NO, the device does not.
1067
+ */
1068
+ @property (readonly) BOOL supportsFunctionPointers API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
1069
+
1070
+ /*!
1071
+ @property supportsFunctionPointersFromRender
1072
+ @abstract Query device support for using function pointers from render pipeline stages.
1073
+ @return BOOL value. If YES, the device supports function pointers from render pipeline stages. If NO, the device does not.
1074
+ */
1075
+ @property (readonly) BOOL supportsFunctionPointersFromRender API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
1076
+
1077
+ /*!
1078
+ @property supportsRaytracingFromRender
1079
+ @abstract Query device support for using ray tracing from render pipeline stages.
1080
+ @return BOOL value. If YES, the device supports ray tracing from render pipeline stages. If NO, the device does not.
1081
+ */
1082
+ @property (readonly) BOOL supportsRaytracingFromRender API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
1083
+
1084
+ /*!
1085
+ @property supportsPrimitiveMotionBlur
1086
+ @abstract Query device support for using ray tracing primitive motion blur.
1087
+ @return BOOL value. If YES, the device supports the primitive motion blur api. If NO, the device does not.
1088
+ */
1089
+ @property (readonly) BOOL supportsPrimitiveMotionBlur API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
1090
+
1091
+
1092
+ /*!
1093
+ @property maximumConcurrentCompilationTaskCount
1094
+ @abstract Returns the maximum count of concurrent executing compilation tasks.
1095
+ @discussion The property returns a different value depending on the value of the property `shouldMaximizeConcurrentCompilation`.
1096
+ */
1097
+ @property (readonly) NSUInteger maximumConcurrentCompilationTaskCount
1098
+ API_AVAILABLE(macos(13.3), ios(26.0));
1099
+
1100
+ /*!
1101
+ @method newResidencySetWithDescriptor
1102
+ @abstract Creates a new residency set with a descriptor.
1103
+ */
1104
+ - (nullable id<MTLResidencySet>) newResidencySetWithDescriptor:(MTLResidencySetDescriptor *)desc
1105
+ error:(NSError *__nullable*)error
1106
+ API_AVAILABLE(macos(15.0), ios(18.0));
1107
+
1108
+
1109
+ /*!
1110
+ @method functionHandleWithFunction:
1111
+ @abstract Returns the function handle for a function that was compiled with MTLFunctionOptionPipelineIndependent and MTLFunctionOptionCompileToBinary.
1112
+ */
1113
+ - (nullable id<MTLFunctionHandle>)functionHandleWithFunction:(id<MTLFunction>)function API_AVAILABLE(macos(26.0), ios(26.0));
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+ @end
1122
+ NS_ASSUME_NONNULL_END