peachsim 0.1.1674 → 0.1.1692

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 (350) hide show
  1. package/cli/commands/control.ts +13 -1
  2. package/cli/commands/coverage-swift.ts +150 -27
  3. package/cli/commands/coverage.ts +219 -20
  4. package/cli/commands/detect.ts +10 -6
  5. package/cli/commands/inspect/actions.ts +1 -0
  6. package/cli/commands/inspect/core.ts +2 -0
  7. package/cli/commands/inspect/wait-ready.ts +7 -0
  8. package/cli/commands/screenshot.ts +12 -0
  9. package/cli/outbound-endpoints.ts +12 -0
  10. package/detox/index.ts +11 -1
  11. package/detox/jest-environment.cjs +14 -0
  12. package/dist-lib/agent-daemon-client.cjs +1 -1
  13. package/dist-lib/agent-events.cjs +1 -1
  14. package/dist-lib/attached-projects.cjs +1 -1
  15. package/dist-lib/auth/shared-session.cjs +1 -1
  16. package/dist-lib/backend-origin.cjs +1 -1
  17. package/dist-lib/beta.cjs +1 -1
  18. package/dist-lib/beta.mjs +1 -1
  19. package/dist-lib/bridge-constants.cjs +1 -1
  20. package/dist-lib/bridge-contract-input.cjs +1 -1
  21. package/dist-lib/bridge-contract-input.mjs +1 -1
  22. package/dist-lib/bridge-contract.cjs +1 -1
  23. package/dist-lib/bridge-contract.mjs +1 -1
  24. package/dist-lib/bundle-channel.cjs +4833 -2432
  25. package/dist-lib/capture-contract.cjs +1 -1
  26. package/dist-lib/capture-contract.mjs +1 -1
  27. package/dist-lib/cloud-contract.cjs +1 -1
  28. package/dist-lib/cloud-contract.mjs +1 -1
  29. package/dist-lib/cloud-test-args.cjs +1 -1
  30. package/dist-lib/cloud-test-args.mjs +1 -1
  31. package/dist-lib/cloud.cjs +1 -1
  32. package/dist-lib/cloud.mjs +1 -1
  33. package/dist-lib/config.cjs +1 -1
  34. package/dist-lib/config.mjs +1 -1
  35. package/dist-lib/detox/index.cjs +6 -4
  36. package/dist-lib/detox/jest-environment.cjs +14 -0
  37. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  38. package/dist-lib/expo-swift-bundle.cjs +3785 -1737
  39. package/dist-lib/expo-swift-metadata.cjs +1 -1
  40. package/dist-lib/expo-swift-metadata.mjs +1 -1
  41. package/dist-lib/home-paths.cjs +1 -1
  42. package/dist-lib/host/bridge-host.cjs +4253 -2205
  43. package/dist-lib/host/fetch-proxy-handler.cjs +20 -7
  44. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  45. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  46. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  47. package/dist-lib/host/websocket-proxy.cjs +1 -1
  48. package/dist-lib/index.cjs +2065 -796
  49. package/dist-lib/jump-to-source-babel.cjs +1 -1
  50. package/dist-lib/jump-to-source-native.cjs +1 -1
  51. package/dist-lib/kotlin-host.cjs +1 -1
  52. package/dist-lib/menu.cjs +1 -1
  53. package/dist-lib/menu.mjs +1 -1
  54. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  55. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  56. package/dist-lib/metro-production-bundle.cjs +1 -1
  57. package/dist-lib/metro-production-bundle.mjs +1 -1
  58. package/dist-lib/metro.cjs +6325 -4287
  59. package/dist-lib/native-app-identity-project.cjs +192 -55
  60. package/dist-lib/native-app-identity-project.mjs +235 -86
  61. package/dist-lib/native-app-identity.cjs +1 -1
  62. package/dist-lib/native-app-identity.mjs +1 -1
  63. package/dist-lib/native-firebase-metadata.cjs +1 -1
  64. package/dist-lib/native-firebase-metadata.mjs +1 -1
  65. package/dist-lib/plist.cjs +1 -1
  66. package/dist-lib/plist.mjs +1 -1
  67. package/dist-lib/profiles.cjs +1 -1
  68. package/dist-lib/public-brand.cjs +1 -1
  69. package/dist-lib/public-origins-lib-esm.json +27 -23
  70. package/dist-lib/public-origins-lib-static.json +1 -1
  71. package/dist-lib/public-origins-lib.json +156 -87
  72. package/dist-lib/react-native-host-modules.cjs +1 -1
  73. package/dist-lib/react-native-host-modules.mjs +1 -1
  74. package/dist-lib/reap-browser.cjs +2 -2
  75. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  76. package/dist-lib/sdk.cjs +3 -2
  77. package/dist-lib/sdk.mjs +3 -2
  78. package/dist-lib/skills.cjs +5036 -2833
  79. package/dist-lib/swift-compile.cjs +2937 -437
  80. package/dist-lib/swift-compile.mjs +2932 -435
  81. package/dist-lib/swift-package.cjs +137 -49
  82. package/dist-lib/swift-package.mjs +132 -49
  83. package/dist-lib/swift-submit.cjs +1 -1
  84. package/dist-lib/swift-submit.mjs +1 -1
  85. package/dist-lib/swift-toolchain.cjs +26 -11
  86. package/dist-lib/swift.cjs +1 -1
  87. package/dist-lib/vite-swift.cjs +6005 -1725
  88. package/dist-lib/vite.cjs +1911 -776
  89. package/dist-lib/worklet-executable.cjs +7 -4
  90. package/dist-lib/worklet-executable.mjs +7 -4
  91. package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
  92. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +24 -2
  93. package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
  94. package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
  95. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +8 -0
  96. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  97. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
  98. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  99. package/package.json +1 -1
  100. package/runtime-companion.json +1 -1
  101. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +60 -2
  102. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
  103. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
  104. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
  105. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
  106. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
  107. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
  108. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
  109. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
  110. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
  111. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
  112. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
  113. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
  114. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
  115. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
  116. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
  117. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
  118. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
  119. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
  120. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
  121. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
  122. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
  123. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
  124. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
  125. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
  126. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
  127. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
  128. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
  129. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
  130. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
  131. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
  132. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +117 -2
  133. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
  134. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
  135. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
  136. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
  137. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
  138. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
  139. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
  140. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
  141. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
  142. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
  143. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
  144. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
  145. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
  146. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
  147. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
  148. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
  149. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
  150. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
  151. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
  152. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
  153. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
  154. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
  155. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
  156. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
  157. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
  158. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
  159. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
  160. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
  161. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
  162. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
  163. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
  164. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
  165. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
  166. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
  167. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
  168. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
  169. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
  170. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
  171. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
  172. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
  173. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
  174. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
  175. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
  176. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
  177. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
  178. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
  179. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
  180. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
  181. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
  182. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
  183. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
  184. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
  185. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
  186. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
  187. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
  188. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
  189. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
  190. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
  191. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
  192. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
  193. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
  194. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
  195. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
  196. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
  197. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
  198. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
  199. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
  200. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
  201. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
  202. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
  203. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
  204. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
  205. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
  206. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
  207. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
  208. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
  209. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
  210. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
  211. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
  212. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
  213. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
  214. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
  215. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
  216. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
  217. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
  218. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
  219. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
  220. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
  221. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
  222. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
  223. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
  224. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
  225. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
  226. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
  227. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
  228. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
  229. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
  230. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
  231. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
  232. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
  233. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
  234. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
  235. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
  236. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
  237. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
  238. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
  239. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
  240. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
  241. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
  242. package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
  243. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
  244. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
  245. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
  246. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
  247. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
  248. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
  249. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
  250. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
  251. package/sdk/ios/usr/include/arm/param.h +151 -0
  252. package/sdk/ios/usr/include/complex.h +167 -0
  253. package/sdk/ios/usr/include/dispatch/dispatch.h +8 -0
  254. package/sdk/ios/usr/include/dlfcn.h +1 -2
  255. package/sdk/ios/usr/include/mach/mach_types.h +1 -0
  256. package/sdk/ios/usr/include/machine/param.h +42 -0
  257. package/sdk/ios/usr/include/math.h +835 -2
  258. package/sdk/ios/usr/include/net/if.h +1 -2
  259. package/sdk/ios/usr/include/peach/pthread.h +4 -4
  260. package/sdk/ios/usr/include/pthread/qos.h +304 -0
  261. package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
  262. package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
  263. package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
  264. package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
  265. package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
  266. package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
  267. package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
  268. package/sdk/ios/usr/include/sys/cdefs.h +3 -1
  269. package/sdk/ios/usr/include/sys/param.h +235 -0
  270. package/sdk/ios/usr/include/sys/proc.h +1 -0
  271. package/sdk/ios/usr/include/sys/qos.h +151 -12
  272. package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
  273. package/sdk/ios/wasm/include/fcntl.h +11 -0
  274. package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
  275. package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
  276. package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
  277. package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
  278. package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
  279. package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
  280. package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
  281. package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
  282. package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
  283. package/sdk/ios/wasm/include/machine/_types.h +153 -0
  284. package/sdk/ios/wasm/include/machine/endian.h +2 -0
  285. package/sdk/ios/wasm/include/machine/limits.h +2 -0
  286. package/sdk/ios/wasm/include/machine/types.h +30 -0
  287. package/sdk/ios/wasm/include/poll.h +8 -0
  288. package/sdk/ios/wasm/include/pthread.h +50 -0
  289. package/sdk/ios/wasm/include/signal.h +72 -0
  290. package/sdk/ios/wasm/include/stdlib.h +3 -0
  291. package/sdk/ios/wasm/include/string.h +10 -0
  292. package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
  293. package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
  294. package/sdk/ios/wasm/include/sys/mman.h +122 -0
  295. package/sdk/ios/wasm/include/sys/select.h +37 -0
  296. package/sdk/ios/wasm/include/sys/signal.h +259 -0
  297. package/sdk/ios/wasm/include/sys/socket.h +8 -0
  298. package/sdk/ios/wasm/include/sys/types.h +14 -0
  299. package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
  300. package/sdk/ios/wasm/include/sys/uio.h +11 -0
  301. package/sdk/ios/wasm/include/sys/wait.h +89 -0
  302. package/sdk/ios/wasm/include/time.h +8 -0
  303. package/sdk/ios/wasm/include/unistd.h +17 -0
  304. package/src/bridge-contract.ts +2 -0
  305. package/src/chromium-admission.ts +10 -5
  306. package/src/device-catalog.ts +4 -4
  307. package/src/generated/swift-c-predefines.json +1988 -0
  308. package/src/host/fetch-proxy-handler.ts +20 -0
  309. package/src/metro-plugin.ts +5 -2
  310. package/src/nitro-adapter.lock.json +6 -6
  311. package/src/nitro-bundle.ts +1 -0
  312. package/src/nitro-compile.ts +67 -2
  313. package/src/nitroContract.ts +18 -2
  314. package/src/numbered-lock.ts +72 -0
  315. package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
  316. package/src/react-native-coverage/capability-source-references.ts +50 -13
  317. package/src/react-native-coverage/native-source-credit.ts +126 -0
  318. package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
  319. package/src/react-native-coverage/native-surface.ts +49 -0
  320. package/src/react-native-coverage/verified-reach.ts +22 -2
  321. package/src/runtime-assets.ts +17 -0
  322. package/src/swift-compile.ts +530 -97
  323. package/src/swift-coverage/indexing.ts +17 -1
  324. package/src/swift-coverage/package.ts +3 -1
  325. package/src/swift-coverage/sdk.ts +71 -0
  326. package/src/swift-coverage/source.ts +74 -2
  327. package/src/swift-coverage/types.ts +6 -0
  328. package/src/swift-coverage/xcode-assets.ts +62 -2
  329. package/src/swift-coverage/xcode-packages.ts +11 -6
  330. package/src/swift-distribution.lock.json +12 -12
  331. package/src/swift-host.ts +457 -62
  332. package/src/swift-objc-compile.ts +26 -26
  333. package/src/swift-objc-metadata.ts +2 -8
  334. package/src/swift-objc-platform.ts +53 -0
  335. package/src/swift-objc-standin.ts +66 -12
  336. package/src/swift-package-manifest.ts +196 -28
  337. package/src/swift-package.ts +186 -60
  338. package/src/swift-packages.ts +298 -88
  339. package/src/swift-source-file.ts +10 -15
  340. package/src/swift-source-pods.ts +288 -0
  341. package/src/swift-standins.ts +87 -13
  342. package/src/swift-submit.ts +5 -0
  343. package/src/swift-toolchain.ts +32 -10
  344. package/src/swiftContract.ts +160 -75
  345. package/src/target-matcher.ts +15 -2
  346. package/src/vite-plugin-one.ts +5 -4
  347. package/src/worker-system-chunks.ts +7 -1
  348. package/src/worklet-executable.ts +7 -3
  349. package/src/xcode-json-project.ts +14 -2
  350. package/src/xcode-project.ts +193 -69
@@ -0,0 +1,449 @@
1
+ //
2
+ // MTLCommandBuffer.h
3
+ // Metal
4
+ //
5
+ // Copyright (c) 2014 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <Metal/MTLDefines.h>
10
+
11
+ NS_ASSUME_NONNULL_BEGIN
12
+ @protocol MTLDevice;
13
+ @protocol MTLCommandQueue;
14
+ @protocol MTLBlitCommandEncoder;
15
+ @protocol MTLRenderCommandEncoder;
16
+ @protocol MTLParallelRenderCommandEncoder;
17
+ @protocol MTLComputeCommandEncoder;
18
+ @protocol MTLCommandQueue;
19
+ @protocol MTLDrawable;
20
+ @protocol MTLCommandBuffer;
21
+ @protocol MTLEvent;
22
+ @protocol MTLLogContainer;
23
+ @protocol MTLLogState;
24
+ @protocol MTLResourceStateCommandEncoder;
25
+ @protocol MTLAccelerationStructureCommandEncoder;
26
+ @class MTLRenderPassDescriptor;
27
+ @class MTLComputePassDescriptor;
28
+ @class MTLBlitPassDescriptor;
29
+ @class MTLResourceStatePassDescriptor;
30
+ @class MTLAccelerationStructurePassDescriptor;
31
+ @protocol MTLResidencySet;
32
+
33
+ /*!
34
+ @enum MTLCommandBufferStatus
35
+
36
+ @abstract MTLCommandBufferStatus reports the current stage in the lifetime of MTLCommandBuffer, as it proceeds to enqueued, committed, scheduled, and completed.
37
+
38
+ @constant MTLCommandBufferStatusNotEnqueued
39
+ The command buffer has not been enqueued yet.
40
+
41
+ @constant MTLCommandBufferStatusEnqueued
42
+ This command buffer is enqueued, but not committed.
43
+
44
+ @constant MTLCommandBufferStatusCommitted
45
+ Commited to its command queue, but not yet scheduled for execution.
46
+
47
+ @constant MTLCommandBufferStatusScheduled
48
+ All dependencies have been resolved and the command buffer has been scheduled for execution.
49
+
50
+ @constant MTLCommandBufferStatusCompleted
51
+ The command buffer has finished executing successfully: any blocks set with -addCompletedHandler: may now be called.
52
+
53
+ @constant MTLCommandBufferStatusError
54
+ Execution of the command buffer was aborted due to an error during execution. Check -error for more information.
55
+ */
56
+ typedef NS_ENUM(NSUInteger, MTLCommandBufferStatus) {
57
+ MTLCommandBufferStatusNotEnqueued = 0,
58
+ MTLCommandBufferStatusEnqueued = 1,
59
+ MTLCommandBufferStatusCommitted = 2,
60
+ MTLCommandBufferStatusScheduled = 3,
61
+ MTLCommandBufferStatusCompleted = 4,
62
+ MTLCommandBufferStatusError = 5,
63
+ } API_AVAILABLE(macos(10.11), ios(8.0));
64
+
65
+ /*!
66
+ @constant MTLCommandBufferErrorDomain
67
+ @abstract An error domain for NSError objects produced by MTLCommandBuffer
68
+ */
69
+ API_AVAILABLE(macos(10.11), ios(8.0))
70
+ MTL_EXTERN NSErrorDomain const MTLCommandBufferErrorDomain;
71
+
72
+ /*!
73
+ @enum MTLCommandBufferError
74
+ @abstract Error codes that can be found in MTLCommandBuffer.error
75
+
76
+ @constant MTLCommandBufferErrorInternal
77
+ An internal error that doesn't fit into the other categories. The actual low level error code is encoded in the local description.
78
+
79
+ @constant MTLCommandBufferErrorTimeout
80
+ Execution of this command buffer took too long, execution of this command was interrupted and aborted.
81
+
82
+ @constant MTLCommandBufferErrorPageFault
83
+ Execution of this command buffer generated an unserviceable GPU page fault. This can caused by buffer read write attribute mismatch or out of boundary access.
84
+
85
+ @constant MTLCommandBufferErrorAccessRevoked
86
+ Access to this device has been revoked because this client has been responsible for too many timeouts or hangs.
87
+
88
+ @constant MTLCommandBufferErrorNotPermitted
89
+ This process does not have access to use this device.
90
+
91
+ @constant MTLCommandBufferErrorOutOfMemory
92
+ Insufficient memory was available to execute this command buffer.
93
+
94
+ @constant MTLCommandBufferErrorInvalidResource
95
+ The command buffer referenced an invalid resource. This is most commonly caused when the caller deletes a resource before executing a command buffer that refers to it.
96
+
97
+ @constant MTLCommandBufferErrorMemoryless
98
+ One or more internal resources limits reached that prevent using memoryless render pass attachments. See error string for more detail.
99
+
100
+ @constant MTLCommandBufferErrorDeviceRemoved
101
+ The device was physically removed before the command could finish execution
102
+
103
+ @constant MTLCommandBufferErrorStackOverflow
104
+ Execution of the command buffer was stopped due to Stack Overflow Exception. [MTLComputePipelineDescriptor maxCallStackDepth] setting needs to be checked.
105
+ */
106
+
107
+ typedef NS_ENUM(NSUInteger, MTLCommandBufferError)
108
+ {
109
+ MTLCommandBufferErrorNone = 0,
110
+ MTLCommandBufferErrorInternal = 1,
111
+ MTLCommandBufferErrorTimeout = 2,
112
+ MTLCommandBufferErrorPageFault = 3,
113
+ MTLCommandBufferErrorBlacklisted API_DEPRECATED_WITH_REPLACEMENT("MTLCommandBufferErrorAccessRevoked", macos(10.11, 13.0), ios(8.0, 16.0)) = 4,
114
+ MTLCommandBufferErrorAccessRevoked = 4,
115
+ MTLCommandBufferErrorNotPermitted = 7,
116
+ MTLCommandBufferErrorOutOfMemory = 8,
117
+ MTLCommandBufferErrorInvalidResource = 9,
118
+ MTLCommandBufferErrorMemoryless API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(10.0)) = 10,
119
+ MTLCommandBufferErrorDeviceRemoved API_DEPRECATED("MTLCommandBufferErrorDeviceRemoved cannot occur on Apple Silicon", macos(10.13, 27.0)) API_UNAVAILABLE(ios) = 11,
120
+ MTLCommandBufferErrorStackOverflow API_AVAILABLE(macos(12.0), ios(15.0)) = 12,
121
+ } API_AVAILABLE(macos(10.11), ios(8.0));
122
+
123
+ /*!
124
+ @abstract Key in the userInfo for MTLCommandBufferError NSErrors. Value is an NSArray of MTLCommandBufferEncoderInfo objects in recorded order if an appropriate MTLCommandBufferErrorOption was set, otherwise the key will not exist in the userInfo dictionary.
125
+ */
126
+ API_AVAILABLE(macos(11.0), ios(14.0))
127
+ MTL_EXTERN NSErrorUserInfoKey const MTLCommandBufferEncoderInfoErrorKey;
128
+
129
+ /*!
130
+ @abstract Options for controlling the error reporting for Metal command buffer objects.
131
+
132
+ @constant MTLCommandBufferErrorOptionNone
133
+ No special error reporting.
134
+
135
+ @constant MTLCommandBufferErrorOptionEncoderExecutionStatus
136
+ Provide the execution status of the individual encoders within the command buffer. In the event of a command buffer error, populate the `userInfo` dictionary of the command buffer's NSError parameter, see MTLCommandBufferEncoderInfoErrorKey and MTLCommandBufferEncoderInfo. Note that enabling this error reporting option may increase CPU, GPU, and/or memory overhead on some platforms; testing for impact is suggested.
137
+ */
138
+ typedef NS_OPTIONS(NSUInteger, MTLCommandBufferErrorOption) {
139
+ MTLCommandBufferErrorOptionNone = 0,
140
+ MTLCommandBufferErrorOptionEncoderExecutionStatus = 1 << 0,
141
+ } API_AVAILABLE(macos(11.0), ios(14.0));
142
+
143
+ /*!
144
+ @abstract The error states for a Metal command encoder after command buffer execution.
145
+
146
+ @constant MTLCommandEncoderErrorStateUnknown
147
+ The state of the commands associated with the encoder is unknown (the error information was likely not requested).
148
+
149
+ @constant MTLCommandEncoderErrorStateCompleted
150
+ The commands associated with the encoder were completed.
151
+
152
+ @constant MTLCommandEncoderErrorStateAffected
153
+ The commands associated with the encoder were affected by an error, which may or may not have been caused by the commands themselves, and failed to execute in full.
154
+
155
+ @constant MTLCommandEncoderErrorStatePending
156
+ The commands associated with the encoder never started execution.
157
+
158
+ @constant MTLCommandEncoderErrorStateFaulted
159
+ The commands associated with the encoder caused an error.
160
+ */
161
+ typedef NS_ENUM(NSInteger, MTLCommandEncoderErrorState) {
162
+ MTLCommandEncoderErrorStateUnknown = 0,
163
+ MTLCommandEncoderErrorStateCompleted = 1,
164
+ MTLCommandEncoderErrorStateAffected = 2,
165
+ MTLCommandEncoderErrorStatePending = 3,
166
+ MTLCommandEncoderErrorStateFaulted = 4,
167
+ } API_AVAILABLE(macos(11.0), ios(14.0));
168
+
169
+ /*!
170
+ @class MTLCommandBufferDescriptor
171
+ @abstract An object that you use to configure new Metal command buffer objects.
172
+ */
173
+ MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
174
+ @interface MTLCommandBufferDescriptor : NSObject <NSCopying>
175
+
176
+ /*!
177
+ @property retainedReferences
178
+ @abstract If YES, the created command buffer holds strong references to objects needed for it to execute. If NO, the created command buffer does not hold strong references to objects needed for it to execute.
179
+ */
180
+ @property (readwrite, nonatomic) BOOL retainedReferences;
181
+
182
+ /*!
183
+ @property errorOptions
184
+ @abstract A set of options to influence the error reporting of the created command buffer. See MTLCommandBufferErrorOption.
185
+ */
186
+ @property (readwrite, nonatomic) MTLCommandBufferErrorOption errorOptions;
187
+
188
+ /*!
189
+ @property logState
190
+ @abstract Contains information related to shader logging.
191
+ */
192
+ @property (readwrite, nonatomic, nullable, retain) id<MTLLogState> logState
193
+ API_AVAILABLE(macos(15.0), ios(18.0));
194
+
195
+ @end // MTLCommandBufferDescriptor
196
+
197
+ /*!
198
+ @abstract Provides execution status information for a Metal command encoder.
199
+ */
200
+ API_AVAILABLE(macos(11.0), ios(14.0))
201
+ @protocol MTLCommandBufferEncoderInfo <NSObject>
202
+
203
+ /*!
204
+ @abstract The debug label given to the associated Metal command encoder at command buffer submission.
205
+ */
206
+ @property (readonly, nonatomic) NSString* label;
207
+
208
+ /*!
209
+ @abstract The debug signposts inserted into the associated Metal command encoder.
210
+ */
211
+ @property (readonly, nonatomic) NSArray<NSString*>* debugSignposts;
212
+
213
+ /*!
214
+ @abstract The error state of the associated Metal command encoder.
215
+ */
216
+ @property (readonly, nonatomic) MTLCommandEncoderErrorState errorState;
217
+
218
+ @end // MTLCommandBufferEncoderInfo
219
+
220
+
221
+ typedef void (^ NS_SWIFT_SENDABLE MTLCommandBufferHandler)(id <MTLCommandBuffer>);
222
+
223
+ /*!
224
+ @enum MTLDispatchType
225
+
226
+ @abstract MTLDispatchType Describes how a command encoder will execute dispatched work.
227
+
228
+ @constant MTLDispatchTypeSerial
229
+ Command encoder dispatches are executed in dispatched order.
230
+
231
+ @constant MTLDispatchTypeConcurrent
232
+ Command encoder dispatches are executed in parallel with each other.
233
+ */
234
+
235
+ typedef NS_ENUM(NSUInteger, MTLDispatchType){
236
+ MTLDispatchTypeSerial,
237
+ MTLDispatchTypeConcurrent,
238
+ }API_AVAILABLE(macos(10.14), ios(12.0));
239
+
240
+ /*!
241
+ @protocol MTLCommandBuffer
242
+ @abstract A serial list of commands for the device to execute.
243
+ */
244
+ API_AVAILABLE(macos(10.11), ios(8.0))
245
+ @protocol MTLCommandBuffer <NSObject>
246
+
247
+ /*!
248
+ @property device
249
+ @abstract The device this resource was created against.
250
+ */
251
+ @property (readonly) id <MTLDevice> device;
252
+
253
+ /*!
254
+ @property commandQueue
255
+ @abstract The command queue this command buffer was created from.
256
+ */
257
+ @property (readonly) id <MTLCommandQueue> commandQueue;
258
+
259
+ /*!
260
+ @property retainedReferences
261
+ @abstract If YES, this command buffer holds strong references to objects needed to execute this command buffer.
262
+ */
263
+ @property (readonly) BOOL retainedReferences;
264
+
265
+ /*!
266
+ @abstract The set of options configuring the error reporting of the created command buffer.
267
+ */
268
+ @property (readonly) MTLCommandBufferErrorOption errorOptions API_AVAILABLE(macos(11.0), ios(14.0));
269
+
270
+ /*!
271
+ @property label
272
+ @abstract A string to help identify this object.
273
+ */
274
+ @property (nullable, copy, atomic) NSString *label;
275
+
276
+ @property (readonly) CFTimeInterval kernelStartTime API_AVAILABLE(macos(10.15), macCatalyst(13.0), ios(10.3));
277
+ @property (readonly) CFTimeInterval kernelEndTime API_AVAILABLE(macos(10.15), macCatalyst(13.0), ios(10.3));
278
+
279
+ /*!
280
+ @property logs
281
+ @abstract Logs generated by the command buffer during execution of the GPU commands. Valid after GPU execution is completed
282
+ */
283
+ @property (readonly) id<MTLLogContainer> logs API_AVAILABLE(macos(11.0), ios(14.0));
284
+
285
+ /*!
286
+ @property GPUStartTime
287
+ @abstract The host time in seconds that GPU starts executing this command buffer. Returns zero if it has not started. This usually can be called in command buffer completion handler.
288
+ */
289
+ @property (readonly) CFTimeInterval GPUStartTime API_AVAILABLE(macos(10.15), macCatalyst(13.0), ios(10.3));
290
+ /*!
291
+ @property GPUEndTime
292
+ @abstract The host time in seconds that GPU finishes executing this command buffer. Returns zero if CPU has not received completion notification. This usually can be called in command buffer completion handler.
293
+ */
294
+ @property (readonly) CFTimeInterval GPUEndTime API_AVAILABLE(macos(10.15), macCatalyst(13.0), ios(10.3));
295
+
296
+ /*!
297
+ @method enqueue
298
+ @abstract Append this command buffer to the end of its MTLCommandQueue.
299
+ */
300
+ - (void)enqueue;
301
+
302
+ /*!
303
+ @method commit
304
+ @abstract Commit a command buffer so it can be executed as soon as possible.
305
+ */
306
+ - (void)commit;
307
+
308
+ /*!
309
+ @method addScheduledHandler:block:
310
+ @abstract Adds a block to be called when this command buffer has been scheduled for execution.
311
+ */
312
+ - (void)addScheduledHandler:(MTLCommandBufferHandler)block;
313
+
314
+ /*!
315
+ @method presentDrawable:
316
+ @abstract Add a drawable present that will be invoked when this command buffer has been scheduled for execution.
317
+ @discussion The submission thread will be lock stepped with present call been serviced by window server
318
+ */
319
+ - (void)presentDrawable:(id <MTLDrawable>)drawable;
320
+
321
+ /*!
322
+ @method presentDrawable:atTime:
323
+ @abstract Add a drawable present for a specific host time that will be invoked when this command buffer has been scheduled for execution.
324
+ @discussion The submission thread will be lock stepped with present call been serviced by window server
325
+ */
326
+ - (void)presentDrawable:(id <MTLDrawable>)drawable atTime:(CFTimeInterval)presentationTime;
327
+
328
+
329
+ /*!
330
+ @method waitUntilScheduled
331
+ @abstract Synchronously wait for this command buffer to be scheduled.
332
+ */
333
+ - (void)waitUntilScheduled NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use 'await scheduled()' instead.");
334
+
335
+ /*!
336
+ @method addCompletedHandler:block:
337
+ @abstract Add a block to be called when this command buffer has completed execution.
338
+ */
339
+ - (void)addCompletedHandler:(MTLCommandBufferHandler)block;
340
+
341
+ /*!
342
+ @method waitUntilCompleted
343
+ @abstract Synchronously wait for this command buffer to complete.
344
+ */
345
+ - (void)waitUntilCompleted NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use 'await completed()' instead.");
346
+
347
+ /*!
348
+ @property status
349
+ @abstract status reports the current stage in the lifetime of MTLCommandBuffer, as it proceeds to enqueued, committed, scheduled, and completed.
350
+ */
351
+ @property (readonly) MTLCommandBufferStatus status;
352
+
353
+ /*!
354
+ @property error
355
+ @abstract If an error occurred during execution, the NSError may contain more details about the problem.
356
+ */
357
+ @property (nullable, readonly) NSError *error;
358
+
359
+ /*!
360
+ @method blitCommandEncoder
361
+ @abstract returns a blit command encoder to encode into this command buffer.
362
+ */
363
+ - (nullable id <MTLBlitCommandEncoder>)blitCommandEncoder;
364
+
365
+ /*!
366
+ @method renderCommandEncoderWithDescriptor:
367
+ @abstract returns a render command endcoder to encode into this command buffer.
368
+ */
369
+ - (nullable id <MTLRenderCommandEncoder>)renderCommandEncoderWithDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
370
+
371
+ /*!
372
+ @method computeCommandEncoderWithDescriptor:
373
+ @abstract returns a compute command endcoder to encode into this command buffer.
374
+ */
375
+ - (nullable id <MTLComputeCommandEncoder>)computeCommandEncoderWithDescriptor:(MTLComputePassDescriptor *)computePassDescriptor API_AVAILABLE(macos(11.0), ios(14.0));
376
+
377
+ /*!
378
+ @method blitCommandEncoderWithDescriptor:
379
+ @abstract returns a blit command endcoder to encode into this command buffer.
380
+ */
381
+ - (nullable id <MTLBlitCommandEncoder>)blitCommandEncoderWithDescriptor:(MTLBlitPassDescriptor *)blitPassDescriptor API_AVAILABLE(macos(11.0), ios(14.0));
382
+ /*!
383
+ @method computeCommandEncoder
384
+ @abstract returns a compute command encoder to encode into this command buffer.
385
+ */
386
+ - (nullable id <MTLComputeCommandEncoder>)computeCommandEncoder;
387
+ /*!
388
+ @method computeCommandEncoderWithDispatchType
389
+ @abstract returns a compute command encoder to encode into this command buffer. Optionally allow this command encoder to execute dispatches concurrently.
390
+ @discussion On devices that do not support concurrent command encoders, this call is equivalent to computeCommandEncoder
391
+ */
392
+
393
+ - (nullable id<MTLComputeCommandEncoder>)computeCommandEncoderWithDispatchType:(MTLDispatchType) dispatchType API_AVAILABLE(macos(10.14), ios(12.0));
394
+
395
+ /*!
396
+ @method encodeWaitForEvent:value:
397
+ @abstract Encodes a command that pauses execution of this command buffer until the specified event reaches a given value.
398
+ @discussion This method may only be called if there is no current command encoder on the receiver.
399
+ */
400
+ - (void)encodeWaitForEvent:(id <MTLEvent>)event value:(uint64_t)value API_AVAILABLE(macos(10.14), ios(12.0));
401
+
402
+ /*!
403
+ @method encodeSignalEvent:value:
404
+ @abstract Encodes a command that signals an event with a given value.
405
+ @discussion This method may only be called if there is no current command encoder on the receiver.
406
+ */
407
+ - (void)encodeSignalEvent:(id <MTLEvent>)event value:(uint64_t)value API_AVAILABLE(macos(10.14), ios(12.0));
408
+
409
+ /*!
410
+ @method parallelRenderCommandEncoderWithDescriptor:
411
+ @abstract returns a parallel render pass encoder to encode into this command buffer.
412
+ */
413
+ - (nullable id <MTLParallelRenderCommandEncoder>)parallelRenderCommandEncoderWithDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
414
+
415
+ - (nullable id<MTLResourceStateCommandEncoder>) resourceStateCommandEncoder API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
416
+ - (nullable id<MTLResourceStateCommandEncoder>) resourceStateCommandEncoderWithDescriptor:(MTLResourceStatePassDescriptor *) resourceStatePassDescriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
417
+
418
+ - (nullable id <MTLAccelerationStructureCommandEncoder>)accelerationStructureCommandEncoder API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
419
+
420
+ - (id <MTLAccelerationStructureCommandEncoder>)accelerationStructureCommandEncoderWithDescriptor:(MTLAccelerationStructurePassDescriptor *)descriptor API_AVAILABLE(macos(13.0), ios(16.0));
421
+
422
+ /*!
423
+ @method pushDebugGroup:
424
+ @abstract Push a new named string onto a stack of string labels.
425
+ */
426
+ - (void)pushDebugGroup:(NSString *)string API_AVAILABLE(macos(10.13), ios(11.0));
427
+
428
+ /*!
429
+ @method popDebugGroup
430
+ @abstract Pop the latest named string off of the stack.
431
+ */
432
+ - (void)popDebugGroup API_AVAILABLE(macos(10.13), ios(11.0));
433
+
434
+ /*!
435
+ @method useResidencySet
436
+ @abstract Marks the residency set as part of the current command buffer execution. This ensures that the residency set is resident during execution of the command buffer.
437
+ */
438
+ - (void)useResidencySet:(id <MTLResidencySet>)residencySet
439
+ API_AVAILABLE(macos(15.0), ios(18.0));
440
+ /*!
441
+ @method useResidencySets
442
+ @abstract Marks the residency sets as part of the current command buffer execution. This ensures that the residency sets are resident during execution of the command buffer.
443
+ */
444
+ - (void)useResidencySets:(const id <MTLResidencySet> _Nonnull[_Nonnull])residencySets
445
+ count:(NSUInteger)count
446
+ API_AVAILABLE(macos(15.0), ios(18.0));
447
+
448
+ @end
449
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,148 @@
1
+ //
2
+ // MTLCommandEncoder.h
3
+ // Metal
4
+ //
5
+ // Copyright (c) 2014 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <Metal/MTLDefines.h>
10
+
11
+ NS_ASSUME_NONNULL_BEGIN
12
+ @protocol MTLDevice;
13
+
14
+ /*!
15
+ * @brief Describes how a resource will be used by a shader through an argument buffer
16
+ */
17
+ typedef NS_OPTIONS(NSUInteger, MTLResourceUsage)
18
+ {
19
+ MTLResourceUsageRead = 1 << 0,
20
+ MTLResourceUsageWrite = 1 << 1,
21
+ MTLResourceUsageSample API_DEPRECATED_WITH_REPLACEMENT("MTLResourceUsageRead", macos(10.13, 13.0), ios(11.0, 16.0)) = 1 << 2
22
+ } API_AVAILABLE(macos(10.13), ios(11.0));
23
+
24
+ /*!
25
+ * @brief Describes the types of resources that the a barrier operates on
26
+ */
27
+ typedef NS_OPTIONS(NSUInteger, MTLBarrierScope)
28
+ {
29
+ MTLBarrierScopeBuffers = 1 << 0,
30
+ MTLBarrierScopeTextures = 1 << 1,
31
+ MTLBarrierScopeRenderTargets API_AVAILABLE(macos(10.14), macCatalyst(13.0)) API_UNAVAILABLE(ios) = 1 << 2,
32
+ } API_AVAILABLE(macos(10.14), ios(12.0));
33
+
34
+ /// Describes stages of GPU work.
35
+ ///
36
+ /// All commands you encoder into command buffers relate to one or more shader stages,
37
+ /// for example, a compute dispatch command from a compute command encoder relates to
38
+ /// stage ``MTLStageDispatch``.
39
+ ///
40
+ /// Use these stages to issue barriers between shader stages to ensure Metal correctly
41
+ /// synchronizes GPU commands.
42
+ typedef NS_OPTIONS(NSUInteger, MTLStages)
43
+ {
44
+ /// Represents all vertex shader stage work in a render pass.
45
+ MTLStageVertex = 1 << 0,
46
+
47
+ /// Represents all fragment shader stage work in a render pass.
48
+ MTLStageFragment = 1 << 1,
49
+
50
+ /// Represents all tile shading stage work in a render pass.
51
+ MTLStageTile = 1 << 2,
52
+
53
+ /// Represents all object shader stage work in a render pass.
54
+ MTLStageObject = 1 << 3,
55
+
56
+ /// Represents all mesh shader stage work work in a render pass.
57
+ MTLStageMesh = 1 << 4,
58
+
59
+ /// Represents all sparse and placement sparse resource mapping updates.
60
+ MTLStageResourceState = 1 << 26,
61
+
62
+ /// Represents all compute dispatches in a compute pass.
63
+ MTLStageDispatch = 1 << 27,
64
+
65
+ /// Represents all blit operations in a pass.
66
+ MTLStageBlit = 1 << 28,
67
+
68
+ /// Represents all acceleration structure operations.
69
+ MTLStageAccelerationStructure = 1 << 29,
70
+
71
+ /// Represents all machine learning network dispatch operations.
72
+ MTLStageMachineLearning = 1 << 30,
73
+
74
+ /// Convenience mask representing all stages of GPU work.
75
+ MTLStageAll = NSIntegerMax,
76
+ } API_AVAILABLE(macos(26.0), ios(26.0));
77
+
78
+ /*!
79
+ @protocol MTLCommandEncoder
80
+ @abstract MTLCommandEncoder is the common interface for objects that write commands into MTLCommandBuffers.
81
+ */
82
+ API_AVAILABLE(macos(10.11), ios(8.0))
83
+ @protocol MTLCommandEncoder <NSObject>
84
+
85
+ /*!
86
+ @property device
87
+ @abstract The device this resource was created against.
88
+ */
89
+ @property (readonly) id <MTLDevice> device;
90
+
91
+ /*!
92
+ @property label
93
+ @abstract A string to help identify this object.
94
+ */
95
+ @property (nullable, copy, atomic) NSString *label;
96
+
97
+ /*!
98
+ @method endEncoding
99
+ @abstract Declare that all command generation from this encoder is complete, and detach from the MTLCommandBuffer.
100
+ */
101
+ - (void)endEncoding;
102
+
103
+ /// Encodes a consumer barrier on work you commit to the same command queue.
104
+ ///
105
+ /// Encode a barrier that guarantees that any subsequent work you encode in the current command encoder that corresponds
106
+ /// to the `beforeStages` stages doesn't proceed until Metal completes all work prior to the current command encoder
107
+ /// corresponding to the `afterQueueStages` stages, completes.
108
+ ///
109
+ /// Metal can reorder the exact point where it applies the barrier, so use this method for synchronizing between different passes.
110
+ ///
111
+ /// If you need to synchronize work within a pass that you encode with an instance of a subclass of ``MTLCommandEncoder``,
112
+ /// use memory barriers instead. For subclasses of ``MTL4CommandEncoder``, use encoder barriers.
113
+ ///
114
+ /// You can specify `afterQueueStages` and `beforeStages` that contain ``MTLStages`` unrelated to the current command
115
+ /// encoder.
116
+ ///
117
+ /// - Parameters:
118
+ /// - afterQueueStages: ``MTLStages`` mask that represents the stages of work to wait for.
119
+ /// This argument applies to work corresponding to these stages you
120
+ /// encode in prior command encoders, and not for the current encoder.
121
+ /// - beforeStages: ``MTLStages`` mask that represents the stages of work that wait.
122
+ /// This argument applies to work you encode in the current command encoder.
123
+ - (void)barrierAfterQueueStages:(MTLStages)afterQueueStages
124
+ beforeStages:(MTLStages)beforeStages
125
+ API_AVAILABLE(macos(26.0), ios(26.0));
126
+
127
+ /* Debug Support */
128
+
129
+ /*!
130
+ @method insertDebugSignpost:
131
+ @abstract Inserts a debug string into the command buffer. This does not change any API behavior, but can be useful when debugging.
132
+ */
133
+ - (void)insertDebugSignpost:(NSString *)string;
134
+
135
+ /*!
136
+ @method pushDebugGroup:
137
+ @abstract Push a new named string onto a stack of string labels.
138
+ */
139
+ - (void)pushDebugGroup:(NSString *)string;
140
+
141
+ /*!
142
+ @method popDebugGroup
143
+ @abstract Pop the latest named string off of the stack.
144
+ */
145
+ - (void)popDebugGroup;
146
+
147
+ @end
148
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,102 @@
1
+ //
2
+ // MTLCommandQueue.h
3
+ // Metal
4
+ //
5
+ // Copyright (c) 2014 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Metal/MTLDefines.h>
9
+ #import <Metal/Metal.h>
10
+
11
+ NS_ASSUME_NONNULL_BEGIN
12
+ @protocol MTLDevice;
13
+ @protocol MTLCommandBuffer;
14
+ @protocol MTLResidencySet;
15
+
16
+ /*!
17
+ @protocol MTLCommandQueue
18
+ @brief A serial queue of command buffers to be executed by the device.
19
+ */
20
+ API_AVAILABLE(macos(10.11), ios(8.0)) NS_SWIFT_SENDABLE
21
+ @protocol MTLCommandQueue <NSObject>
22
+
23
+ /*! @brief A string to help identify this object */
24
+ @property (nullable, copy, atomic) NSString *label;
25
+
26
+ /*! @brief The device this queue will submit to */
27
+ @property (readonly) id <MTLDevice> device;
28
+
29
+ /*!
30
+ @method commandBuffer
31
+ @abstract Returns a new autoreleased command buffer used to encode work into this queue that
32
+ maintains strong references to resources used within the command buffer.
33
+ */
34
+ - (nullable id <MTLCommandBuffer>)commandBuffer;
35
+
36
+ /*!
37
+ @method commandBufferWithDescriptor
38
+ @param descriptor The requested properties of the command buffer.
39
+ @abstract Returns a new autoreleased command buffer used to encode work into this queue.
40
+ */
41
+ - (nullable id <MTLCommandBuffer>)commandBufferWithDescriptor:(MTLCommandBufferDescriptor*)descriptor API_AVAILABLE(macos(11.0), ios(14.0));
42
+
43
+
44
+ /*!
45
+ @method commandBufferWithUnretainedReferences
46
+ @abstract Returns a new autoreleased command buffer used to encode work into this queue that
47
+ does not maintain strong references to resources used within the command buffer.
48
+ */
49
+ - (nullable id <MTLCommandBuffer>)commandBufferWithUnretainedReferences;
50
+
51
+ /*!
52
+ @method insertDebugCaptureBoundary
53
+ @abstract Inform Xcode about when debug capture should start and stop.
54
+ */
55
+ - (void)insertDebugCaptureBoundary API_DEPRECATED("Use MTLCaptureScope instead", macos(10.11, 10.13), ios(8.0, 11.0));
56
+
57
+ /*!
58
+ @method addResidencySet
59
+ @abstract Marks the residency set as part of the command queue execution. This ensures that the residency set is resident during execution of all the command buffers within the queue.
60
+ */
61
+ - (void)addResidencySet:(id <MTLResidencySet>)residencySet
62
+ API_AVAILABLE(macos(15.0), ios(18.0));
63
+ /*!
64
+ @method addResidencySets
65
+ @abstract Marks the residency sets as part of the command queue execution. This ensures that the residency sets are resident during execution of all the command buffers within the queue.
66
+ */
67
+ - (void)addResidencySets:(const id <MTLResidencySet> _Nonnull[_Nonnull])residencySets
68
+ count:(NSUInteger)count
69
+ API_AVAILABLE(macos(15.0), ios(18.0));
70
+
71
+ /*!
72
+ @method removeResidencySet
73
+ @abstract Removes the residency set from the command queue execution. This ensures that only the remaining residency sets are resident during execution of all the command buffers within the queue.
74
+ */
75
+ - (void)removeResidencySet:(id <MTLResidencySet>)residencySet
76
+ API_AVAILABLE(macos(15.0), ios(18.0));
77
+
78
+ /*!
79
+ @method removeResidencySets
80
+ @abstract Removes the residency sets from the command queue execution. This ensures that only the remaining residency sets are resident during execution of all the command buffers within the queue.
81
+ */
82
+ - (void)removeResidencySets:(const id <MTLResidencySet> _Nonnull[_Nonnull])residencySets
83
+ count:(NSUInteger)count
84
+ API_AVAILABLE(macos(15.0), ios(18.0));
85
+
86
+ @end
87
+
88
+ MTL_EXPORT API_AVAILABLE(macos(15.0), ios(18.0))
89
+ @interface MTLCommandQueueDescriptor : NSObject <NSCopying>
90
+ /*!
91
+ @property maxCommandBufferCount
92
+ @ Specify upper bound on uncompleted command buffers that may be enqueued on this queue
93
+ */
94
+ @property (readwrite, nonatomic) NSUInteger maxCommandBufferCount;
95
+
96
+ /*!
97
+ @property logState
98
+ @ Specify the MTLLogState to enable shader logging
99
+ */
100
+ @property (readwrite, nonatomic, nullable, retain) id<MTLLogState> logState;
101
+ @end
102
+ NS_ASSUME_NONNULL_END