@bloomengine/engine 0.4.0 → 0.4.2

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 (527) hide show
  1. package/native/tvos/metal-patched/Cargo.toml +178 -0
  2. package/native/tvos/metal-patched/LICENSE-APACHE +201 -0
  3. package/native/tvos/metal-patched/LICENSE-MIT +25 -0
  4. package/native/tvos/metal-patched/src/acceleration_structure.rs +667 -0
  5. package/native/tvos/metal-patched/src/acceleration_structure_pass.rs +108 -0
  6. package/native/tvos/metal-patched/src/argument.rs +366 -0
  7. package/native/tvos/metal-patched/src/blitpass.rs +102 -0
  8. package/native/tvos/metal-patched/src/buffer.rs +71 -0
  9. package/native/tvos/metal-patched/src/capturedescriptor.rs +76 -0
  10. package/native/tvos/metal-patched/src/capturemanager.rs +113 -0
  11. package/native/tvos/metal-patched/src/commandbuffer.rs +192 -0
  12. package/native/tvos/metal-patched/src/commandqueue.rs +44 -0
  13. package/native/tvos/metal-patched/src/computepass.rs +107 -0
  14. package/native/tvos/metal-patched/src/constants.rs +152 -0
  15. package/native/tvos/metal-patched/src/counters.rs +119 -0
  16. package/native/tvos/metal-patched/src/depthstencil.rs +190 -0
  17. package/native/tvos/metal-patched/src/device.rs +2134 -0
  18. package/native/tvos/metal-patched/src/drawable.rs +39 -0
  19. package/native/tvos/metal-patched/src/encoder.rs +2041 -0
  20. package/native/tvos/metal-patched/src/heap.rs +281 -0
  21. package/native/tvos/metal-patched/src/indirect_encoder.rs +344 -0
  22. package/native/tvos/metal-patched/src/lib.rs +657 -0
  23. package/native/tvos/metal-patched/src/library.rs +902 -0
  24. package/native/tvos/metal-patched/src/mps.rs +575 -0
  25. package/native/tvos/metal-patched/src/pipeline/compute.rs +475 -0
  26. package/native/tvos/metal-patched/src/pipeline/mod.rs +71 -0
  27. package/native/tvos/metal-patched/src/pipeline/render.rs +762 -0
  28. package/native/tvos/metal-patched/src/renderpass.rs +443 -0
  29. package/native/tvos/metal-patched/src/resource.rs +182 -0
  30. package/native/tvos/metal-patched/src/sampler.rs +165 -0
  31. package/native/tvos/metal-patched/src/sync.rs +178 -0
  32. package/native/tvos/metal-patched/src/texture.rs +352 -0
  33. package/native/tvos/metal-patched/src/types.rs +90 -0
  34. package/native/tvos/metal-patched/src/vertexdescriptor.rs +250 -0
  35. package/package.json +8 -11
  36. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/build.gradle +0 -51
  37. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/src/main/AndroidManifest.xml +0 -20
  38. package/native/third_party/JoltPhysics/Build/Android/PerformanceTest/src/main/cpp/CMakeLists.txt +0 -20
  39. package/native/third_party/JoltPhysics/Build/Android/UnitTests/build.gradle +0 -51
  40. package/native/third_party/JoltPhysics/Build/Android/UnitTests/src/main/AndroidManifest.xml +0 -20
  41. package/native/third_party/JoltPhysics/Build/Android/UnitTests/src/main/cpp/CMakeLists.txt +0 -20
  42. package/native/third_party/JoltPhysics/Build/Android/build.gradle +0 -17
  43. package/native/third_party/JoltPhysics/Build/Android/gradle/wrapper/gradle-wrapper.jar +0 -0
  44. package/native/third_party/JoltPhysics/Build/Android/gradle/wrapper/gradle-wrapper.properties +0 -5
  45. package/native/third_party/JoltPhysics/Build/Android/gradle.properties +0 -21
  46. package/native/third_party/JoltPhysics/Build/Android/gradlew +0 -185
  47. package/native/third_party/JoltPhysics/Build/Android/gradlew.bat +0 -89
  48. package/native/third_party/JoltPhysics/Build/Android/settings.gradle +0 -10
  49. package/native/third_party/JoltPhysics/Build/CMakeLists.txt +0 -449
  50. package/native/third_party/JoltPhysics/Build/README.md +0 -250
  51. package/native/third_party/JoltPhysics/Build/cmake_linux_clang_gcc.sh +0 -28
  52. package/native/third_party/JoltPhysics/Build/cmake_linux_emscripten.sh +0 -19
  53. package/native/third_party/JoltPhysics/Build/cmake_linux_mingw.sh +0 -19
  54. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl.bat +0 -3
  55. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_32bit.bat +0 -3
  56. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_arm.bat +0 -3
  57. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_arm_32bit.bat +0 -4
  58. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_cross_platform_deterministic.bat +0 -3
  59. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_double.bat +0 -3
  60. package/native/third_party/JoltPhysics/Build/cmake_vs2022_cl_no_object_stream.bat +0 -3
  61. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang.bat +0 -10
  62. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang_cross_platform_deterministic.bat +0 -10
  63. package/native/third_party/JoltPhysics/Build/cmake_vs2022_clang_double.bat +0 -10
  64. package/native/third_party/JoltPhysics/Build/cmake_vs2022_uwp.bat +0 -5
  65. package/native/third_party/JoltPhysics/Build/cmake_vs2022_uwp_arm.bat +0 -5
  66. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl.bat +0 -3
  67. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl_cross_platform_deterministic.bat +0 -3
  68. package/native/third_party/JoltPhysics/Build/cmake_vs2026_cl_double.bat +0 -3
  69. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang.bat +0 -10
  70. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang_cross_platform_deterministic.bat +0 -10
  71. package/native/third_party/JoltPhysics/Build/cmake_vs2026_clang_double.bat +0 -10
  72. package/native/third_party/JoltPhysics/Build/cmake_windows_mingw.sh +0 -19
  73. package/native/third_party/JoltPhysics/Build/cmake_xcode_ios.sh +0 -4
  74. package/native/third_party/JoltPhysics/Build/cmake_xcode_macos.sh +0 -4
  75. package/native/third_party/JoltPhysics/Build/iOS/JoltViewerInfo.plist +0 -34
  76. package/native/third_party/JoltPhysics/Build/iOS/SamplesInfo.plist +0 -34
  77. package/native/third_party/JoltPhysics/Build/iOS/UnitTestsInfo.plist +0 -34
  78. package/native/third_party/JoltPhysics/Build/macOS/icon.icns +0 -0
  79. package/native/third_party/JoltPhysics/Build/macos_install_vulkan_sdk.sh +0 -13
  80. package/native/third_party/JoltPhysics/Build/ubuntu24_install_vulkan_sdk.sh +0 -4
  81. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeBuilder.cpp +0 -242
  82. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeBuilder.h +0 -121
  83. package/native/third_party/JoltPhysics/Jolt/AABBTree/AABBTreeToBuffer.h +0 -296
  84. package/native/third_party/JoltPhysics/Jolt/AABBTree/NodeCodec/NodeCodecQuadTreeHalfFloat.h +0 -323
  85. package/native/third_party/JoltPhysics/Jolt/AABBTree/TriangleCodec/TriangleCodecIndexed8BitPackSOA4Flags.h +0 -555
  86. package/native/third_party/JoltPhysics/Jolt/ConfigurationString.h +0 -112
  87. package/native/third_party/JoltPhysics/Jolt/Core/ARMNeon.h +0 -94
  88. package/native/third_party/JoltPhysics/Jolt/Core/Array.h +0 -713
  89. package/native/third_party/JoltPhysics/Jolt/Core/Atomics.h +0 -44
  90. package/native/third_party/JoltPhysics/Jolt/Core/BinaryHeap.h +0 -96
  91. package/native/third_party/JoltPhysics/Jolt/Core/ByteBuffer.h +0 -74
  92. package/native/third_party/JoltPhysics/Jolt/Core/Color.cpp +0 -38
  93. package/native/third_party/JoltPhysics/Jolt/Core/Color.h +0 -98
  94. package/native/third_party/JoltPhysics/Jolt/Core/Core.h +0 -652
  95. package/native/third_party/JoltPhysics/Jolt/Core/FPControlWord.h +0 -143
  96. package/native/third_party/JoltPhysics/Jolt/Core/FPException.h +0 -96
  97. package/native/third_party/JoltPhysics/Jolt/Core/FPFlushDenormals.h +0 -43
  98. package/native/third_party/JoltPhysics/Jolt/Core/Factory.cpp +0 -92
  99. package/native/third_party/JoltPhysics/Jolt/Core/Factory.h +0 -54
  100. package/native/third_party/JoltPhysics/Jolt/Core/FixedSizeFreeList.h +0 -122
  101. package/native/third_party/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl +0 -215
  102. package/native/third_party/JoltPhysics/Jolt/Core/HashCombine.h +0 -234
  103. package/native/third_party/JoltPhysics/Jolt/Core/HashTable.h +0 -876
  104. package/native/third_party/JoltPhysics/Jolt/Core/InsertionSort.h +0 -58
  105. package/native/third_party/JoltPhysics/Jolt/Core/IssueReporting.cpp +0 -27
  106. package/native/third_party/JoltPhysics/Jolt/Core/IssueReporting.h +0 -38
  107. package/native/third_party/JoltPhysics/Jolt/Core/JobSystem.h +0 -311
  108. package/native/third_party/JoltPhysics/Jolt/Core/JobSystem.inl +0 -56
  109. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemSingleThreaded.cpp +0 -65
  110. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemSingleThreaded.h +0 -62
  111. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp +0 -364
  112. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemThreadPool.h +0 -101
  113. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemWithBarrier.cpp +0 -230
  114. package/native/third_party/JoltPhysics/Jolt/Core/JobSystemWithBarrier.h +0 -85
  115. package/native/third_party/JoltPhysics/Jolt/Core/LinearCurve.cpp +0 -51
  116. package/native/third_party/JoltPhysics/Jolt/Core/LinearCurve.h +0 -67
  117. package/native/third_party/JoltPhysics/Jolt/Core/LockFreeHashMap.h +0 -182
  118. package/native/third_party/JoltPhysics/Jolt/Core/LockFreeHashMap.inl +0 -351
  119. package/native/third_party/JoltPhysics/Jolt/Core/Memory.cpp +0 -85
  120. package/native/third_party/JoltPhysics/Jolt/Core/Memory.h +0 -85
  121. package/native/third_party/JoltPhysics/Jolt/Core/Mutex.h +0 -223
  122. package/native/third_party/JoltPhysics/Jolt/Core/MutexArray.h +0 -98
  123. package/native/third_party/JoltPhysics/Jolt/Core/NonCopyable.h +0 -18
  124. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.cpp +0 -677
  125. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.h +0 -301
  126. package/native/third_party/JoltPhysics/Jolt/Core/Profiler.inl +0 -90
  127. package/native/third_party/JoltPhysics/Jolt/Core/QuickSort.h +0 -137
  128. package/native/third_party/JoltPhysics/Jolt/Core/RTTI.cpp +0 -149
  129. package/native/third_party/JoltPhysics/Jolt/Core/RTTI.h +0 -436
  130. package/native/third_party/JoltPhysics/Jolt/Core/Reference.h +0 -244
  131. package/native/third_party/JoltPhysics/Jolt/Core/Result.h +0 -174
  132. package/native/third_party/JoltPhysics/Jolt/Core/STLAlignedAllocator.h +0 -72
  133. package/native/third_party/JoltPhysics/Jolt/Core/STLAllocator.h +0 -127
  134. package/native/third_party/JoltPhysics/Jolt/Core/STLLocalAllocator.h +0 -170
  135. package/native/third_party/JoltPhysics/Jolt/Core/STLTempAllocator.h +0 -80
  136. package/native/third_party/JoltPhysics/Jolt/Core/ScopeExit.h +0 -49
  137. package/native/third_party/JoltPhysics/Jolt/Core/Semaphore.cpp +0 -135
  138. package/native/third_party/JoltPhysics/Jolt/Core/Semaphore.h +0 -68
  139. package/native/third_party/JoltPhysics/Jolt/Core/StaticArray.h +0 -329
  140. package/native/third_party/JoltPhysics/Jolt/Core/StreamIn.h +0 -120
  141. package/native/third_party/JoltPhysics/Jolt/Core/StreamOut.h +0 -97
  142. package/native/third_party/JoltPhysics/Jolt/Core/StreamUtils.h +0 -168
  143. package/native/third_party/JoltPhysics/Jolt/Core/StreamWrapper.h +0 -53
  144. package/native/third_party/JoltPhysics/Jolt/Core/StridedPtr.h +0 -63
  145. package/native/third_party/JoltPhysics/Jolt/Core/StringTools.cpp +0 -101
  146. package/native/third_party/JoltPhysics/Jolt/Core/StringTools.h +0 -38
  147. package/native/third_party/JoltPhysics/Jolt/Core/TempAllocator.h +0 -209
  148. package/native/third_party/JoltPhysics/Jolt/Core/TickCounter.cpp +0 -37
  149. package/native/third_party/JoltPhysics/Jolt/Core/TickCounter.h +0 -58
  150. package/native/third_party/JoltPhysics/Jolt/Core/UnorderedMap.h +0 -80
  151. package/native/third_party/JoltPhysics/Jolt/Core/UnorderedSet.h +0 -32
  152. package/native/third_party/JoltPhysics/Jolt/Geometry/AABox.h +0 -313
  153. package/native/third_party/JoltPhysics/Jolt/Geometry/AABox4.h +0 -224
  154. package/native/third_party/JoltPhysics/Jolt/Geometry/ClipPoly.h +0 -200
  155. package/native/third_party/JoltPhysics/Jolt/Geometry/ClosestPoint.h +0 -498
  156. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder.cpp +0 -1467
  157. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder.h +0 -276
  158. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder2D.cpp +0 -335
  159. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexHullBuilder2D.h +0 -105
  160. package/native/third_party/JoltPhysics/Jolt/Geometry/ConvexSupport.h +0 -188
  161. package/native/third_party/JoltPhysics/Jolt/Geometry/EPAConvexHullBuilder.h +0 -845
  162. package/native/third_party/JoltPhysics/Jolt/Geometry/EPAPenetrationDepth.h +0 -557
  163. package/native/third_party/JoltPhysics/Jolt/Geometry/Ellipse.h +0 -77
  164. package/native/third_party/JoltPhysics/Jolt/Geometry/GJKClosestPoint.h +0 -945
  165. package/native/third_party/JoltPhysics/Jolt/Geometry/IndexedTriangle.h +0 -130
  166. package/native/third_party/JoltPhysics/Jolt/Geometry/Indexify.cpp +0 -222
  167. package/native/third_party/JoltPhysics/Jolt/Geometry/Indexify.h +0 -19
  168. package/native/third_party/JoltPhysics/Jolt/Geometry/MortonCode.h +0 -40
  169. package/native/third_party/JoltPhysics/Jolt/Geometry/OrientedBox.cpp +0 -178
  170. package/native/third_party/JoltPhysics/Jolt/Geometry/OrientedBox.h +0 -39
  171. package/native/third_party/JoltPhysics/Jolt/Geometry/Plane.h +0 -104
  172. package/native/third_party/JoltPhysics/Jolt/Geometry/RayAABox.h +0 -241
  173. package/native/third_party/JoltPhysics/Jolt/Geometry/RayCapsule.h +0 -37
  174. package/native/third_party/JoltPhysics/Jolt/Geometry/RayCylinder.h +0 -101
  175. package/native/third_party/JoltPhysics/Jolt/Geometry/RaySphere.h +0 -96
  176. package/native/third_party/JoltPhysics/Jolt/Geometry/RayTriangle.h +0 -158
  177. package/native/third_party/JoltPhysics/Jolt/Geometry/Sphere.h +0 -72
  178. package/native/third_party/JoltPhysics/Jolt/Geometry/Triangle.h +0 -34
  179. package/native/third_party/JoltPhysics/Jolt/Jolt.cmake +0 -703
  180. package/native/third_party/JoltPhysics/Jolt/Jolt.h +0 -16
  181. package/native/third_party/JoltPhysics/Jolt/Jolt.natvis +0 -116
  182. package/native/third_party/JoltPhysics/Jolt/Math/BVec16.h +0 -99
  183. package/native/third_party/JoltPhysics/Jolt/Math/BVec16.inl +0 -177
  184. package/native/third_party/JoltPhysics/Jolt/Math/DMat44.h +0 -158
  185. package/native/third_party/JoltPhysics/Jolt/Math/DMat44.inl +0 -310
  186. package/native/third_party/JoltPhysics/Jolt/Math/DVec3.h +0 -291
  187. package/native/third_party/JoltPhysics/Jolt/Math/DVec3.inl +0 -941
  188. package/native/third_party/JoltPhysics/Jolt/Math/Double3.h +0 -48
  189. package/native/third_party/JoltPhysics/Jolt/Math/DynMatrix.h +0 -31
  190. package/native/third_party/JoltPhysics/Jolt/Math/EigenValueSymmetric.h +0 -177
  191. package/native/third_party/JoltPhysics/Jolt/Math/FindRoot.h +0 -42
  192. package/native/third_party/JoltPhysics/Jolt/Math/Float2.h +0 -36
  193. package/native/third_party/JoltPhysics/Jolt/Math/Float3.h +0 -50
  194. package/native/third_party/JoltPhysics/Jolt/Math/Float4.h +0 -44
  195. package/native/third_party/JoltPhysics/Jolt/Math/GaussianElimination.h +0 -102
  196. package/native/third_party/JoltPhysics/Jolt/Math/HalfFloat.h +0 -208
  197. package/native/third_party/JoltPhysics/Jolt/Math/Mat44.h +0 -243
  198. package/native/third_party/JoltPhysics/Jolt/Math/Mat44.inl +0 -952
  199. package/native/third_party/JoltPhysics/Jolt/Math/Math.h +0 -208
  200. package/native/third_party/JoltPhysics/Jolt/Math/MathTypes.h +0 -32
  201. package/native/third_party/JoltPhysics/Jolt/Math/Matrix.h +0 -259
  202. package/native/third_party/JoltPhysics/Jolt/Math/Quat.h +0 -268
  203. package/native/third_party/JoltPhysics/Jolt/Math/Quat.inl +0 -406
  204. package/native/third_party/JoltPhysics/Jolt/Math/Real.h +0 -44
  205. package/native/third_party/JoltPhysics/Jolt/Math/Swizzle.h +0 -19
  206. package/native/third_party/JoltPhysics/Jolt/Math/Trigonometry.h +0 -79
  207. package/native/third_party/JoltPhysics/Jolt/Math/UVec4.h +0 -232
  208. package/native/third_party/JoltPhysics/Jolt/Math/UVec4.inl +0 -636
  209. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.cpp +0 -71
  210. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.h +0 -308
  211. package/native/third_party/JoltPhysics/Jolt/Math/Vec3.inl +0 -942
  212. package/native/third_party/JoltPhysics/Jolt/Math/Vec4.h +0 -320
  213. package/native/third_party/JoltPhysics/Jolt/Math/Vec4.inl +0 -1152
  214. package/native/third_party/JoltPhysics/Jolt/Math/Vector.h +0 -211
  215. package/native/third_party/JoltPhysics/Jolt/ObjectStream/GetPrimitiveTypeOfType.h +0 -54
  216. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStream.cpp +0 -38
  217. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStream.h +0 -337
  218. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryIn.cpp +0 -252
  219. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryIn.h +0 -57
  220. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryOut.cpp +0 -165
  221. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamBinaryOut.h +0 -57
  222. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamIn.cpp +0 -635
  223. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamIn.h +0 -148
  224. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamOut.cpp +0 -166
  225. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamOut.h +0 -101
  226. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextIn.cpp +0 -418
  227. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextIn.h +0 -55
  228. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextOut.cpp +0 -255
  229. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTextOut.h +0 -62
  230. package/native/third_party/JoltPhysics/Jolt/ObjectStream/ObjectStreamTypes.h +0 -26
  231. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttribute.h +0 -111
  232. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttributeEnum.h +0 -67
  233. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableAttributeTyped.h +0 -60
  234. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableObject.cpp +0 -15
  235. package/native/third_party/JoltPhysics/Jolt/ObjectStream/SerializableObject.h +0 -170
  236. package/native/third_party/JoltPhysics/Jolt/ObjectStream/TypeDeclarations.cpp +0 -70
  237. package/native/third_party/JoltPhysics/Jolt/ObjectStream/TypeDeclarations.h +0 -45
  238. package/native/third_party/JoltPhysics/Jolt/Physics/Body/AllowedDOFs.h +0 -68
  239. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.cpp +0 -426
  240. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.h +0 -452
  241. package/native/third_party/JoltPhysics/Jolt/Physics/Body/Body.inl +0 -197
  242. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyAccess.h +0 -68
  243. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyActivationListener.h +0 -28
  244. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyCreationSettings.cpp +0 -234
  245. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyCreationSettings.h +0 -124
  246. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyFilter.h +0 -130
  247. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyID.h +0 -101
  248. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyInterface.cpp +0 -1099
  249. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyInterface.h +0 -324
  250. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLock.h +0 -111
  251. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLockInterface.h +0 -134
  252. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyLockMulti.h +0 -120
  253. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyManager.cpp +0 -1220
  254. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyManager.h +0 -403
  255. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyPair.h +0 -36
  256. package/native/third_party/JoltPhysics/Jolt/Physics/Body/BodyType.h +0 -19
  257. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MassProperties.cpp +0 -185
  258. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MassProperties.h +0 -58
  259. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.cpp +0 -92
  260. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.h +0 -308
  261. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionProperties.inl +0 -178
  262. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionQuality.h +0 -31
  263. package/native/third_party/JoltPhysics/Jolt/Physics/Body/MotionType.h +0 -17
  264. package/native/third_party/JoltPhysics/Jolt/Physics/Character/Character.cpp +0 -354
  265. package/native/third_party/JoltPhysics/Jolt/Physics/Character/Character.h +0 -159
  266. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterBase.cpp +0 -59
  267. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterBase.h +0 -157
  268. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterID.h +0 -98
  269. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterVirtual.cpp +0 -1933
  270. package/native/third_party/JoltPhysics/Jolt/Physics/Character/CharacterVirtual.h +0 -752
  271. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/AABoxCast.h +0 -20
  272. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ActiveEdgeMode.h +0 -17
  273. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ActiveEdges.h +0 -114
  274. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BackFaceMode.h +0 -16
  275. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhase.cpp +0 -16
  276. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhase.h +0 -109
  277. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.cpp +0 -313
  278. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h +0 -38
  279. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h +0 -148
  280. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceMask.h +0 -92
  281. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseLayerInterfaceTable.h +0 -64
  282. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.cpp +0 -629
  283. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h +0 -108
  284. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h +0 -56
  285. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterMask.h +0 -35
  286. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/ObjectVsBroadPhaseLayerFilterTable.h +0 -66
  287. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/QuadTree.cpp +0 -1768
  288. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/BroadPhase/QuadTree.h +0 -389
  289. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastConvexVsTriangles.cpp +0 -107
  290. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastConvexVsTriangles.h +0 -46
  291. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastResult.h +0 -37
  292. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastSphereVsTriangles.cpp +0 -223
  293. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CastSphereVsTriangles.h +0 -49
  294. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollectFacesMode.h +0 -16
  295. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideConvexVsTriangles.cpp +0 -155
  296. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideConvexVsTriangles.h +0 -56
  297. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollidePointResult.h +0 -25
  298. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideShape.h +0 -106
  299. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideShapeVsShapePerLeaf.h +0 -94
  300. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSoftBodyVertexIterator.h +0 -110
  301. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSoftBodyVerticesVsTriangles.h +0 -102
  302. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSphereVsTriangles.cpp +0 -121
  303. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollideSphereVsTriangles.h +0 -50
  304. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionCollector.h +0 -109
  305. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionCollectorImpl.h +0 -219
  306. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionDispatch.cpp +0 -107
  307. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionDispatch.h +0 -97
  308. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionGroup.cpp +0 -35
  309. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/CollisionGroup.h +0 -97
  310. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ContactListener.h +0 -143
  311. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/EstimateCollisionResponse.cpp +0 -213
  312. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/EstimateCollisionResponse.h +0 -48
  313. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilter.cpp +0 -32
  314. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilter.h +0 -46
  315. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilterTable.cpp +0 -38
  316. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/GroupFilterTable.h +0 -130
  317. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/InternalEdgeRemovingCollector.h +0 -279
  318. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ManifoldBetweenTwoFaces.cpp +0 -271
  319. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ManifoldBetweenTwoFaces.h +0 -44
  320. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.cpp +0 -448
  321. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.h +0 -77
  322. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseStats.cpp +0 -62
  323. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseStats.h +0 -110
  324. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayer.h +0 -111
  325. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayerPairFilterMask.h +0 -52
  326. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ObjectLayerPairFilterTable.h +0 -78
  327. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterial.cpp +0 -35
  328. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterial.h +0 -57
  329. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterialSimple.cpp +0 -38
  330. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/PhysicsMaterialSimple.h +0 -37
  331. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/RayCast.h +0 -87
  332. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/BoxShape.cpp +0 -318
  333. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/BoxShape.h +0 -115
  334. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CapsuleShape.cpp +0 -438
  335. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CapsuleShape.h +0 -129
  336. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShape.cpp +0 -433
  337. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShape.h +0 -354
  338. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CompoundShapeVisitors.h +0 -461
  339. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexHullShape.cpp +0 -1311
  340. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexHullShape.h +0 -202
  341. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexShape.cpp +0 -566
  342. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ConvexShape.h +0 -150
  343. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CylinderShape.cpp +0 -418
  344. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/CylinderShape.h +0 -126
  345. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/DecoratedShape.cpp +0 -87
  346. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/DecoratedShape.h +0 -80
  347. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/EmptyShape.cpp +0 -64
  348. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/EmptyShape.h +0 -75
  349. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/GetTrianglesContext.h +0 -248
  350. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/HeightFieldShape.cpp +0 -2754
  351. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/HeightFieldShape.h +0 -380
  352. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MeshShape.cpp +0 -1305
  353. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MeshShape.h +0 -228
  354. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MutableCompoundShape.cpp +0 -596
  355. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/MutableCompoundShape.h +0 -176
  356. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.cpp +0 -217
  357. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/OffsetCenterOfMassShape.h +0 -140
  358. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PlaneShape.cpp +0 -541
  359. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PlaneShape.h +0 -147
  360. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h +0 -319
  361. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/RotatedTranslatedShape.cpp +0 -333
  362. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h +0 -161
  363. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaleHelpers.h +0 -83
  364. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaledShape.cpp +0 -238
  365. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/ScaledShape.h +0 -145
  366. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/Shape.cpp +0 -325
  367. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/Shape.h +0 -466
  368. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SphereShape.cpp +0 -347
  369. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SphereShape.h +0 -125
  370. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/StaticCompoundShape.cpp +0 -674
  371. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/StaticCompoundShape.h +0 -139
  372. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SubShapeID.h +0 -138
  373. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/SubShapeIDPair.h +0 -65
  374. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.cpp +0 -453
  375. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.gliffy +0 -1
  376. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCapsuleShape.h +0 -135
  377. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCylinderShape.cpp +0 -691
  378. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TaperedCylinderShape.h +0 -132
  379. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TriangleShape.cpp +0 -430
  380. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/Shape/TriangleShape.h +0 -143
  381. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ShapeCast.h +0 -173
  382. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/ShapeFilter.h +0 -73
  383. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SimShapeFilter.h +0 -40
  384. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SimShapeFilterWrapper.h +0 -58
  385. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/SortReverseAndStore.h +0 -48
  386. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/TransformedShape.cpp +0 -180
  387. package/native/third_party/JoltPhysics/Jolt/Physics/Collision/TransformedShape.h +0 -194
  388. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/CalculateSolverSteps.h +0 -70
  389. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConeConstraint.cpp +0 -246
  390. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConeConstraint.h +0 -133
  391. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/Constraint.cpp +0 -73
  392. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/Constraint.h +0 -243
  393. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintManager.cpp +0 -289
  394. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintManager.h +0 -100
  395. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/AngleConstraintPart.h +0 -257
  396. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/AxisConstraintPart.h +0 -682
  397. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h +0 -276
  398. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/GearConstraintPart.h +0 -195
  399. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h +0 -222
  400. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h +0 -246
  401. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h +0 -239
  402. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h +0 -196
  403. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h +0 -283
  404. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h +0 -246
  405. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/SpringPart.h +0 -169
  406. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h +0 -597
  407. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ContactConstraintManager.cpp +0 -1804
  408. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/ContactConstraintManager.h +0 -524
  409. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/DistanceConstraint.cpp +0 -266
  410. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/DistanceConstraint.h +0 -120
  411. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/FixedConstraint.cpp +0 -215
  412. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/FixedConstraint.h +0 -96
  413. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/GearConstraint.cpp +0 -188
  414. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/GearConstraint.h +0 -116
  415. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/HingeConstraint.cpp +0 -443
  416. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/HingeConstraint.h +0 -205
  417. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/MotorSettings.cpp +0 -43
  418. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/MotorSettings.h +0 -66
  419. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraint.cpp +0 -458
  420. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraint.h +0 -191
  421. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPath.cpp +0 -85
  422. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPath.h +0 -76
  423. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPathHermite.cpp +0 -308
  424. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PathConstraintPathHermite.h +0 -54
  425. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PointConstraint.cpp +0 -157
  426. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PointConstraint.h +0 -94
  427. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PulleyConstraint.cpp +0 -253
  428. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/PulleyConstraint.h +0 -137
  429. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/RackAndPinionConstraint.cpp +0 -189
  430. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/RackAndPinionConstraint.h +0 -118
  431. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SixDOFConstraint.cpp +0 -900
  432. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SixDOFConstraint.h +0 -289
  433. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SliderConstraint.cpp +0 -501
  434. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SliderConstraint.h +0 -198
  435. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SpringSettings.cpp +0 -35
  436. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SpringSettings.h +0 -70
  437. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SwingTwistConstraint.cpp +0 -524
  438. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/SwingTwistConstraint.h +0 -197
  439. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/TwoBodyConstraint.cpp +0 -56
  440. package/native/third_party/JoltPhysics/Jolt/Physics/Constraints/TwoBodyConstraint.h +0 -65
  441. package/native/third_party/JoltPhysics/Jolt/Physics/DeterminismLog.cpp +0 -17
  442. package/native/third_party/JoltPhysics/Jolt/Physics/DeterminismLog.h +0 -159
  443. package/native/third_party/JoltPhysics/Jolt/Physics/EActivation.h +0 -16
  444. package/native/third_party/JoltPhysics/Jolt/Physics/EPhysicsUpdateError.h +0 -37
  445. package/native/third_party/JoltPhysics/Jolt/Physics/IslandBuilder.cpp +0 -492
  446. package/native/third_party/JoltPhysics/Jolt/Physics/IslandBuilder.h +0 -144
  447. package/native/third_party/JoltPhysics/Jolt/Physics/LargeIslandSplitter.cpp +0 -582
  448. package/native/third_party/JoltPhysics/Jolt/Physics/LargeIslandSplitter.h +0 -187
  449. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsLock.h +0 -169
  450. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsScene.cpp +0 -261
  451. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsScene.h +0 -104
  452. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSettings.h +0 -125
  453. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsStepListener.h +0 -37
  454. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSystem.cpp +0 -2915
  455. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsSystem.h +0 -391
  456. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsUpdateContext.cpp +0 -25
  457. package/native/third_party/JoltPhysics/Jolt/Physics/PhysicsUpdateContext.h +0 -176
  458. package/native/third_party/JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.cpp +0 -744
  459. package/native/third_party/JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.h +0 -245
  460. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyContactListener.h +0 -55
  461. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyCreationSettings.cpp +0 -128
  462. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyCreationSettings.h +0 -75
  463. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyManifold.h +0 -74
  464. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyMotionProperties.cpp +0 -1501
  465. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyMotionProperties.h +0 -333
  466. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyShape.cpp +0 -354
  467. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyShape.h +0 -73
  468. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodySharedSettings.cpp +0 -1487
  469. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodySharedSettings.h +0 -390
  470. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyUpdateContext.h +0 -63
  471. package/native/third_party/JoltPhysics/Jolt/Physics/SoftBody/SoftBodyVertex.h +0 -36
  472. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorder.h +0 -136
  473. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorderImpl.cpp +0 -90
  474. package/native/third_party/JoltPhysics/Jolt/Physics/StateRecorderImpl.h +0 -50
  475. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/MotorcycleController.cpp +0 -306
  476. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/MotorcycleController.h +0 -119
  477. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/TrackedVehicleController.cpp +0 -547
  478. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/TrackedVehicleController.h +0 -169
  479. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleAntiRollBar.cpp +0 -33
  480. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleAntiRollBar.h +0 -33
  481. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleCollisionTester.cpp +0 -376
  482. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleCollisionTester.h +0 -146
  483. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleConstraint.cpp +0 -703
  484. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleConstraint.h +0 -252
  485. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleController.cpp +0 -17
  486. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleController.h +0 -87
  487. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleDifferential.cpp +0 -81
  488. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleDifferential.h +0 -39
  489. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleEngine.cpp +0 -122
  490. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleEngine.h +0 -93
  491. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTrack.cpp +0 -52
  492. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTrack.h +0 -56
  493. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTransmission.cpp +0 -159
  494. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/VehicleTransmission.h +0 -87
  495. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/Wheel.cpp +0 -93
  496. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/Wheel.h +0 -148
  497. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/WheeledVehicleController.cpp +0 -866
  498. package/native/third_party/JoltPhysics/Jolt/Physics/Vehicle/WheeledVehicleController.h +0 -205
  499. package/native/third_party/JoltPhysics/Jolt/RegisterTypes.cpp +0 -204
  500. package/native/third_party/JoltPhysics/Jolt/RegisterTypes.h +0 -29
  501. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRenderer.cpp +0 -1107
  502. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRenderer.h +0 -383
  503. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererPlayback.cpp +0 -168
  504. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererPlayback.h +0 -48
  505. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererRecorder.cpp +0 -158
  506. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererRecorder.h +0 -130
  507. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererSimple.cpp +0 -80
  508. package/native/third_party/JoltPhysics/Jolt/Renderer/DebugRendererSimple.h +0 -88
  509. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletalAnimation.cpp +0 -165
  510. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletalAnimation.h +0 -91
  511. package/native/third_party/JoltPhysics/Jolt/Skeleton/Skeleton.cpp +0 -82
  512. package/native/third_party/JoltPhysics/Jolt/Skeleton/Skeleton.h +0 -72
  513. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonMapper.cpp +0 -237
  514. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonMapper.h +0 -145
  515. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonPose.cpp +0 -87
  516. package/native/third_party/JoltPhysics/Jolt/Skeleton/SkeletonPose.h +0 -82
  517. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitter.cpp +0 -73
  518. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitter.h +0 -84
  519. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterBinning.cpp +0 -139
  520. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterBinning.h +0 -52
  521. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterMean.cpp +0 -43
  522. package/native/third_party/JoltPhysics/Jolt/TriangleSplitter/TriangleSplitterMean.h +0 -28
  523. package/native/third_party/JoltPhysics/LICENSE +0 -7
  524. package/native/third_party/JoltPhysics/README.md +0 -173
  525. package/native/third_party/bloom_jolt/CMakeLists.txt +0 -87
  526. package/native/third_party/bloom_jolt/include/bloom_jolt.h +0 -519
  527. package/native/third_party/bloom_jolt/src/bloom_jolt.cpp +0 -1780
@@ -0,0 +1,2041 @@
1
+ // Copyright 2017 GFX developers
2
+ //
3
+ // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4
+ // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5
+ // http://opensource.org/licenses/MIT>, at your option. This file may not be
6
+ // copied, modified, or distributed except according to those terms.
7
+
8
+ use super::*;
9
+
10
+ use std::ops::Range;
11
+
12
+ /// See <https://developer.apple.com/documentation/metal/mtlcounterdontsample>
13
+ pub const COUNTER_DONT_SAMPLE: NSUInteger = NSUInteger::MAX; // #define MTLCounterDontSample ((NSUInteger)-1)
14
+
15
+ /// See <https://developer.apple.com/documentation/metal/mtlprimitivetype>
16
+ #[repr(u64)]
17
+ #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
18
+ pub enum MTLPrimitiveType {
19
+ Point = 0,
20
+ Line = 1,
21
+ LineStrip = 2,
22
+ Triangle = 3,
23
+ TriangleStrip = 4,
24
+ }
25
+
26
+ /// See <https://developer.apple.com/documentation/metal/mtlindextype>
27
+ #[repr(u64)]
28
+ #[allow(non_camel_case_types)]
29
+ #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
30
+ pub enum MTLIndexType {
31
+ UInt16 = 0,
32
+ UInt32 = 1,
33
+ }
34
+
35
+ /// See <https://developer.apple.com/documentation/metal/mtlvisibilityresultmode>
36
+ #[repr(u64)]
37
+ #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
38
+ pub enum MTLVisibilityResultMode {
39
+ Disabled = 0,
40
+ Boolean = 1,
41
+ Counting = 2,
42
+ }
43
+
44
+ /// See <https://developer.apple.com/documentation/metal/mtlcullmode>
45
+ #[repr(u64)]
46
+ #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
47
+ pub enum MTLCullMode {
48
+ None = 0,
49
+ Front = 1,
50
+ Back = 2,
51
+ }
52
+
53
+ /// See <https://developer.apple.com/documentation/metal/mtlwinding>
54
+ #[repr(u64)]
55
+ #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
56
+ pub enum MTLWinding {
57
+ Clockwise = 0,
58
+ CounterClockwise = 1,
59
+ }
60
+
61
+ /// See <https://developer.apple.com/documentation/metal/mtldepthclipmode>
62
+ #[repr(u64)]
63
+ #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
64
+ pub enum MTLDepthClipMode {
65
+ Clip = 0,
66
+ Clamp = 1,
67
+ }
68
+
69
+ /// See <https://developer.apple.com/documentation/metal/mtltrianglefillmode>
70
+ #[repr(u64)]
71
+ #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
72
+ pub enum MTLTriangleFillMode {
73
+ Fill = 0,
74
+ Lines = 1,
75
+ }
76
+
77
+ bitflags::bitflags! {
78
+ /// https://developer.apple.com/documentation/metal/mtlblitoption
79
+ #[allow(non_upper_case_globals)]
80
+ #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
81
+ pub struct MTLBlitOption: NSUInteger {
82
+ /// https://developer.apple.com/documentation/metal/mtlblitoption/mtlblitoptionnone
83
+ const None = 0;
84
+ /// https://developer.apple.com/documentation/metal/mtlblitoption/mtlblitoptiondepthfromdepthstencil
85
+ const DepthFromDepthStencil = 1 << 0;
86
+ /// https://developer.apple.com/documentation/metal/mtlblitoption/mtlblitoptionstencilfromdepthstencil
87
+ const StencilFromDepthStencil = 1 << 1;
88
+ /// https://developer.apple.com/documentation/metal/mtlblitoption/mtlblitoptionrowlinearpvrtc
89
+ const RowLinearPVRTC = 1 << 2;
90
+ }
91
+ }
92
+
93
+ /// See <https://developer.apple.com/documentation/metal/mtlscissorrect>
94
+ #[repr(C)]
95
+ #[derive(Copy, Clone, Debug)]
96
+ pub struct MTLScissorRect {
97
+ pub x: NSUInteger,
98
+ pub y: NSUInteger,
99
+ pub width: NSUInteger,
100
+ pub height: NSUInteger,
101
+ }
102
+
103
+ /// See <https://developer.apple.com/documentation/metal/mtlviewport>
104
+ #[repr(C)]
105
+ #[derive(Copy, Clone, Debug)]
106
+ pub struct MTLViewport {
107
+ pub originX: f64,
108
+ pub originY: f64,
109
+ pub width: f64,
110
+ pub height: f64,
111
+ pub znear: f64,
112
+ pub zfar: f64,
113
+ }
114
+
115
+ /// See <https://developer.apple.com/documentation/metal/mtldrawprimitivesindirectarguments>
116
+ #[repr(C)]
117
+ #[derive(Copy, Clone, Debug)]
118
+ pub struct MTLDrawPrimitivesIndirectArguments {
119
+ pub vertexCount: u32,
120
+ pub instanceCount: u32,
121
+ pub vertexStart: u32,
122
+ pub baseInstance: u32,
123
+ }
124
+
125
+ /// See <https://developer.apple.com/documentation/metal/mtldrawindexedprimitivesindirectarguments>
126
+ #[repr(C)]
127
+ #[derive(Copy, Clone, Debug)]
128
+ pub struct MTLDrawIndexedPrimitivesIndirectArguments {
129
+ pub indexCount: u32,
130
+ pub instanceCount: u32,
131
+ pub indexStart: u32,
132
+ pub baseVertex: i32,
133
+ pub baseInstance: u32,
134
+ }
135
+
136
+ /// See <https://developer.apple.com/documentation/metal/mtlvertexamplificationviewmapping>
137
+ #[repr(C)]
138
+ #[derive(Copy, Clone, Debug)]
139
+ pub struct VertexAmplificationViewMapping {
140
+ pub renderTargetArrayIndexOffset: u32,
141
+ pub viewportArrayIndexOffset: u32,
142
+ }
143
+
144
+ #[allow(dead_code)]
145
+ type MTLVertexAmplicationViewMapping = VertexAmplificationViewMapping;
146
+
147
+ /// See <https://developer.apple.com/documentation/metal/mtlcommandencoder>
148
+ pub enum MTLCommandEncoder {}
149
+
150
+ foreign_obj_type! {
151
+ type CType = MTLCommandEncoder;
152
+ pub struct CommandEncoder;
153
+ }
154
+
155
+ impl CommandEncoderRef {
156
+ pub fn label(&self) -> &str {
157
+ unsafe {
158
+ let label = msg_send![self, label];
159
+ crate::nsstring_as_str(label)
160
+ }
161
+ }
162
+
163
+ pub fn set_label(&self, label: &str) {
164
+ unsafe {
165
+ let nslabel = crate::nsstring_from_str(label);
166
+ msg_send![self, setLabel: nslabel]
167
+ }
168
+ }
169
+
170
+ pub fn end_encoding(&self) {
171
+ unsafe { msg_send![self, endEncoding] }
172
+ }
173
+
174
+ pub fn insert_debug_signpost(&self, name: &str) {
175
+ unsafe {
176
+ let nslabel = crate::nsstring_from_str(name);
177
+ msg_send![self, insertDebugSignpost: nslabel]
178
+ }
179
+ }
180
+
181
+ pub fn push_debug_group(&self, name: &str) {
182
+ unsafe {
183
+ let nslabel = crate::nsstring_from_str(name);
184
+ msg_send![self, pushDebugGroup: nslabel]
185
+ }
186
+ }
187
+
188
+ pub fn pop_debug_group(&self) {
189
+ unsafe { msg_send![self, popDebugGroup] }
190
+ }
191
+ }
192
+
193
+ /// See <https://developer.apple.com/documentation/metal/mtlparallelrendercommandencoder>
194
+ pub enum MTLParallelRenderCommandEncoder {}
195
+
196
+ foreign_obj_type! {
197
+ type CType = MTLParallelRenderCommandEncoder;
198
+ pub struct ParallelRenderCommandEncoder;
199
+ type ParentType = CommandEncoder;
200
+ }
201
+
202
+ impl ParallelRenderCommandEncoderRef {
203
+ pub fn render_command_encoder(&self) -> &RenderCommandEncoderRef {
204
+ unsafe { msg_send![self, renderCommandEncoder] }
205
+ }
206
+ }
207
+
208
+ /// See <https://developer.apple.com/documentation/metal/mtlrendercommandencoder/>
209
+ pub enum MTLRenderCommandEncoder {}
210
+
211
+ foreign_obj_type! {
212
+ type CType = MTLRenderCommandEncoder;
213
+ pub struct RenderCommandEncoder;
214
+ type ParentType = CommandEncoder;
215
+ }
216
+
217
+ impl RenderCommandEncoderRef {
218
+ pub fn set_render_pipeline_state(&self, pipeline_state: &RenderPipelineStateRef) {
219
+ unsafe { msg_send![self, setRenderPipelineState: pipeline_state] }
220
+ }
221
+
222
+ pub fn set_viewport(&self, viewport: MTLViewport) {
223
+ unsafe { msg_send![self, setViewport: viewport] }
224
+ }
225
+
226
+ pub fn set_front_facing_winding(&self, winding: MTLWinding) {
227
+ unsafe { msg_send![self, setFrontFacingWinding: winding] }
228
+ }
229
+
230
+ pub fn set_cull_mode(&self, mode: MTLCullMode) {
231
+ unsafe { msg_send![self, setCullMode: mode] }
232
+ }
233
+
234
+ pub fn set_depth_clip_mode(&self, mode: MTLDepthClipMode) {
235
+ unsafe { msg_send![self, setDepthClipMode: mode] }
236
+ }
237
+
238
+ pub fn set_depth_bias(&self, bias: f32, scale: f32, clamp: f32) {
239
+ unsafe {
240
+ msg_send![self, setDepthBias:bias
241
+ slopeScale:scale
242
+ clamp:clamp]
243
+ }
244
+ }
245
+
246
+ pub fn set_scissor_rect(&self, rect: MTLScissorRect) {
247
+ unsafe { msg_send![self, setScissorRect: rect] }
248
+ }
249
+
250
+ pub fn set_triangle_fill_mode(&self, mode: MTLTriangleFillMode) {
251
+ unsafe { msg_send![self, setTriangleFillMode: mode] }
252
+ }
253
+
254
+ pub fn set_blend_color(&self, red: f32, green: f32, blue: f32, alpha: f32) {
255
+ unsafe {
256
+ msg_send![self, setBlendColorRed:red
257
+ green:green
258
+ blue:blue
259
+ alpha:alpha]
260
+ }
261
+ }
262
+
263
+ pub fn set_depth_stencil_state(&self, depth_stencil_state: &DepthStencilStateRef) {
264
+ unsafe { msg_send![self, setDepthStencilState: depth_stencil_state] }
265
+ }
266
+
267
+ pub fn set_stencil_reference_value(&self, value: u32) {
268
+ unsafe { msg_send![self, setStencilReferenceValue: value] }
269
+ }
270
+
271
+ pub fn set_stencil_front_back_reference_value(&self, front: u32, back: u32) {
272
+ unsafe {
273
+ msg_send![self, setStencilFrontReferenceValue:front
274
+ backReferenceValue:back]
275
+ }
276
+ }
277
+
278
+ pub fn set_visibility_result_mode(&self, mode: MTLVisibilityResultMode, offset: NSUInteger) {
279
+ unsafe {
280
+ msg_send![self, setVisibilityResultMode:mode
281
+ offset:offset]
282
+ }
283
+ }
284
+
285
+ pub fn set_vertex_amplification_count(
286
+ &self,
287
+ count: NSUInteger,
288
+ view_mappings: Option<&[VertexAmplificationViewMapping]>,
289
+ ) {
290
+ unsafe {
291
+ msg_send! [self, setVertexAmplificationCount: count viewMappings: view_mappings.map_or(std::ptr::null(), |vm| vm.as_ptr())]
292
+ }
293
+ }
294
+
295
+ // Specifying Resources for a Vertex Shader Function
296
+
297
+ pub fn set_vertex_bytes(
298
+ &self,
299
+ index: NSUInteger,
300
+ length: NSUInteger,
301
+ bytes: *const std::ffi::c_void,
302
+ ) {
303
+ unsafe {
304
+ msg_send![self,
305
+ setVertexBytes:bytes
306
+ length:length
307
+ atIndex:index
308
+ ]
309
+ }
310
+ }
311
+
312
+ pub fn set_vertex_buffer(
313
+ &self,
314
+ index: NSUInteger,
315
+ buffer: Option<&BufferRef>,
316
+ offset: NSUInteger,
317
+ ) {
318
+ unsafe {
319
+ msg_send![self,
320
+ setVertexBuffer:buffer
321
+ offset:offset
322
+ atIndex:index
323
+ ]
324
+ }
325
+ }
326
+
327
+ pub fn set_vertex_buffer_offset(&self, index: NSUInteger, offset: NSUInteger) {
328
+ unsafe {
329
+ msg_send![self,
330
+ setVertexBufferOffset:offset
331
+ atIndex:index
332
+ ]
333
+ }
334
+ }
335
+
336
+ pub fn set_vertex_buffers(
337
+ &self,
338
+ start_index: NSUInteger,
339
+ data: &[Option<&BufferRef>],
340
+ offsets: &[NSUInteger],
341
+ ) {
342
+ debug_assert_eq!(offsets.len(), data.len());
343
+ unsafe {
344
+ msg_send![self,
345
+ setVertexBuffers: data.as_ptr()
346
+ offsets: offsets.as_ptr()
347
+ withRange: NSRange {
348
+ location: start_index,
349
+ length: data.len() as _,
350
+ }
351
+ ]
352
+ }
353
+ }
354
+
355
+ pub fn set_vertex_texture(&self, index: NSUInteger, texture: Option<&TextureRef>) {
356
+ unsafe {
357
+ msg_send![self,
358
+ setVertexTexture:texture
359
+ atIndex:index
360
+ ]
361
+ }
362
+ }
363
+
364
+ pub fn set_vertex_textures(&self, start_index: NSUInteger, data: &[Option<&TextureRef>]) {
365
+ unsafe {
366
+ msg_send![self,
367
+ setVertexTextures: data.as_ptr()
368
+ withRange: NSRange {
369
+ location: start_index,
370
+ length: data.len() as _,
371
+ }
372
+ ]
373
+ }
374
+ }
375
+
376
+ pub fn set_vertex_sampler_state(&self, index: NSUInteger, sampler: Option<&SamplerStateRef>) {
377
+ unsafe {
378
+ msg_send![self,
379
+ setVertexSamplerState:sampler
380
+ atIndex:index
381
+ ]
382
+ }
383
+ }
384
+
385
+ pub fn set_vertex_sampler_states(
386
+ &self,
387
+ start_index: NSUInteger,
388
+ data: &[Option<&SamplerStateRef>],
389
+ ) {
390
+ unsafe {
391
+ msg_send![self,
392
+ setVertexSamplerStates: data.as_ptr()
393
+ withRange: NSRange {
394
+ location: start_index,
395
+ length: data.len() as _,
396
+ }
397
+ ]
398
+ }
399
+ }
400
+
401
+ pub fn set_vertex_sampler_state_with_lod(
402
+ &self,
403
+ index: NSUInteger,
404
+ sampler: Option<&SamplerStateRef>,
405
+ lod_clamp: Range<f32>,
406
+ ) {
407
+ unsafe {
408
+ msg_send![self,
409
+ setVertexSamplerState:sampler
410
+ lodMinClamp:lod_clamp.start
411
+ lodMaxClamp:lod_clamp.end
412
+ atIndex:index
413
+ ]
414
+ }
415
+ }
416
+
417
+ /// Only available in (macos(12.0), ios(15.0))
418
+ pub fn set_vertex_acceleration_structure(
419
+ &self,
420
+ index: NSUInteger,
421
+ accel: Option<&AccelerationStructureRef>,
422
+ ) {
423
+ unsafe {
424
+ msg_send![
425
+ self,
426
+ setVertexAccelerationStructure: accel
427
+ atBufferIndex: index
428
+ ]
429
+ }
430
+ }
431
+
432
+ /// Only available in (macos(12.0), ios(15.0))
433
+ pub fn set_vertex_intersection_function_table(
434
+ &self,
435
+ index: NSUInteger,
436
+ table: Option<&IntersectionFunctionTableRef>,
437
+ ) {
438
+ unsafe {
439
+ msg_send![
440
+ self,
441
+ setVertexIntersectionFunctionTable: table
442
+ atBufferIndex: index
443
+ ]
444
+ }
445
+ }
446
+
447
+ pub fn set_vertex_visible_function_table(
448
+ &self,
449
+ buffer_index: NSUInteger,
450
+ visible_function_table: Option<&VisibleFunctionTableRef>,
451
+ ) {
452
+ unsafe {
453
+ msg_send![self,
454
+ setVertexVisibleFunctionTable:visible_function_table
455
+ atBufferIndex:buffer_index]
456
+ }
457
+ }
458
+
459
+ pub fn set_vertex_visible_function_tables(
460
+ &self,
461
+ buffer_start_index: NSUInteger,
462
+ visible_function_tables: &[&VisibleFunctionTableRef],
463
+ ) {
464
+ unsafe {
465
+ msg_send![self,
466
+ setVertexVisibleFunctionTables:visible_function_tables.as_ptr()
467
+ withBufferRange: NSRange {
468
+ location: buffer_start_index,
469
+ length: visible_function_tables.len() as _,
470
+ }
471
+ ]
472
+ }
473
+ }
474
+
475
+ // Specifying Resources for a Object Shader Function
476
+
477
+ /// Only available in (macos(13.0), ios(16.0))
478
+ pub fn set_object_buffer(
479
+ &self,
480
+ index: NSUInteger,
481
+ buffer: Option<&BufferRef>,
482
+ offset: NSUInteger,
483
+ ) {
484
+ unsafe {
485
+ msg_send![self,
486
+ setObjectBuffer:buffer
487
+ offset:offset
488
+ atIndex:index
489
+ ]
490
+ }
491
+ }
492
+
493
+ /// Only available in (macos(13.0), ios(16.0))
494
+ pub fn set_object_buffer_offset(&self, index: NSUInteger, offset: NSUInteger) {
495
+ unsafe {
496
+ msg_send![self,
497
+ setObjectBufferOffset:offset
498
+ atIndex:index
499
+ ]
500
+ }
501
+ }
502
+
503
+ /// Only available in (macos(13.0), ios(16.0))
504
+ pub fn set_object_bytes(
505
+ &self,
506
+ index: NSUInteger,
507
+ length: NSUInteger,
508
+ bytes: *const std::ffi::c_void,
509
+ ) {
510
+ unsafe {
511
+ msg_send![self,
512
+ setObjectBytes:bytes
513
+ length:length
514
+ atIndex:index
515
+ ]
516
+ }
517
+ }
518
+
519
+ /// Only available in (macos(13.0), ios(16.0))
520
+ pub fn set_object_sampler_state(&self, index: NSUInteger, sampler: Option<&SamplerStateRef>) {
521
+ unsafe {
522
+ msg_send![self,
523
+ setObjectSamplerState:sampler
524
+ atIndex:index
525
+ ]
526
+ }
527
+ }
528
+
529
+ /// Only available in (macos(13.0), ios(16.0))
530
+ pub fn set_object_sampler_state_with_lod(
531
+ &self,
532
+ index: NSUInteger,
533
+ sampler: Option<&SamplerStateRef>,
534
+ lod_clamp: Range<f32>,
535
+ ) {
536
+ unsafe {
537
+ msg_send![self,
538
+ setObjectSamplerState:sampler
539
+ lodMinClamp:lod_clamp.start
540
+ lodMaxClamp:lod_clamp.end
541
+ atIndex:index
542
+ ]
543
+ }
544
+ }
545
+
546
+ /// Only available in (macos(13.0), ios(16.0))
547
+ pub fn set_object_texture(&self, index: NSUInteger, texture: Option<&TextureRef>) {
548
+ unsafe {
549
+ msg_send![self,
550
+ setObjectTexture:texture
551
+ atIndex:index
552
+ ]
553
+ }
554
+ }
555
+
556
+ /// Only available in (macos(13.0), ios(16.0))
557
+ pub fn set_object_threadgroup_memory_length(&self, index: NSUInteger, length: NSUInteger) {
558
+ unsafe {
559
+ msg_send![self,
560
+ setObjectThreadgroupMemoryLength: length
561
+ atIndex: index
562
+ ]
563
+ }
564
+ }
565
+
566
+ /// Only available in (macos(13.0), ios(16.0))
567
+ pub fn set_object_buffers(
568
+ &self,
569
+ start_index: NSUInteger,
570
+ data: &[Option<&BufferRef>],
571
+ offsets: &[NSUInteger],
572
+ ) {
573
+ debug_assert_eq!(offsets.len(), data.len());
574
+ unsafe {
575
+ msg_send![self,
576
+ setObjectBuffers: data.as_ptr()
577
+ offsets: offsets.as_ptr()
578
+ withRange: NSRange {
579
+ location: start_index,
580
+ length: data.len() as _,
581
+ }
582
+ ]
583
+ }
584
+ }
585
+
586
+ /// Only available in (macos(13.0), ios(16.0))
587
+ pub fn set_object_sampler_states(
588
+ &self,
589
+ start_index: NSUInteger,
590
+ data: &[Option<&SamplerStateRef>],
591
+ ) {
592
+ unsafe {
593
+ msg_send![self,
594
+ setObjectSamplerStates: data.as_ptr()
595
+ withRange: NSRange {
596
+ location: start_index,
597
+ length: data.len() as _,
598
+ }
599
+ ]
600
+ }
601
+ }
602
+
603
+ /// Only available in (macos(13.0), ios(16.0))
604
+ pub fn set_object_textures(&self, start_index: NSUInteger, data: &[Option<&TextureRef>]) {
605
+ unsafe {
606
+ msg_send![self,
607
+ setObjectTextures: data.as_ptr()
608
+ withRange: NSRange {
609
+ location: start_index,
610
+ length: data.len() as _,
611
+ }
612
+ ]
613
+ }
614
+ }
615
+
616
+ // Specifying Resources for a Mesh Shader
617
+
618
+ /// Only available in (macos(13.0), ios(16.0))
619
+ pub fn set_mesh_buffer(
620
+ &self,
621
+ index: NSUInteger,
622
+ buffer: Option<&BufferRef>,
623
+ offset: NSUInteger,
624
+ ) {
625
+ unsafe {
626
+ msg_send![self,
627
+ setMeshBuffer:buffer
628
+ offset:offset
629
+ atIndex:index
630
+ ]
631
+ }
632
+ }
633
+
634
+ /// Only available in (macos(13.0), ios(16.0))
635
+ pub fn set_mesh_buffer_offset(&self, index: NSUInteger, offset: NSUInteger) {
636
+ unsafe {
637
+ msg_send![self,
638
+ setMeshBufferOffset:offset
639
+ atIndex:index
640
+ ]
641
+ }
642
+ }
643
+
644
+ /// Only available in (macos(13.0), ios(16.0))
645
+ pub fn set_mesh_bytes(
646
+ &self,
647
+ index: NSUInteger,
648
+ length: NSUInteger,
649
+ bytes: *const std::ffi::c_void,
650
+ ) {
651
+ unsafe {
652
+ msg_send![self,
653
+ setMeshBytes:bytes
654
+ length:length
655
+ atIndex:index
656
+ ]
657
+ }
658
+ }
659
+
660
+ /// Only available in (macos(13.0), ios(16.0))
661
+ pub fn set_mesh_sampler_state(&self, index: NSUInteger, sampler: Option<&SamplerStateRef>) {
662
+ unsafe {
663
+ msg_send![self,
664
+ setMeshSamplerState:sampler
665
+ atIndex:index
666
+ ]
667
+ }
668
+ }
669
+
670
+ /// Only available in (macos(13.0), ios(16.0))
671
+ pub fn set_mesh_sampler_state_with_lod(
672
+ &self,
673
+ index: NSUInteger,
674
+ sampler: Option<&SamplerStateRef>,
675
+ lod_clamp: Range<f32>,
676
+ ) {
677
+ unsafe {
678
+ msg_send![self,
679
+ setMeshSamplerState:sampler
680
+ lodMinClamp:lod_clamp.start
681
+ lodMaxClamp:lod_clamp.end
682
+ atIndex:index
683
+ ]
684
+ }
685
+ }
686
+
687
+ /// Only available in (macos(13.0), ios(16.0))
688
+ pub fn set_mesh_texture(&self, index: NSUInteger, texture: Option<&TextureRef>) {
689
+ unsafe {
690
+ msg_send![self,
691
+ setMeshTexture:texture
692
+ atIndex:index
693
+ ]
694
+ }
695
+ }
696
+
697
+ /// Only available in (macos(13.0), ios(16.0))
698
+ pub fn set_mesh_buffers(
699
+ &self,
700
+ start_index: NSUInteger,
701
+ data: &[Option<&BufferRef>],
702
+ offsets: &[NSUInteger],
703
+ ) {
704
+ debug_assert_eq!(offsets.len(), data.len());
705
+ unsafe {
706
+ msg_send![self,
707
+ setMeshBuffers: data.as_ptr()
708
+ offsets: offsets.as_ptr()
709
+ withRange: NSRange {
710
+ location: start_index,
711
+ length: data.len() as _,
712
+ }
713
+ ]
714
+ }
715
+ }
716
+
717
+ /// Only available in (macos(13.0), ios(16.0))
718
+ pub fn set_mesh_sampler_states(
719
+ &self,
720
+ start_index: NSUInteger,
721
+ data: &[Option<&SamplerStateRef>],
722
+ ) {
723
+ unsafe {
724
+ msg_send![self,
725
+ setMeshSamplerStates: data.as_ptr()
726
+ withRange: NSRange {
727
+ location: start_index,
728
+ length: data.len() as _,
729
+ }
730
+ ]
731
+ }
732
+ }
733
+
734
+ /// Only available in (macos(13.0), ios(16.0))
735
+ pub fn set_mesh_textures(&self, start_index: NSUInteger, data: &[Option<&TextureRef>]) {
736
+ unsafe {
737
+ msg_send![self,
738
+ setMeshTextures: data.as_ptr()
739
+ withRange: NSRange {
740
+ location: start_index,
741
+ length: data.len() as _,
742
+ }
743
+ ]
744
+ }
745
+ }
746
+
747
+ // Specifying Resources for a Fragment Shader Function
748
+
749
+ pub fn set_fragment_bytes(
750
+ &self,
751
+ index: NSUInteger,
752
+ length: NSUInteger,
753
+ bytes: *const std::ffi::c_void,
754
+ ) {
755
+ unsafe {
756
+ msg_send![self,
757
+ setFragmentBytes:bytes
758
+ length:length
759
+ atIndex:index
760
+ ]
761
+ }
762
+ }
763
+
764
+ pub fn set_fragment_buffer(
765
+ &self,
766
+ index: NSUInteger,
767
+ buffer: Option<&BufferRef>,
768
+ offset: NSUInteger,
769
+ ) {
770
+ unsafe {
771
+ msg_send![self,
772
+ setFragmentBuffer:buffer
773
+ offset:offset
774
+ atIndex:index
775
+ ]
776
+ }
777
+ }
778
+
779
+ pub fn set_fragment_buffer_offset(&self, index: NSUInteger, offset: NSUInteger) {
780
+ unsafe {
781
+ msg_send![self,
782
+ setFragmentBufferOffset:offset
783
+ atIndex:index
784
+ ]
785
+ }
786
+ }
787
+
788
+ pub fn set_fragment_buffers(
789
+ &self,
790
+ start_index: NSUInteger,
791
+ data: &[Option<&BufferRef>],
792
+ offsets: &[NSUInteger],
793
+ ) {
794
+ debug_assert_eq!(offsets.len(), data.len());
795
+ unsafe {
796
+ msg_send![self,
797
+ setFragmentBuffers: data.as_ptr()
798
+ offsets: offsets.as_ptr()
799
+ withRange: NSRange {
800
+ location: start_index,
801
+ length: data.len() as _,
802
+ }
803
+ ]
804
+ }
805
+ }
806
+
807
+ pub fn set_fragment_texture(&self, index: NSUInteger, texture: Option<&TextureRef>) {
808
+ unsafe {
809
+ msg_send![self,
810
+ setFragmentTexture:texture
811
+ atIndex:index
812
+ ]
813
+ }
814
+ }
815
+
816
+ pub fn set_fragment_textures(&self, start_index: NSUInteger, data: &[Option<&TextureRef>]) {
817
+ unsafe {
818
+ msg_send![self,
819
+ setFragmentTextures: data.as_ptr()
820
+ withRange: NSRange {
821
+ location: start_index,
822
+ length: data.len() as _,
823
+ }
824
+ ]
825
+ }
826
+ }
827
+
828
+ pub fn set_fragment_sampler_state(&self, index: NSUInteger, sampler: Option<&SamplerStateRef>) {
829
+ unsafe {
830
+ msg_send![self, setFragmentSamplerState:sampler
831
+ atIndex:index]
832
+ }
833
+ }
834
+
835
+ pub fn set_fragment_sampler_states(
836
+ &self,
837
+ start_index: NSUInteger,
838
+ data: &[Option<&SamplerStateRef>],
839
+ ) {
840
+ unsafe {
841
+ msg_send![self,
842
+ setFragmentSamplerStates: data.as_ptr()
843
+ withRange: NSRange {
844
+ location: start_index,
845
+ length: data.len() as _,
846
+ }
847
+ ]
848
+ }
849
+ }
850
+
851
+ pub fn set_fragment_sampler_state_with_lod(
852
+ &self,
853
+ index: NSUInteger,
854
+ sampler: Option<&SamplerStateRef>,
855
+ lod_clamp: Range<f32>,
856
+ ) {
857
+ unsafe {
858
+ msg_send![self,
859
+ setFragmentSamplerState:sampler
860
+ lodMinClamp:lod_clamp.start
861
+ lodMaxClamp:lod_clamp.end
862
+ atIndex:index
863
+ ]
864
+ }
865
+ }
866
+
867
+ /// Only available in (macos(12.0), ios(15.0))
868
+ pub fn set_fragment_acceleration_structure(
869
+ &self,
870
+ index: NSUInteger,
871
+ accel: Option<&AccelerationStructureRef>,
872
+ ) {
873
+ unsafe {
874
+ msg_send![
875
+ self,
876
+ setFragmentAccelerationStructure: accel
877
+ atBufferIndex: index
878
+ ]
879
+ }
880
+ }
881
+
882
+ /// Only available in (macos(12.0), ios(15.0))
883
+ pub fn set_fragment_intersection_function_table(
884
+ &self,
885
+ index: NSUInteger,
886
+ table: Option<&IntersectionFunctionTableRef>,
887
+ ) {
888
+ unsafe {
889
+ msg_send![
890
+ self,
891
+ setFragmentIntersectionFunctionTable: table
892
+ atBufferIndex: index
893
+ ]
894
+ }
895
+ }
896
+
897
+ pub fn set_fragment_visible_function_table(
898
+ &self,
899
+ buffer_index: NSUInteger,
900
+ visible_function_table: Option<&VisibleFunctionTableRef>,
901
+ ) {
902
+ unsafe {
903
+ msg_send![self,
904
+ setFragmentVisibleFunctionTable:visible_function_table
905
+ atBufferIndex:buffer_index]
906
+ }
907
+ }
908
+
909
+ pub fn set_fragment_visible_function_tables(
910
+ &self,
911
+ buffer_start_index: NSUInteger,
912
+ visible_function_tables: &[&VisibleFunctionTableRef],
913
+ ) {
914
+ unsafe {
915
+ msg_send![self,
916
+ setFragmentVisibleFunctionTables:visible_function_tables.as_ptr()
917
+ withBufferRange: NSRange {
918
+ location: buffer_start_index,
919
+ length: visible_function_tables.len() as _,
920
+ }
921
+ ]
922
+ }
923
+ }
924
+
925
+ // Drawing Geometric Primitives
926
+
927
+ pub fn draw_primitives(
928
+ &self,
929
+ primitive_type: MTLPrimitiveType,
930
+ vertex_start: NSUInteger,
931
+ vertex_count: NSUInteger,
932
+ ) {
933
+ unsafe {
934
+ msg_send![self,
935
+ drawPrimitives: primitive_type
936
+ vertexStart: vertex_start
937
+ vertexCount: vertex_count
938
+ ]
939
+ }
940
+ }
941
+
942
+ pub fn draw_primitives_instanced(
943
+ &self,
944
+ primitive_type: MTLPrimitiveType,
945
+ vertex_start: NSUInteger,
946
+ vertex_count: NSUInteger,
947
+ instance_count: NSUInteger,
948
+ ) {
949
+ unsafe {
950
+ msg_send![self,
951
+ drawPrimitives: primitive_type
952
+ vertexStart: vertex_start
953
+ vertexCount: vertex_count
954
+ instanceCount: instance_count
955
+ ]
956
+ }
957
+ }
958
+
959
+ pub fn draw_primitives_instanced_base_instance(
960
+ &self,
961
+ primitive_type: MTLPrimitiveType,
962
+ vertex_start: NSUInteger,
963
+ vertex_count: NSUInteger,
964
+ instance_count: NSUInteger,
965
+ base_instance: NSUInteger,
966
+ ) {
967
+ unsafe {
968
+ msg_send![self,
969
+ drawPrimitives: primitive_type
970
+ vertexStart: vertex_start
971
+ vertexCount: vertex_count
972
+ instanceCount: instance_count
973
+ baseInstance: base_instance
974
+ ]
975
+ }
976
+ }
977
+
978
+ pub fn draw_primitives_indirect(
979
+ &self,
980
+ primitive_type: MTLPrimitiveType,
981
+ indirect_buffer: &BufferRef,
982
+ indirect_buffer_offset: NSUInteger,
983
+ ) {
984
+ unsafe {
985
+ msg_send![self,
986
+ drawPrimitives: primitive_type
987
+ indirectBuffer: indirect_buffer
988
+ indirectBufferOffset: indirect_buffer_offset
989
+ ]
990
+ }
991
+ }
992
+
993
+ pub fn draw_indexed_primitives(
994
+ &self,
995
+ primitive_type: MTLPrimitiveType,
996
+ index_count: NSUInteger,
997
+ index_type: MTLIndexType,
998
+ index_buffer: &BufferRef,
999
+ index_buffer_offset: NSUInteger,
1000
+ ) {
1001
+ unsafe {
1002
+ msg_send![self,
1003
+ drawIndexedPrimitives: primitive_type
1004
+ indexCount: index_count
1005
+ indexType: index_type
1006
+ indexBuffer: index_buffer
1007
+ indexBufferOffset: index_buffer_offset
1008
+ ]
1009
+ }
1010
+ }
1011
+
1012
+ pub fn draw_indexed_primitives_instanced(
1013
+ &self,
1014
+ primitive_type: MTLPrimitiveType,
1015
+ index_count: NSUInteger,
1016
+ index_type: MTLIndexType,
1017
+ index_buffer: &BufferRef,
1018
+ index_buffer_offset: NSUInteger,
1019
+ instance_count: NSUInteger,
1020
+ ) {
1021
+ unsafe {
1022
+ msg_send![self,
1023
+ drawIndexedPrimitives: primitive_type
1024
+ indexCount: index_count
1025
+ indexType: index_type
1026
+ indexBuffer: index_buffer
1027
+ indexBufferOffset: index_buffer_offset
1028
+ instanceCount: instance_count
1029
+ ]
1030
+ }
1031
+ }
1032
+
1033
+ pub fn draw_indexed_primitives_instanced_base_instance(
1034
+ &self,
1035
+ primitive_type: MTLPrimitiveType,
1036
+ index_count: NSUInteger,
1037
+ index_type: MTLIndexType,
1038
+ index_buffer: &BufferRef,
1039
+ index_buffer_offset: NSUInteger,
1040
+ instance_count: NSUInteger,
1041
+ base_vertex: NSInteger,
1042
+ base_instance: NSUInteger,
1043
+ ) {
1044
+ unsafe {
1045
+ msg_send![self,
1046
+ drawIndexedPrimitives: primitive_type
1047
+ indexCount: index_count
1048
+ indexType: index_type
1049
+ indexBuffer: index_buffer
1050
+ indexBufferOffset: index_buffer_offset
1051
+ instanceCount: instance_count
1052
+ baseVertex: base_vertex
1053
+ baseInstance: base_instance
1054
+ ]
1055
+ }
1056
+ }
1057
+
1058
+ pub fn draw_indexed_primitives_indirect(
1059
+ &self,
1060
+ primitive_type: MTLPrimitiveType,
1061
+ index_type: MTLIndexType,
1062
+ index_buffer: &BufferRef,
1063
+ index_buffer_offset: NSUInteger,
1064
+ indirect_buffer: &BufferRef,
1065
+ indirect_buffer_offset: NSUInteger,
1066
+ ) {
1067
+ unsafe {
1068
+ msg_send![self,
1069
+ drawIndexedPrimitives: primitive_type
1070
+ indexType: index_type
1071
+ indexBuffer: index_buffer
1072
+ indexBufferOffset: index_buffer_offset
1073
+ indirectBuffer: indirect_buffer
1074
+ indirectBufferOffset: indirect_buffer_offset
1075
+ ]
1076
+ }
1077
+ }
1078
+
1079
+ // TODO: more draws
1080
+ // fn setVertexBufferOffset_atIndex(self, offset: NSUInteger, index: NSUInteger);
1081
+ // fn setVertexBuffers_offsets_withRange(self, buffers: *const id, offsets: *const NSUInteger, range: NSRange);
1082
+ // fn setVertexSamplerStates_lodMinClamps_lodMaxClamps_withRange(self, samplers: *const id, lodMinClamps: *const f32, lodMaxClamps: *const f32, range: NSRange);
1083
+
1084
+ /// Only available in (macos(13.0), ios(16.0))
1085
+ pub fn draw_mesh_threadgroups(
1086
+ &self,
1087
+ threadgroups_per_grid: MTLSize,
1088
+ threads_per_object_threadgroup: MTLSize,
1089
+ threads_per_mesh_threadgroup: MTLSize,
1090
+ ) {
1091
+ unsafe {
1092
+ msg_send![self,
1093
+ drawMeshThreadgroups: threadgroups_per_grid
1094
+ threadsPerObjectThreadgroup: threads_per_object_threadgroup
1095
+ threadsPerMeshThreadgroup: threads_per_mesh_threadgroup
1096
+ ]
1097
+ }
1098
+ }
1099
+
1100
+ /// Only available in (macos(13.0), ios(16.0))
1101
+ pub fn draw_mesh_threadgroups_with_indirect_buffer(
1102
+ &self,
1103
+ indirect_buffer: &BufferRef,
1104
+ indirect_buffer_offset: NSUInteger,
1105
+ threads_per_object_threadgroup: MTLSize,
1106
+ threads_per_mesh_threadgroup: MTLSize,
1107
+ ) {
1108
+ unsafe {
1109
+ msg_send![self,
1110
+ drawMeshThreadgroupsWithIndirectBuffer: indirect_buffer
1111
+ indirectBufferOffset: indirect_buffer_offset
1112
+ threadsPerObjectThreadgroup: threads_per_object_threadgroup
1113
+ threadsPerMeshThreadgroup: threads_per_mesh_threadgroup
1114
+ ]
1115
+ }
1116
+ }
1117
+
1118
+ /// Only available in (macos(13.0), ios(16.0))
1119
+ pub fn draw_mesh_threads(
1120
+ &self,
1121
+ threads_per_grid: MTLSize,
1122
+ threads_per_object_threadgroup: MTLSize,
1123
+ threads_per_mesh_threadgroup: MTLSize,
1124
+ ) {
1125
+ unsafe {
1126
+ msg_send![self,
1127
+ drawMeshThreads: threads_per_grid
1128
+ threadsPerObjectThreadgroup: threads_per_object_threadgroup
1129
+ threadsPerMeshThreadgroup: threads_per_mesh_threadgroup
1130
+ ]
1131
+ }
1132
+ }
1133
+
1134
+ /// Adds an untracked resource to the render pass.
1135
+ ///
1136
+ /// Availability: iOS 11.0+, macOS 10.13+
1137
+ ///
1138
+ /// # Arguments
1139
+ /// * `resource`: A resource within an argument buffer.
1140
+ /// * `usage`: Options for describing how a graphics function uses the resource.
1141
+ ///
1142
+ /// See <https://developer.apple.com/documentation/metal/mtlrendercommandencoder/2866168-useresource?language=objc>
1143
+ #[deprecated(note = "Use use_resource_at instead")]
1144
+ pub fn use_resource(&self, resource: &ResourceRef, usage: MTLResourceUsage) {
1145
+ unsafe {
1146
+ msg_send![self,
1147
+ useResource:resource
1148
+ usage:usage
1149
+ ]
1150
+ }
1151
+ }
1152
+
1153
+ /// Adds an untracked resource to the render pass, specifying which render stages need it.
1154
+ ///
1155
+ /// Availability: iOS 13.0+, macOS 10.15+
1156
+ ///
1157
+ /// # Arguments
1158
+ /// * `resource`: A resource within an argument buffer.
1159
+ /// * `usage`: Options for describing how a graphics function uses the resource.
1160
+ /// * `stages`: The render stages where the resource must be resident.
1161
+ ///
1162
+ /// See <https://developer.apple.com/documentation/metal/mtlrendercommandencoder/3043404-useresource>
1163
+ pub fn use_resource_at(
1164
+ &self,
1165
+ resource: &ResourceRef,
1166
+ usage: MTLResourceUsage,
1167
+ stages: MTLRenderStages,
1168
+ ) {
1169
+ unsafe {
1170
+ msg_send![self,
1171
+ useResource: resource
1172
+ usage: usage
1173
+ stages: stages
1174
+ ]
1175
+ }
1176
+ }
1177
+
1178
+ /// Adds an array of untracked resources to the render pass, specifying which stages need them.
1179
+ ///
1180
+ /// When working with color render targets, call this method as late as possible to improve performance.
1181
+ ///
1182
+ /// Availability: iOS 13.0+, macOS 10.15+
1183
+ ///
1184
+ /// # Arguments
1185
+ /// * `resources`: A slice of resources within an argument buffer.
1186
+ /// * `usage`: Options for describing how a graphics function uses the resources.
1187
+ /// * `stages`: The render stages where the resources must be resident.
1188
+ pub fn use_resources(
1189
+ &self,
1190
+ resources: &[&ResourceRef],
1191
+ usage: MTLResourceUsage,
1192
+ stages: MTLRenderStages,
1193
+ ) {
1194
+ unsafe {
1195
+ msg_send![self,
1196
+ useResources: resources.as_ptr()
1197
+ count: resources.len() as NSUInteger
1198
+ usage: usage
1199
+ stages: stages
1200
+ ]
1201
+ }
1202
+ }
1203
+
1204
+ /// Adds the resources in a heap to the render pass.
1205
+ ///
1206
+ /// Availability: iOS 11.0+, macOS 10.13+
1207
+ ///
1208
+ /// # Arguments:
1209
+ /// * `heap`: A heap that contains resources within an argument buffer.
1210
+ ///
1211
+ /// See <https://developer.apple.com/documentation/metal/mtlrendercommandencoder/2866163-useheap?language=objc>
1212
+ #[deprecated(note = "Use use_heap_at instead")]
1213
+ pub fn use_heap(&self, heap: &HeapRef) {
1214
+ unsafe { msg_send![self, useHeap: heap] }
1215
+ }
1216
+
1217
+ /// Adds the resources in a heap to the render pass, specifying which render stages need them.
1218
+ ///
1219
+ /// Availability: iOS 13.0+, macOS 10.15+
1220
+ ///
1221
+ /// # Arguments
1222
+ /// * `heap`: A heap that contains resources within an argument buffer.
1223
+ /// * `stages`: The render stages where the resources must be resident.
1224
+ ///
1225
+ pub fn use_heap_at(&self, heap: &HeapRef, stages: MTLRenderStages) {
1226
+ unsafe {
1227
+ msg_send![self,
1228
+ useHeap: heap
1229
+ stages: stages
1230
+ ]
1231
+ }
1232
+ }
1233
+
1234
+ /// Adds the resources in an array of heaps to the render pass, specifying which render stages need them.
1235
+ ///
1236
+ /// Availability: iOS 13.0+, macOS 10.15+
1237
+ ///
1238
+ /// # Arguments
1239
+ ///
1240
+ /// * `heaps`: A slice of heaps that contains resources within an argument buffer.
1241
+ /// * `stages`: The render stages where the resources must be resident.
1242
+ pub fn use_heaps(&self, heaps: &[&HeapRef], stages: MTLRenderStages) {
1243
+ unsafe {
1244
+ msg_send![self,
1245
+ useHeaps: heaps.as_ptr()
1246
+ count: heaps.len() as NSUInteger
1247
+ stages: stages
1248
+ ]
1249
+ }
1250
+ }
1251
+
1252
+ pub fn execute_commands_in_buffer(
1253
+ &self,
1254
+ buffer: &IndirectCommandBufferRef,
1255
+ with_range: NSRange,
1256
+ ) {
1257
+ unsafe { msg_send![self, executeCommandsInBuffer:buffer withRange:with_range] }
1258
+ }
1259
+
1260
+ pub fn update_fence(&self, fence: &FenceRef, after_stages: MTLRenderStages) {
1261
+ unsafe {
1262
+ msg_send![self,
1263
+ updateFence: fence
1264
+ afterStages: after_stages
1265
+ ]
1266
+ }
1267
+ }
1268
+
1269
+ pub fn wait_for_fence(&self, fence: &FenceRef, before_stages: MTLRenderStages) {
1270
+ unsafe {
1271
+ msg_send![self,
1272
+ waitForFence: fence
1273
+ beforeStages: before_stages
1274
+ ]
1275
+ }
1276
+ }
1277
+
1278
+ /// See: <https://developer.apple.com/documentation/metal/mtlrendercommandencoder/3194379-samplecountersinbuffer>
1279
+ pub fn sample_counters_in_buffer(
1280
+ &self,
1281
+ sample_buffer: &CounterSampleBufferRef,
1282
+ sample_index: NSUInteger,
1283
+ with_barrier: bool,
1284
+ ) {
1285
+ unsafe {
1286
+ msg_send![self,
1287
+ sampleCountersInBuffer: sample_buffer
1288
+ atSampleIndex: sample_index
1289
+ withBarrier: with_barrier
1290
+ ]
1291
+ }
1292
+ }
1293
+ }
1294
+
1295
+ /// See <https://developer.apple.com/documentation/metal/mtlblitcommandencoder/>
1296
+ pub enum MTLBlitCommandEncoder {}
1297
+
1298
+ foreign_obj_type! {
1299
+ type CType = MTLBlitCommandEncoder;
1300
+ pub struct BlitCommandEncoder;
1301
+ type ParentType = CommandEncoder;
1302
+ }
1303
+
1304
+ impl BlitCommandEncoderRef {
1305
+ pub fn synchronize_resource(&self, resource: &ResourceRef) {
1306
+ unsafe { msg_send![self, synchronizeResource: resource] }
1307
+ }
1308
+
1309
+ pub fn fill_buffer(&self, destination_buffer: &BufferRef, range: crate::NSRange, value: u8) {
1310
+ unsafe {
1311
+ msg_send![self,
1312
+ fillBuffer: destination_buffer
1313
+ range: range
1314
+ value: value
1315
+ ]
1316
+ }
1317
+ }
1318
+
1319
+ pub fn generate_mipmaps(&self, texture: &TextureRef) {
1320
+ unsafe { msg_send![self, generateMipmapsForTexture: texture] }
1321
+ }
1322
+
1323
+ pub fn copy_from_buffer(
1324
+ &self,
1325
+ source_buffer: &BufferRef,
1326
+ source_offset: NSUInteger,
1327
+ destination_buffer: &BufferRef,
1328
+ destination_offset: NSUInteger,
1329
+ size: NSUInteger,
1330
+ ) {
1331
+ unsafe {
1332
+ msg_send![self,
1333
+ copyFromBuffer: source_buffer
1334
+ sourceOffset: source_offset
1335
+ toBuffer: destination_buffer
1336
+ destinationOffset: destination_offset
1337
+ size: size
1338
+ ]
1339
+ }
1340
+ }
1341
+
1342
+ pub fn copy_from_texture(
1343
+ &self,
1344
+ source_texture: &TextureRef,
1345
+ source_slice: NSUInteger,
1346
+ source_level: NSUInteger,
1347
+ source_origin: MTLOrigin,
1348
+ source_size: MTLSize,
1349
+ destination_texture: &TextureRef,
1350
+ destination_slice: NSUInteger,
1351
+ destination_level: NSUInteger,
1352
+ destination_origin: MTLOrigin,
1353
+ ) {
1354
+ unsafe {
1355
+ msg_send![self,
1356
+ copyFromTexture: source_texture
1357
+ sourceSlice: source_slice
1358
+ sourceLevel: source_level
1359
+ sourceOrigin: source_origin
1360
+ sourceSize: source_size
1361
+ toTexture: destination_texture
1362
+ destinationSlice: destination_slice
1363
+ destinationLevel: destination_level
1364
+ destinationOrigin: destination_origin
1365
+ ]
1366
+ }
1367
+ }
1368
+
1369
+ pub fn copy_from_buffer_to_texture(
1370
+ &self,
1371
+ source_buffer: &BufferRef,
1372
+ source_offset: NSUInteger,
1373
+ source_bytes_per_row: NSUInteger,
1374
+ source_bytes_per_image: NSUInteger,
1375
+ source_size: MTLSize,
1376
+ destination_texture: &TextureRef,
1377
+ destination_slice: NSUInteger,
1378
+ destination_level: NSUInteger,
1379
+ destination_origin: MTLOrigin,
1380
+ options: MTLBlitOption,
1381
+ ) {
1382
+ unsafe {
1383
+ msg_send![self,
1384
+ copyFromBuffer: source_buffer
1385
+ sourceOffset: source_offset
1386
+ sourceBytesPerRow: source_bytes_per_row
1387
+ sourceBytesPerImage: source_bytes_per_image
1388
+ sourceSize: source_size
1389
+ toTexture: destination_texture
1390
+ destinationSlice: destination_slice
1391
+ destinationLevel: destination_level
1392
+ destinationOrigin: destination_origin
1393
+ options: options
1394
+ ]
1395
+ }
1396
+ }
1397
+
1398
+ /// See <https://developer.apple.com/documentation/metal/mtlblitcommandencoder/1400756-copy>
1399
+ pub fn copy_from_texture_to_buffer(
1400
+ &self,
1401
+ source_texture: &TextureRef,
1402
+ source_slice: NSUInteger,
1403
+ source_level: NSUInteger,
1404
+ source_origin: MTLOrigin,
1405
+ source_size: MTLSize,
1406
+ destination_buffer: &BufferRef,
1407
+ destination_offset: NSUInteger,
1408
+ destination_bytes_per_row: NSUInteger,
1409
+ destination_bytes_per_image: NSUInteger,
1410
+ options: MTLBlitOption,
1411
+ ) {
1412
+ unsafe {
1413
+ msg_send![self,
1414
+ copyFromTexture: source_texture
1415
+ sourceSlice: source_slice
1416
+ sourceLevel: source_level
1417
+ sourceOrigin: source_origin
1418
+ sourceSize: source_size
1419
+ toBuffer: destination_buffer
1420
+ destinationOffset: destination_offset
1421
+ destinationBytesPerRow: destination_bytes_per_row
1422
+ destinationBytesPerImage: destination_bytes_per_image
1423
+ options: options
1424
+ ]
1425
+ }
1426
+ }
1427
+
1428
+ pub fn optimize_contents_for_gpu_access(&self, texture: &TextureRef) {
1429
+ unsafe { msg_send![self, optimizeContentsForGPUAccess: texture] }
1430
+ }
1431
+
1432
+ pub fn optimize_contents_for_gpu_access_slice_level(
1433
+ &self,
1434
+ texture: &TextureRef,
1435
+ slice: NSUInteger,
1436
+ level: NSUInteger,
1437
+ ) {
1438
+ unsafe {
1439
+ msg_send![self,
1440
+ optimizeContentsForGPUAccess: texture
1441
+ slice: slice
1442
+ level: level
1443
+ ]
1444
+ }
1445
+ }
1446
+
1447
+ pub fn optimize_contents_for_cpu_access(&self, texture: &TextureRef) {
1448
+ unsafe { msg_send![self, optimizeContentsForCPUAccess: texture] }
1449
+ }
1450
+
1451
+ pub fn optimize_contents_for_cpu_access_slice_level(
1452
+ &self,
1453
+ texture: &TextureRef,
1454
+ slice: NSUInteger,
1455
+ level: NSUInteger,
1456
+ ) {
1457
+ unsafe {
1458
+ msg_send![self,
1459
+ optimizeContentsForCPUAccess: texture
1460
+ slice: slice
1461
+ level: level
1462
+ ]
1463
+ }
1464
+ }
1465
+
1466
+ pub fn update_fence(&self, fence: &FenceRef) {
1467
+ unsafe { msg_send![self, updateFence: fence] }
1468
+ }
1469
+
1470
+ pub fn wait_for_fence(&self, fence: &FenceRef) {
1471
+ unsafe { msg_send![self, waitForFence: fence] }
1472
+ }
1473
+
1474
+ pub fn copy_indirect_command_buffer(
1475
+ &self,
1476
+ source: &IndirectCommandBufferRef,
1477
+ source_range: NSRange,
1478
+ destination: &IndirectCommandBufferRef,
1479
+ destination_index: NSUInteger,
1480
+ ) {
1481
+ unsafe {
1482
+ msg_send![self,
1483
+ copyIndirectCommandBuffer: source
1484
+ sourceRange: source_range
1485
+ destination: destination
1486
+ destinationIndex: destination_index
1487
+ ]
1488
+ }
1489
+ }
1490
+
1491
+ pub fn reset_commands_in_buffer(&self, buffer: &IndirectCommandBufferRef, range: NSRange) {
1492
+ unsafe {
1493
+ msg_send![self,
1494
+ resetCommandsInBuffer: buffer
1495
+ withRange: range
1496
+ ]
1497
+ }
1498
+ }
1499
+
1500
+ pub fn optimize_indirect_command_buffer(
1501
+ &self,
1502
+ buffer: &IndirectCommandBufferRef,
1503
+ range: NSRange,
1504
+ ) {
1505
+ unsafe {
1506
+ msg_send![self,
1507
+ optimizeIndirectCommandBuffer: buffer
1508
+ withRange: range
1509
+ ]
1510
+ }
1511
+ }
1512
+
1513
+ /// See: <https://developer.apple.com/documentation/metal/mtlblitcommandencoder/3194348-samplecountersinbuffer>
1514
+ pub fn sample_counters_in_buffer(
1515
+ &self,
1516
+ sample_buffer: &CounterSampleBufferRef,
1517
+ sample_index: NSUInteger,
1518
+ with_barrier: bool,
1519
+ ) {
1520
+ unsafe {
1521
+ msg_send![self,
1522
+ sampleCountersInBuffer: sample_buffer
1523
+ atSampleIndex: sample_index
1524
+ withBarrier: with_barrier
1525
+ ]
1526
+ }
1527
+ }
1528
+
1529
+ /// See: <https://developer.apple.com/documentation/metal/mtlblitcommandencoder/3194347-resolvecounters>
1530
+ pub fn resolve_counters(
1531
+ &self,
1532
+ sample_buffer: &CounterSampleBufferRef,
1533
+ range: crate::NSRange,
1534
+ destination_buffer: &BufferRef,
1535
+ destination_offset: NSUInteger,
1536
+ ) {
1537
+ unsafe {
1538
+ msg_send![self,
1539
+ resolveCounters: sample_buffer
1540
+ inRange: range
1541
+ destinationBuffer: destination_buffer
1542
+ destinationOffset: destination_offset
1543
+ ]
1544
+ }
1545
+ }
1546
+ }
1547
+
1548
+ /// See <https://developer.apple.com/documentation/metal/mtlcomputecommandencoder/>
1549
+ pub enum MTLComputeCommandEncoder {}
1550
+
1551
+ foreign_obj_type! {
1552
+ type CType = MTLComputeCommandEncoder;
1553
+ pub struct ComputeCommandEncoder;
1554
+ type ParentType = CommandEncoder;
1555
+ }
1556
+
1557
+ impl ComputeCommandEncoderRef {
1558
+ pub fn set_compute_pipeline_state(&self, state: &ComputePipelineStateRef) {
1559
+ unsafe { msg_send![self, setComputePipelineState: state] }
1560
+ }
1561
+
1562
+ pub fn set_buffer(&self, index: NSUInteger, buffer: Option<&BufferRef>, offset: NSUInteger) {
1563
+ unsafe { msg_send![self, setBuffer:buffer offset:offset atIndex:index] }
1564
+ }
1565
+
1566
+ pub fn set_buffers(
1567
+ &self,
1568
+ start_index: NSUInteger,
1569
+ data: &[Option<&BufferRef>],
1570
+ offsets: &[NSUInteger],
1571
+ ) {
1572
+ debug_assert_eq!(offsets.len(), data.len());
1573
+ unsafe {
1574
+ msg_send![self,
1575
+ setBuffers: data.as_ptr()
1576
+ offsets: offsets.as_ptr()
1577
+ withRange: NSRange {
1578
+ location: start_index,
1579
+ length: data.len() as _,
1580
+ }
1581
+ ]
1582
+ }
1583
+ }
1584
+
1585
+ pub fn set_texture(&self, index: NSUInteger, texture: Option<&TextureRef>) {
1586
+ unsafe {
1587
+ msg_send![self,
1588
+ setTexture:texture
1589
+ atIndex:index
1590
+ ]
1591
+ }
1592
+ }
1593
+
1594
+ pub fn set_textures(&self, start_index: NSUInteger, data: &[Option<&TextureRef>]) {
1595
+ unsafe {
1596
+ msg_send![self,
1597
+ setTextures: data.as_ptr()
1598
+ withRange: NSRange {
1599
+ location: start_index,
1600
+ length: data.len() as _,
1601
+ }
1602
+ ]
1603
+ }
1604
+ }
1605
+
1606
+ pub fn set_sampler_state(&self, index: NSUInteger, sampler: Option<&SamplerStateRef>) {
1607
+ unsafe {
1608
+ msg_send![self,
1609
+ setSamplerState:sampler
1610
+ atIndex:index
1611
+ ]
1612
+ }
1613
+ }
1614
+
1615
+ pub fn set_sampler_states(&self, start_index: NSUInteger, data: &[Option<&SamplerStateRef>]) {
1616
+ unsafe {
1617
+ msg_send![self,
1618
+ setSamplerStates: data.as_ptr()
1619
+ withRange: NSRange {
1620
+ location: start_index,
1621
+ length: data.len() as _,
1622
+ }
1623
+ ]
1624
+ }
1625
+ }
1626
+
1627
+ pub fn set_sampler_state_with_lod(
1628
+ &self,
1629
+ index: NSUInteger,
1630
+ sampler: Option<&SamplerStateRef>,
1631
+ lod_clamp: Range<f32>,
1632
+ ) {
1633
+ unsafe {
1634
+ msg_send![self,
1635
+ setSamplerState:sampler
1636
+ lodMinClamp:lod_clamp.start
1637
+ lodMaxClamp:lod_clamp.end
1638
+ atIndex:index
1639
+ ]
1640
+ }
1641
+ }
1642
+
1643
+ pub fn set_bytes(&self, index: NSUInteger, length: NSUInteger, bytes: *const std::ffi::c_void) {
1644
+ unsafe {
1645
+ msg_send![self,
1646
+ setBytes: bytes
1647
+ length: length
1648
+ atIndex: index
1649
+ ]
1650
+ }
1651
+ }
1652
+
1653
+ pub fn set_visible_function_table(
1654
+ &self,
1655
+ buffer_index: NSUInteger,
1656
+ visible_function_table: Option<&VisibleFunctionTableRef>,
1657
+ ) {
1658
+ unsafe {
1659
+ msg_send![self,
1660
+ setVisibleFunctionTable:visible_function_table
1661
+ atBufferIndex:buffer_index]
1662
+ }
1663
+ }
1664
+
1665
+ pub fn set_visible_function_tables(
1666
+ &self,
1667
+ buffer_start_index: NSUInteger,
1668
+ visible_function_tables: &[&VisibleFunctionTableRef],
1669
+ ) {
1670
+ unsafe {
1671
+ msg_send![self,
1672
+ setVisibleFunctionTables:visible_function_tables.as_ptr()
1673
+ withBufferRange: NSRange {
1674
+ location: buffer_start_index,
1675
+ length: visible_function_tables.len() as _,
1676
+ }
1677
+ ]
1678
+ }
1679
+ }
1680
+
1681
+ pub fn dispatch_thread_groups(
1682
+ &self,
1683
+ thread_groups_count: MTLSize,
1684
+ threads_per_threadgroup: MTLSize,
1685
+ ) {
1686
+ unsafe {
1687
+ msg_send![self,
1688
+ dispatchThreadgroups:thread_groups_count
1689
+ threadsPerThreadgroup:threads_per_threadgroup
1690
+ ]
1691
+ }
1692
+ }
1693
+
1694
+ pub fn dispatch_threads(&self, threads_per_grid: MTLSize, threads_per_thread_group: MTLSize) {
1695
+ unsafe {
1696
+ msg_send![self,
1697
+ dispatchThreads:threads_per_grid
1698
+ threadsPerThreadgroup:threads_per_thread_group
1699
+ ]
1700
+ }
1701
+ }
1702
+
1703
+ pub fn dispatch_thread_groups_indirect(
1704
+ &self,
1705
+ buffer: &BufferRef,
1706
+ offset: NSUInteger,
1707
+ threads_per_threadgroup: MTLSize,
1708
+ ) {
1709
+ unsafe {
1710
+ msg_send![self,
1711
+ dispatchThreadgroupsWithIndirectBuffer:buffer
1712
+ indirectBufferOffset:offset
1713
+ threadsPerThreadgroup:threads_per_threadgroup
1714
+ ]
1715
+ }
1716
+ }
1717
+
1718
+ pub fn set_threadgroup_memory_length(&self, at_index: NSUInteger, size: NSUInteger) {
1719
+ unsafe {
1720
+ msg_send![self,
1721
+ setThreadgroupMemoryLength:size
1722
+ atIndex: at_index
1723
+ ]
1724
+ }
1725
+ }
1726
+
1727
+ /// Encodes a barrier so that changes to a set of resources made by commands encoded before the
1728
+ /// barrier are completed before further commands are executed.
1729
+ ///
1730
+ /// Availability: iOS 12.0+, macOS 10.14+
1731
+ ///
1732
+ /// # Arguments
1733
+ /// * `resources`: A slice of resources.
1734
+ pub fn memory_barrier_with_resources(&self, resources: &[&ResourceRef]) {
1735
+ unsafe {
1736
+ msg_send![self,
1737
+ memoryBarrierWithResources: resources.as_ptr()
1738
+ count: resources.len() as NSUInteger
1739
+ ]
1740
+ }
1741
+ }
1742
+
1743
+ /// Specifies that a resource in an argument buffer can be safely used by a compute pass.
1744
+ ///
1745
+ /// Availability: iOS 11.0+, macOS 10.13+
1746
+ ///
1747
+ /// # Arguments
1748
+ /// * `resource`: A specific resource within an argument buffer.
1749
+ /// * `usage`: The options that describe how the resource will be used by a compute function.
1750
+ pub fn use_resource(&self, resource: &ResourceRef, usage: MTLResourceUsage) {
1751
+ unsafe {
1752
+ msg_send![self,
1753
+ useResource: resource
1754
+ usage: usage
1755
+ ]
1756
+ }
1757
+ }
1758
+
1759
+ /// Specifies that an array of resources in an argument buffer can be safely used by a compute pass.
1760
+ ///
1761
+ /// Availability: iOS 11.0+, macOS 10.13+
1762
+ ///
1763
+ /// See <https://developer.apple.com/documentation/metal/mtlcomputecommandencoder/2866561-useresources>
1764
+ ///
1765
+ /// # Arguments
1766
+ /// * `resources`: A slice of resources within an argument buffer.
1767
+ /// * `usage`: The options that describe how the array of resources will be used by a compute function.
1768
+ pub fn use_resources(&self, resources: &[&ResourceRef], usage: MTLResourceUsage) {
1769
+ unsafe {
1770
+ msg_send![self,
1771
+ useResources: resources.as_ptr()
1772
+ count: resources.len() as NSUInteger
1773
+ usage: usage
1774
+ ]
1775
+ }
1776
+ }
1777
+
1778
+ /// Specifies that a heap containing resources in an argument buffer can be safely used by a compute pass.
1779
+ ///
1780
+ /// Availability: iOS 11.0+, macOS 10.13+
1781
+ ///
1782
+ /// See <https://developer.apple.com/documentation/metal/mtlcomputecommandencoder/2866530-useheap>
1783
+ ///
1784
+ /// # Arguments
1785
+ /// * `heap`: A heap that contains resources within an argument buffer.
1786
+ pub fn use_heap(&self, heap: &HeapRef) {
1787
+ unsafe { msg_send![self, useHeap: heap] }
1788
+ }
1789
+
1790
+ /// Specifies that an array of heaps containing resources in an argument buffer can be safely
1791
+ /// used by a compute pass.
1792
+ ///
1793
+ /// Availability: iOS 11.0+, macOS 10.13+
1794
+ ///
1795
+ /// # Arguments
1796
+ /// * `heaps`: A slice of heaps that contains resources within an argument buffer.
1797
+ pub fn use_heaps(&self, heaps: &[&HeapRef]) {
1798
+ unsafe {
1799
+ msg_send![self,
1800
+ useHeaps: heaps.as_ptr()
1801
+ count: heaps.len() as NSUInteger
1802
+ ]
1803
+ }
1804
+ }
1805
+
1806
+ pub fn update_fence(&self, fence: &FenceRef) {
1807
+ unsafe { msg_send![self, updateFence: fence] }
1808
+ }
1809
+
1810
+ pub fn wait_for_fence(&self, fence: &FenceRef) {
1811
+ unsafe { msg_send![self, waitForFence: fence] }
1812
+ }
1813
+
1814
+ /// Only available in (macos(11.0), ios(14.0))
1815
+ pub fn set_acceleration_structure(
1816
+ &self,
1817
+ index: NSUInteger,
1818
+ accel: Option<&AccelerationStructureRef>,
1819
+ ) {
1820
+ unsafe {
1821
+ msg_send![
1822
+ self,
1823
+ setAccelerationStructure: accel
1824
+ atBufferIndex: index
1825
+ ]
1826
+ }
1827
+ }
1828
+
1829
+ /// Only available in (macos(11.0), ios(14.0))
1830
+ pub fn set_intersection_function_table(
1831
+ &self,
1832
+ index: NSUInteger,
1833
+ table: Option<&IntersectionFunctionTableRef>,
1834
+ ) {
1835
+ unsafe {
1836
+ msg_send![
1837
+ self,
1838
+ setIntersectionFunctionTable: table
1839
+ atBufferIndex: index
1840
+ ]
1841
+ }
1842
+ }
1843
+
1844
+ /// See: <https://developer.apple.com/documentation/metal/mtlcomputecommandencoder/3194349-samplecountersinbuffer>
1845
+ pub fn sample_counters_in_buffer(
1846
+ &self,
1847
+ sample_buffer: &CounterSampleBufferRef,
1848
+ sample_index: NSUInteger,
1849
+ with_barrier: bool,
1850
+ ) {
1851
+ unsafe {
1852
+ msg_send![self,
1853
+ sampleCountersInBuffer: sample_buffer
1854
+ atSampleIndex: sample_index
1855
+ withBarrier: with_barrier
1856
+ ]
1857
+ }
1858
+ }
1859
+ }
1860
+
1861
+ /// See <https://developer.apple.com/documentation/metal/mtlargumentencoder/>
1862
+ pub enum MTLArgumentEncoder {}
1863
+
1864
+ foreign_obj_type! {
1865
+ type CType = MTLArgumentEncoder;
1866
+ pub struct ArgumentEncoder;
1867
+ }
1868
+
1869
+ impl ArgumentEncoderRef {
1870
+ pub fn encoded_length(&self) -> NSUInteger {
1871
+ unsafe { msg_send![self, encodedLength] }
1872
+ }
1873
+
1874
+ pub fn alignment(&self) -> NSUInteger {
1875
+ unsafe { msg_send![self, alignment] }
1876
+ }
1877
+
1878
+ pub fn set_argument_buffer(&self, buffer: &BufferRef, offset: NSUInteger) {
1879
+ unsafe {
1880
+ msg_send![self,
1881
+ setArgumentBuffer: buffer
1882
+ offset: offset
1883
+ ]
1884
+ }
1885
+ }
1886
+
1887
+ pub fn set_argument_buffer_to_element(
1888
+ &self,
1889
+ array_element: NSUInteger,
1890
+ buffer: &BufferRef,
1891
+ offset: NSUInteger,
1892
+ ) {
1893
+ unsafe {
1894
+ msg_send![self,
1895
+ setArgumentBuffer: buffer
1896
+ startOffset: offset
1897
+ arrayElement: array_element
1898
+ ]
1899
+ }
1900
+ }
1901
+
1902
+ pub fn set_buffer(&self, at_index: NSUInteger, buffer: &BufferRef, offset: NSUInteger) {
1903
+ unsafe {
1904
+ msg_send![self,
1905
+ setBuffer: buffer
1906
+ offset: offset
1907
+ atIndex: at_index
1908
+ ]
1909
+ }
1910
+ }
1911
+
1912
+ pub fn set_buffers(
1913
+ &self,
1914
+ start_index: NSUInteger,
1915
+ data: &[&BufferRef],
1916
+ offsets: &[NSUInteger],
1917
+ ) {
1918
+ assert_eq!(offsets.len(), data.len());
1919
+ unsafe {
1920
+ msg_send![self,
1921
+ setBuffers: data.as_ptr()
1922
+ offsets: offsets.as_ptr()
1923
+ withRange: NSRange {
1924
+ location: start_index,
1925
+ length: data.len() as _,
1926
+ }
1927
+ ]
1928
+ }
1929
+ }
1930
+
1931
+ pub fn set_texture(&self, at_index: NSUInteger, texture: &TextureRef) {
1932
+ unsafe {
1933
+ msg_send![self,
1934
+ setTexture: texture
1935
+ atIndex: at_index
1936
+ ]
1937
+ }
1938
+ }
1939
+
1940
+ pub fn set_textures(&self, start_index: NSUInteger, data: &[&TextureRef]) {
1941
+ unsafe {
1942
+ msg_send![self,
1943
+ setTextures: data.as_ptr()
1944
+ withRange: NSRange {
1945
+ location: start_index,
1946
+ length: data.len() as _,
1947
+ }
1948
+ ]
1949
+ }
1950
+ }
1951
+
1952
+ pub fn set_sampler_state(&self, at_index: NSUInteger, sampler_state: &SamplerStateRef) {
1953
+ unsafe {
1954
+ msg_send![self,
1955
+ setSamplerState: sampler_state
1956
+ atIndex: at_index
1957
+ ]
1958
+ }
1959
+ }
1960
+
1961
+ pub fn set_sampler_states(&self, start_index: NSUInteger, data: &[&SamplerStateRef]) {
1962
+ unsafe {
1963
+ msg_send![self,
1964
+ setSamplerStates: data.as_ptr()
1965
+ withRange: NSRange {
1966
+ location: start_index,
1967
+ length: data.len() as _,
1968
+ }
1969
+ ]
1970
+ }
1971
+ }
1972
+
1973
+ pub fn set_render_pipeline_state(
1974
+ &self,
1975
+ at_index: NSUInteger,
1976
+ pipeline: &RenderPipelineStateRef,
1977
+ ) {
1978
+ unsafe {
1979
+ msg_send![self,
1980
+ setRenderPipelineState: pipeline
1981
+ atIndex: at_index
1982
+ ]
1983
+ }
1984
+ }
1985
+
1986
+ pub fn set_render_pipeline_states(
1987
+ &self,
1988
+ start_index: NSUInteger,
1989
+ pipelines: &[&RenderPipelineStateRef],
1990
+ ) {
1991
+ unsafe {
1992
+ msg_send![self,
1993
+ setRenderPipelineStates: pipelines.as_ptr()
1994
+ withRange: NSRange {
1995
+ location: start_index,
1996
+ length: pipelines.len() as _,
1997
+ }
1998
+ ]
1999
+ }
2000
+ }
2001
+
2002
+ pub fn constant_data(&self, at_index: NSUInteger) -> *mut std::ffi::c_void {
2003
+ unsafe { msg_send![self, constantDataAtIndex: at_index] }
2004
+ }
2005
+
2006
+ pub fn set_indirect_command_buffer(
2007
+ &self,
2008
+ at_index: NSUInteger,
2009
+ buffer: &IndirectCommandBufferRef,
2010
+ ) {
2011
+ unsafe {
2012
+ msg_send![self,
2013
+ setIndirectCommandBuffer: buffer
2014
+ atIndex: at_index
2015
+ ]
2016
+ }
2017
+ }
2018
+
2019
+ pub fn set_indirect_command_buffers(
2020
+ &self,
2021
+ start_index: NSUInteger,
2022
+ data: &[&IndirectCommandBufferRef],
2023
+ ) {
2024
+ unsafe {
2025
+ msg_send![self,
2026
+ setIndirectCommandBuffers: data.as_ptr()
2027
+ withRange: NSRange {
2028
+ location: start_index,
2029
+ length: data.len() as _,
2030
+ }
2031
+ ]
2032
+ }
2033
+ }
2034
+
2035
+ pub fn new_argument_encoder_for_buffer(&self, index: NSUInteger) -> ArgumentEncoder {
2036
+ unsafe {
2037
+ let ptr = msg_send![self, newArgumentEncoderForBufferAtIndex: index];
2038
+ ArgumentEncoder::from_ptr(ptr)
2039
+ }
2040
+ }
2041
+ }