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,460 @@
1
+ //
2
+ // MTLTexture.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
+ #import <Metal/MTLResource.h>
11
+ #import <Metal/MTLBuffer.h>
12
+ #import <Metal/MTLTypes.h>
13
+
14
+
15
+ #import <IOSurface/IOSurfaceRef.h>
16
+
17
+
18
+ NS_ASSUME_NONNULL_BEGIN
19
+ /*!
20
+ @enum MTLTextureType
21
+ @abstract MTLTextureType describes the dimensionality of each image, and if multiple images are arranged into an array or cube.
22
+ */
23
+ typedef NS_ENUM(NSUInteger, MTLTextureType)
24
+ {
25
+ MTLTextureType1D = 0,
26
+ MTLTextureType1DArray = 1,
27
+ MTLTextureType2D = 2,
28
+ MTLTextureType2DArray = 3,
29
+ MTLTextureType2DMultisample = 4,
30
+ MTLTextureTypeCube = 5,
31
+ MTLTextureTypeCubeArray API_AVAILABLE(macos(10.11), ios(11.0)) = 6,
32
+ MTLTextureType3D = 7,
33
+ MTLTextureType2DMultisampleArray API_AVAILABLE(macos(10.14), ios(14.0), tvos(16.0)) = 8,
34
+ MTLTextureTypeTextureBuffer API_AVAILABLE(macos(10.14), ios(12.0)) = 9
35
+ } API_AVAILABLE(macos(10.11), ios(8.0));
36
+
37
+
38
+ typedef NS_ENUM(uint8_t, MTLTextureSwizzle) {
39
+ MTLTextureSwizzleZero = 0,
40
+ MTLTextureSwizzleOne = 1,
41
+ MTLTextureSwizzleRed = 2,
42
+ MTLTextureSwizzleGreen = 3,
43
+ MTLTextureSwizzleBlue = 4,
44
+ MTLTextureSwizzleAlpha = 5,
45
+ } API_AVAILABLE(macos(10.15), ios(13.0));
46
+
47
+ typedef struct
48
+ {
49
+ MTLTextureSwizzle red;
50
+ MTLTextureSwizzle green;
51
+ MTLTextureSwizzle blue;
52
+ MTLTextureSwizzle alpha;
53
+ } MTLTextureSwizzleChannels API_AVAILABLE(macos(10.15), ios(13.0));
54
+
55
+ API_AVAILABLE(macos(10.15), ios(13.0)) NS_SWIFT_UNAVAILABLE("Use MTLTextureSwizzleChannels.init instead")
56
+ MTL_INLINE MTLTextureSwizzleChannels MTLTextureSwizzleChannelsMake(MTLTextureSwizzle r, MTLTextureSwizzle g, MTLTextureSwizzle b, MTLTextureSwizzle a)
57
+ {
58
+ MTLTextureSwizzleChannels swizzle;
59
+ swizzle.red = r;
60
+ swizzle.green = g;
61
+ swizzle.blue = b;
62
+ swizzle.alpha = a;
63
+ return swizzle;
64
+ }
65
+
66
+ #define MTLTextureSwizzleChannelsDefault (MTLTextureSwizzleChannelsMake(MTLTextureSwizzleRed, MTLTextureSwizzleGreen, MTLTextureSwizzleBlue, MTLTextureSwizzleAlpha))
67
+
68
+
69
+
70
+
71
+ /*!
72
+ @enum MTLTextureUsage
73
+ @abstract MTLTextureUsage declares how the texture will be used over its lifetime (bitwise OR for multiple uses).
74
+ @discussion This information may be used by the driver to make optimization decisions.
75
+ */
76
+ typedef NS_OPTIONS(NSUInteger, MTLTextureUsage)
77
+ {
78
+ MTLTextureUsageUnknown = 0x0000,
79
+ MTLTextureUsageShaderRead = 0x0001,
80
+ MTLTextureUsageShaderWrite = 0x0002,
81
+ MTLTextureUsageRenderTarget = 0x0004,
82
+ MTLTextureUsagePixelFormatView = 0x0010,
83
+ MTLTextureUsageShaderAtomic API_AVAILABLE(macos(14.0), ios(17.0)) = 0x0020,
84
+ } API_AVAILABLE(macos(10.11), ios(9.0));
85
+
86
+ typedef NS_ENUM(NSInteger, MTLTextureCompressionType)
87
+ {
88
+ MTLTextureCompressionTypeLossless = 0,
89
+ MTLTextureCompressionTypeLossy = 1,
90
+ } API_AVAILABLE(macos(12.5), ios(15.0), tvos(16.0));
91
+
92
+ MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
93
+ @interface MTLTextureDescriptor : NSObject <NSCopying>
94
+
95
+ /*!
96
+ @method texture2DDescriptorWithPixelFormat:width:height:mipmapped:
97
+ @abstract Create a TextureDescriptor for a common 2D texture.
98
+ */
99
+ + (MTLTextureDescriptor*)texture2DDescriptorWithPixelFormat:(MTLPixelFormat)pixelFormat width:(NSUInteger)width height:(NSUInteger)height mipmapped:(BOOL)mipmapped;
100
+
101
+ /*!
102
+ @method textureCubeDescriptorWithPixelFormat:size:mipmapped:
103
+ @abstract Create a TextureDescriptor for a common Cube texture.
104
+ */
105
+ + (MTLTextureDescriptor*)textureCubeDescriptorWithPixelFormat:(MTLPixelFormat)pixelFormat size:(NSUInteger)size mipmapped:(BOOL)mipmapped;
106
+
107
+ /*!
108
+ @method textureBufferDescriptorWithPixelFormat:width:resourceOptions:usage:
109
+ @abstract Create a TextureDescriptor for a common texture buffer.
110
+ */
111
+ + (MTLTextureDescriptor*)textureBufferDescriptorWithPixelFormat:(MTLPixelFormat)pixelFormat
112
+ width:(NSUInteger)width
113
+ resourceOptions:(MTLResourceOptions)resourceOptions
114
+ usage:(MTLTextureUsage)usage API_AVAILABLE(macos(10.14), ios(12.0));
115
+
116
+ /*!
117
+ @property type
118
+ @abstract The overall type of the texture to be created. The default value is MTLTextureType2D.
119
+ */
120
+ @property (readwrite, nonatomic) MTLTextureType textureType;
121
+
122
+ /*!
123
+ @property pixelFormat
124
+ @abstract The pixel format to use when allocating this texture. This is also the pixel format that will be used to when the caller writes or reads pixels from this texture. The default value is MTLPixelFormatRGBA8Unorm.
125
+ */
126
+ @property (readwrite, nonatomic) MTLPixelFormat pixelFormat;
127
+
128
+ /*!
129
+ @property width
130
+ @abstract The width of the texture to create. The default value is 1.
131
+ */
132
+ @property (readwrite, nonatomic) NSUInteger width;
133
+
134
+ /*!
135
+ @property height
136
+ @abstract The height of the texture to create. The default value is 1.
137
+ @discussion height If allocating a 1D texture, height must be 1.
138
+ */
139
+ @property (readwrite, nonatomic) NSUInteger height;
140
+
141
+ /*!
142
+ @property depth
143
+ @abstract The depth of the texture to create. The default value is 1.
144
+ @discussion depth When allocating any texture types other than 3D, depth must be 1.
145
+ */
146
+ @property (readwrite, nonatomic) NSUInteger depth;
147
+
148
+ /*!
149
+ @property mipmapLevelCount
150
+ @abstract The number of mipmap levels to allocate. The default value is 1.
151
+ @discussion When creating Buffer and Multisample textures, mipmapLevelCount must be 1.
152
+ */
153
+ @property (readwrite, nonatomic) NSUInteger mipmapLevelCount;
154
+
155
+ /*!
156
+ @property sampleCount
157
+ @abstract The number of samples in the texture to create. The default value is 1.
158
+ @discussion When creating Buffer textures sampleCount must be 1. Implementations may round sample counts up to the next supported value.
159
+ */
160
+ @property (readwrite, nonatomic) NSUInteger sampleCount;
161
+
162
+ /*!
163
+ @property arrayLength
164
+ @abstract The number of array elements to allocate. The default value is 1.
165
+ @discussion When allocating any non-Array texture type, arrayLength has to be 1. Otherwise it must be set to something greater than 1 and less than 2048.
166
+ */
167
+ @property (readwrite, nonatomic) NSUInteger arrayLength;
168
+
169
+ /*!
170
+ @property resourceOptions
171
+ @abstract Options to control memory allocation parameters, etc.
172
+ @discussion Contains a packed set of the storageMode, cpuCacheMode and hazardTrackingMode properties.
173
+ */
174
+ @property (readwrite, nonatomic) MTLResourceOptions resourceOptions;
175
+
176
+ /*!
177
+ @property cpuCacheMode
178
+ @abstract Options to specify CPU cache mode of texture resource.
179
+ */
180
+ @property (readwrite, nonatomic) MTLCPUCacheMode cpuCacheMode API_AVAILABLE(macos(10.11), ios(9.0));
181
+
182
+ /*!
183
+ @property storageMode
184
+ @abstract To specify storage mode of texture resource.
185
+ */
186
+ @property (readwrite, nonatomic) MTLStorageMode storageMode API_AVAILABLE(macos(10.11), ios(9.0));
187
+
188
+
189
+ /*!
190
+ @property hazardTrackingMode
191
+ @abstract Set hazard tracking mode for the texture. The default value is MTLHazardTrackingModeDefault.
192
+ @discussion
193
+ For resources created from the device, MTLHazardTrackingModeDefault is treated as MTLHazardTrackingModeTracked.
194
+ For resources created on a heap, MTLHazardTrackingModeDefault is treated as the hazardTrackingMode of the heap itself.
195
+ In either case, it is possible to opt-out of hazard tracking by setting MTLHazardTrackingModeUntracked.
196
+ It is not possible to opt-in to hazard tracking on a heap that itself is not hazard tracked.
197
+ For optimal performance, perform hazard tracking manually through MTLFence or MTLEvent instead.
198
+ */
199
+ @property (readwrite, nonatomic) MTLHazardTrackingMode hazardTrackingMode API_AVAILABLE(macos(10.15), ios(13.0));
200
+
201
+ /*!
202
+ @property usage
203
+ @abstract Description of texture usage
204
+ */
205
+ @property (readwrite, nonatomic) MTLTextureUsage usage API_AVAILABLE(macos(10.11), ios(9.0));
206
+
207
+ /*!
208
+ @property allowGPUOptimizedContents
209
+ @abstract Allow GPU-optimization for the contents of this texture. The default value is true.
210
+ @discussion Useful for opting-out of GPU-optimization when implicit optimization (e.g. RT writes) is regressing CPU-read-back performance. See the documentation for optimizeContentsForGPUAccess: and optimizeContentsForCPUAccess: APIs.
211
+ */
212
+ @property (readwrite, nonatomic) BOOL allowGPUOptimizedContents API_AVAILABLE(macos(10.14), ios(12.0));
213
+
214
+ /*!
215
+ @property compressionType
216
+ @abstract Controls how the texture contents will be compressed when written to by the GPU. Compression can be used to reduce the bandwidth usage and storage requirements of a texture.
217
+ @discussion The default compression type is lossless, meaning that no loss of precision will occur when the texture content is modified.
218
+ Losslessly compressed textures may benefit from reduced bandwidth usage when regions of correlated color values are written, but do not benefit from reduced storage requirements.
219
+ Enabling lossy compression for textures that can tolerate some precision loss will guarantee both reduced bandwidth usage and reduced storage requirements.
220
+ The amount of precision loss depends on the color values stored; regions with correlated color values can be represented with limited to no precision loss, whereas regions with unrelated color values suffer more precision loss.
221
+ Enabling lossy compression requires both storageMode == MTLStorageModePrivate, allowGPUOptimizedContents == YES, and cannot be combined with either MTLTextureUsagePixelFormatView, MTLTextureUsageShaderWrite, MTLTextureUsageShaderAtomic, MTLTextureType1D(Array) or MTLTextureTypeTextureBuffer.
222
+ Moreover, not all MTLPixelFormat are supported with lossy compression, verify that the MTLDevice's GPU family supports the lossy compression feature for the pixelFormat requested.
223
+ Set allowGPUOptimizedContents to NO to opt out of both lossless and lossy compression; such textures do not benefit from either reduced bandwidth usage or reduced storage requirements, but have predictable CPU readback performance.
224
+ */
225
+ @property (readwrite, nonatomic) MTLTextureCompressionType compressionType API_AVAILABLE(macos(12.5), ios(15.0), tvos(16.0));
226
+
227
+ /*!
228
+ @property swizzle
229
+ @abstract Channel swizzle to use when reading or sampling from the texture, the default value is MTLTextureSwizzleChannelsDefault.
230
+ */
231
+ @property (readwrite, nonatomic) MTLTextureSwizzleChannels swizzle API_AVAILABLE(macos(10.15), ios(13.0));
232
+
233
+
234
+ @end
235
+
236
+
237
+ /*!
238
+ @protocol MTLTexture
239
+ @abstract MTLTexture represents a collection of 1D, 2D, or 3D images.
240
+ @discussion
241
+ Each image in a texture is a 1D, 2D, 2DMultisample, or 3D image. The texture contains one or more images arranged in a mipmap stack. If there are multiple mipmap stacks, each one is referred to as a slice of the texture. 1D, 2D, 2DMultisample, and 3D textures have a single slice. In 1DArray and 2DArray textures, every slice is an array element. A Cube texture always has 6 slices, one for each face. In a CubeArray texture, each set of six slices is one element in the array.
242
+
243
+ Most APIs that operate on individual images in a texture address those images via a tuple of a Slice, and Mipmap Level within that slice.
244
+ */
245
+ API_AVAILABLE(macos(10.11), ios(8.0))
246
+ @protocol MTLTexture <MTLResource>
247
+
248
+ /*!
249
+ @property rootResource
250
+ @abstract The resource this texture was created from. It may be a texture or a buffer. If this texture is not reusing storage of another MTLResource, then nil is returned.
251
+ */
252
+ @property (nullable, readonly) id <MTLResource> rootResource API_DEPRECATED("Use parentTexture or buffer instead", macos(10.11, 10.12), ios(8.0, 10.0));
253
+
254
+ /*!
255
+ @property parentTexture
256
+ @abstract The texture this texture view was created from, or nil if this is not a texture view or it was not created from a texture.
257
+ */
258
+ @property (nullable, readonly) id <MTLTexture> parentTexture API_AVAILABLE(macos(10.11), ios(9.0));
259
+
260
+ /*!
261
+ @property parentRelativeLevel
262
+ @abstract The base level of the texture this texture view was created from, or 0 if this is not a texture view.
263
+ */
264
+ @property (readonly) NSUInteger parentRelativeLevel API_AVAILABLE(macos(10.11), ios(9.0));
265
+
266
+ /*!
267
+ @property parentRelativeSlice
268
+ @abstract The base slice of the texture this texture view was created from, or 0 if this is not a texture view.
269
+ */
270
+ @property (readonly) NSUInteger parentRelativeSlice API_AVAILABLE(macos(10.11), ios(9.0));
271
+
272
+ /*!
273
+ @property buffer
274
+ @abstract The buffer this texture view was created from, or nil if this is not a texture view or it was not created from a buffer.
275
+ */
276
+ @property (nullable, readonly) id <MTLBuffer> buffer API_AVAILABLE(macos(10.12), ios(9.0));
277
+
278
+ /*!
279
+ @property bufferOffset
280
+ @abstract The offset of the buffer this texture view was created from, or 0 if this is not a texture view.
281
+ */
282
+ @property (readonly) NSUInteger bufferOffset API_AVAILABLE(macos(10.12), ios(9.0));
283
+
284
+ /*!
285
+ @property bufferBytesPerRow
286
+ @abstract The bytesPerRow of the buffer this texture view was created from, or 0 if this is not a texture view.
287
+ */
288
+ @property (readonly) NSUInteger bufferBytesPerRow API_AVAILABLE(macos(10.12), ios(9.0));
289
+
290
+
291
+ /*!
292
+ @property iosurface
293
+ @abstract If this texture was created from an IOSurface, this returns a reference to that IOSurface. iosurface is nil if this texture was not created from an IOSurface.
294
+ */
295
+ @property (nullable, readonly) IOSurfaceRef iosurface API_AVAILABLE(macos(10.11), ios(11.0));
296
+
297
+ /*!
298
+ @property iosurfacePlane
299
+ @abstract If this texture was created from an IOSurface, this returns the plane of the IOSurface from which the texture was created. iosurfacePlane is 0 if this texture was not created from an IOSurface.
300
+ */
301
+ @property (readonly) NSUInteger iosurfacePlane API_AVAILABLE(macos(10.11), ios(11.0));
302
+
303
+ /*!
304
+ @property type
305
+ @abstract The type of this texture.
306
+ */
307
+ @property (readonly) MTLTextureType textureType;
308
+
309
+ /*!
310
+ @property pixelFormat
311
+ @abstract The MTLPixelFormat that is used to interpret this texture's contents.
312
+ */
313
+ @property (readonly) MTLPixelFormat pixelFormat;
314
+
315
+ /*!
316
+ @property width
317
+ @abstract The width of the MTLTexture instance in pixels.
318
+ */
319
+ @property (readonly) NSUInteger width;
320
+
321
+ /*!
322
+ @property height
323
+ @abstract The height of the MTLTexture instance in pixels.
324
+ @discussion. height is 1 if the texture is 1D.
325
+ */
326
+ @property (readonly) NSUInteger height;
327
+
328
+ /*!
329
+ @property depth
330
+ @abstract The depth of this MTLTexture instance in pixels.
331
+ @discussion If this MTLTexture is not a 3D texture, the depth is 1
332
+ */
333
+ @property (readonly) NSUInteger depth;
334
+
335
+ /*!
336
+ @property mipmapLevelCount
337
+ @abstract The number of mipmap levels in each slice of this MTLTexture.
338
+ */
339
+ @property (readonly) NSUInteger mipmapLevelCount;
340
+
341
+ /*!
342
+ @property sampleCount
343
+ @abstract The number of samples in each pixel of this MTLTexture.
344
+ @discussion If this texture is any type other than 2DMultisample, samples is 1.
345
+ */
346
+ @property (readonly) NSUInteger sampleCount;
347
+
348
+ /*!
349
+ @property arrayLength
350
+ @abstract The number of array elements in this MTLTexture.
351
+ @discussion For non-Array texture types, arrayLength is 1.
352
+ */
353
+ @property (readonly) NSUInteger arrayLength;
354
+
355
+ /*!
356
+ @property usage
357
+ @abstract Description of texture usage.
358
+ */
359
+ @property (readonly) MTLTextureUsage usage;
360
+
361
+
362
+ /*!
363
+ @property framebufferOnly
364
+ @abstract If YES, this texture can only be used with a MTLAttachmentDescriptor, and cannot be used as a texture argument for MTLRenderCommandEncoder, MTLBlitCommandEncoder, or MTLComputeCommandEncoder. Furthermore, when this property's value is YES, readPixels/writePixels may not be used with this texture.
365
+ @discussion Textures obtained from CAMetalDrawables may have this property set to YES, depending on the value of frameBufferOnly passed to their parent CAMetalLayer. Textures created directly by the application will not have any restrictions.
366
+ */
367
+ @property (readonly, getter = isFramebufferOnly) BOOL framebufferOnly;
368
+
369
+ /*!
370
+ @property firstMipmapInTail
371
+ @abstract For sparse textures this property returns index of first mipmap that is packed in tail.
372
+ Mapping this mipmap level will map all subsequent mipmap levels.
373
+ */
374
+ @property (readonly) NSUInteger firstMipmapInTail API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
375
+
376
+ /*!
377
+ @property tailSizeInBytes
378
+ @abstract Amount of memory in bytes required to map sparse texture tail.
379
+ */
380
+ @property (readonly) NSUInteger tailSizeInBytes API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
381
+
382
+ @property (readonly) BOOL isSparse API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
383
+
384
+ /*!
385
+ @property allowGPUOptimizedContents
386
+ @abstract Allow GPU-optimization for the contents texture. The default value is true.
387
+ @discussion Useful for opting-out of GPU-optimization when implicit optimization (e.g. RT writes) is regressing CPU-read-back performance. See the documentation for optimizeContentsForGPUAccess: and optimizeContentsForCPUAccess: APIs.
388
+ */
389
+ @property (readonly) BOOL allowGPUOptimizedContents API_AVAILABLE(macos(10.14), ios(12.0));
390
+
391
+ /*!
392
+ @property compressionType
393
+ @abstract Returns the compression type of the texture
394
+ @discussion See the compressionType property on MTLTextureDescriptor
395
+ */
396
+ @property (readonly) MTLTextureCompressionType compressionType API_AVAILABLE(macos(12.5), ios(15.0), tvos(16.0));
397
+
398
+
399
+ /*!
400
+ @property gpuResourceID
401
+ @abstract Handle of the GPU resource suitable for storing in an Argument Buffer
402
+ */
403
+ @property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
404
+
405
+ /*!
406
+ @method getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:
407
+ @abstract Copies a block of pixels from a texture slice into the application's memory.
408
+ */
409
+ - (void)getBytes:(void *)pixelBytes bytesPerRow:(NSUInteger)bytesPerRow bytesPerImage:(NSUInteger)bytesPerImage fromRegion:(MTLRegion)region mipmapLevel:(NSUInteger)level slice:(NSUInteger)slice;
410
+
411
+ /*!
412
+ @method replaceRegion:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage:
413
+ @abstract Copy a block of pixel data from the caller's pointer into a texture slice.
414
+ */
415
+ - (void)replaceRegion:(MTLRegion)region mipmapLevel:(NSUInteger)level slice:(NSUInteger)slice withBytes:(const void *)pixelBytes bytesPerRow:(NSUInteger)bytesPerRow bytesPerImage:(NSUInteger)bytesPerImage;
416
+
417
+ /*!
418
+ @method getBytes:bytesPerRow:fromRegion:mipmapLevel:
419
+ @abstract Convenience for getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice: that doesn't require slice related arguments
420
+ */
421
+ - (void)getBytes:(void *)pixelBytes bytesPerRow:(NSUInteger)bytesPerRow fromRegion:(MTLRegion)region mipmapLevel:(NSUInteger)level;
422
+
423
+ /*!
424
+ @method replaceRegion:mipmapLevel:withBytes:bytesPerRow:
425
+ @abstract Convenience for replaceRegion:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage: that doesn't require slice related arguments
426
+ */
427
+ - (void)replaceRegion:(MTLRegion)region mipmapLevel:(NSUInteger)level withBytes:(const void *)pixelBytes bytesPerRow:(NSUInteger)bytesPerRow;
428
+
429
+ /*!
430
+ @method newTextureViewWithPixelFormat:
431
+ @abstract Create a new texture which shares the same storage as the source texture, but with a different (but compatible) pixel format.
432
+ */
433
+ - (nullable id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat;
434
+
435
+ /*!
436
+ @method newTextureViewWithPixelFormat:textureType:levels:slices:
437
+ @abstract Create a new texture which shares the same storage as the source texture, but with a different (but compatible) pixel format, texture type, levels and slices.
438
+ */
439
+ - (nullable id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat textureType:(MTLTextureType)textureType levels:(NSRange)levelRange slices:(NSRange)sliceRange API_AVAILABLE(macos(10.11), ios(9.0));
440
+
441
+
442
+
443
+
444
+
445
+ /*!
446
+ @property swizzle
447
+ @abstract The channel swizzle used when reading or sampling from this texture
448
+ */
449
+ @property (readonly, nonatomic) MTLTextureSwizzleChannels swizzle API_AVAILABLE(macos(10.15), ios(13.0));
450
+
451
+ /*!
452
+ @method newTextureViewWithPixelFormat:textureType:levels:slices:swizzle:
453
+ @abstract Create a new texture which shares the same storage as the source texture, but with a different (but compatible) pixel format, texture type, levels, slices and swizzle.
454
+ */
455
+ - (nullable id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat textureType:(MTLTextureType)textureType levels:(NSRange)levelRange slices:(NSRange)sliceRange swizzle:(MTLTextureSwizzleChannels)swizzle API_AVAILABLE(macos(10.15), ios(13.0));
456
+
457
+
458
+
459
+ @end
460
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,18 @@
1
+ //
2
+ // MTLTextureViewPool.h
3
+ // Metal
4
+ //
5
+ // Copyright © 2024 Apple, Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef MTLTextureViewPool_h
9
+ #define MTLTextureViewPool_h
10
+
11
+ #import <Metal/MTLResourceViewPool.h>
12
+
13
+ NS_ASSUME_NONNULL_BEGIN
14
+
15
+
16
+ NS_ASSUME_NONNULL_END
17
+
18
+ #endif //MTLTextureViewPool_h
@@ -0,0 +1,125 @@
1
+ //
2
+ // MTLTypes.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
+ /*!
12
+ @struct MTLOrigin
13
+ @abstract Identify a pixel in an image. MTLOrigin is ususally used as the upper-left corner of a region of a texture.
14
+ */
15
+ typedef struct {
16
+ NSUInteger x, y, z;
17
+ } MTLOrigin;
18
+
19
+ MTL_INLINE MTLOrigin MTLOriginMake(NSUInteger x, NSUInteger y, NSUInteger z)
20
+ {
21
+ MTLOrigin origin = {x, y, z};
22
+ return origin;
23
+ }
24
+
25
+ /*!
26
+ @typedef MTLSize
27
+ @abstract A set of dimensions to declare the size of an object, such as an image, texture, threadgroup, or grid.
28
+ */
29
+ typedef struct {
30
+ NSUInteger width, height, depth;
31
+ } MTLSize;
32
+
33
+ MTL_INLINE MTLSize MTLSizeMake(NSUInteger width, NSUInteger height, NSUInteger depth)
34
+ {
35
+ MTLSize size = {width, height, depth};
36
+ return size;
37
+ }
38
+
39
+ /*!
40
+ @struct MTLRegion
41
+ @abstract Identify a region in an image or texture.
42
+ */
43
+
44
+ typedef struct
45
+ {
46
+ MTLOrigin origin;
47
+ MTLSize size;
48
+ } MTLRegion;
49
+
50
+ MTL_INLINE MTLRegion MTLRegionMake1D(NSUInteger x, NSUInteger width)
51
+ {
52
+ MTLRegion region;
53
+ region.origin.x = x; region.origin.y = 0; region.origin.z = 0;
54
+ region.size.width = width; region.size.height = 1; region.size.depth = 1;
55
+ return region;
56
+ }
57
+
58
+ MTL_INLINE MTLRegion MTLRegionMake2D(NSUInteger x, NSUInteger y, NSUInteger width, NSUInteger height)
59
+ {
60
+ MTLRegion region;
61
+ region.origin.x = x; region.origin.y = y; region.origin.z = 0;
62
+ region.size.width = width; region.size.height = height; region.size.depth = 1;
63
+ return region;
64
+ }
65
+
66
+ MTL_INLINE MTLRegion MTLRegionMake3D(NSUInteger x, NSUInteger y, NSUInteger z, NSUInteger width, NSUInteger height, NSUInteger depth)
67
+ {
68
+ MTLRegion region;
69
+ region.origin.x = x; region.origin.y = y; region.origin.z = z;
70
+ region.size.width = width; region.size.height = height; region.size.depth = depth;
71
+ return region;
72
+ }
73
+
74
+ /*!
75
+ @struct MTLSamplePosition
76
+ @abstract Identify a sample within a pixel. Origin is top-left with a range [0,1) for both x and y.
77
+ */
78
+
79
+ typedef struct {
80
+ float x, y;
81
+ } MTLSamplePosition;
82
+
83
+ MTL_INLINE MTLSamplePosition MTLSamplePositionMake(float x, float y) API_AVAILABLE(macos(10.13), ios(11.0))
84
+ {
85
+ MTLSamplePosition position = {x, y};
86
+ return position;
87
+ }
88
+
89
+ /*!
90
+ @typedef MTLCoordinate2D
91
+ @abstract A floating point coordinate in an abstract 2D space.
92
+ Refer to location of use for concrete information on the space in which the coordinate exists.
93
+ */
94
+ typedef MTLSamplePosition MTLCoordinate2D;
95
+
96
+ /*!
97
+ @function MTLCoordinate2DMake
98
+ @abstract Convenience function to create a 2D coordinate from 2 values.
99
+ */
100
+ MTL_INLINE MTLCoordinate2D MTLCoordinate2DMake(float x, float y)
101
+ {
102
+ MTLCoordinate2D result = {x, y};
103
+ return result;
104
+ }
105
+
106
+ typedef NS_ENUM(NSInteger, MTLContentionRelief) {
107
+ MTLContentionReliefAutomatic = 0,
108
+ MTLContentionReliefNone = 1,
109
+ } API_AVAILABLE(macos(27.0), ios(27.0));
110
+
111
+
112
+ /*!
113
+ @typedef MTLResourceID
114
+ @abstract Handle of the GPU resource used for binding resources to argument tables, navigating resource view pools and storing resources in an argument buffer
115
+ @discussion
116
+ MTLResourceID represents a specific GPU resource. This handle can be mutated by modifying textureID or samplerID values to get to individual resource views in a resource view pool.
117
+ */
118
+ typedef struct MTLResourceID
119
+ {
120
+ union
121
+ {
122
+ uint64_t _impl;
123
+ uint64_t textureID;
124
+ };
125
+ } MTLResourceID API_AVAILABLE(macos(13.0), ios(16.0));