react-native-webgpu 0.23.0 → 0.25.0

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 (127) hide show
  1. package/Package.swift +18 -129
  2. package/android/CMakeLists.txt +1 -0
  3. package/android/cpp/AndroidPlatformContext.h +10 -9
  4. package/android/cpp/cpp-adapter.cpp +19 -96
  5. package/android/src/main/java/com/webgpu/BackingViewKind.java +5 -22
  6. package/android/src/main/java/com/webgpu/WebGPUAPI.java +0 -2
  7. package/android/src/main/java/com/webgpu/WebGPUModule.java +34 -3
  8. package/android/src/main/java/com/webgpu/WebGPUVideoPlayer.java +1 -1
  9. package/android/src/main/java/com/webgpu/WebGPUView.java +17 -34
  10. package/apple/ApplePlatformContext.h +2 -1
  11. package/apple/ApplePlatformContext.mm +2 -2
  12. package/apple/WebGPUModule.mm +22 -0
  13. package/binaries.json +53 -105
  14. package/cpp/dawn/common/ExternalTextureParams.h +3 -3
  15. package/cpp/dawn/include/dawn/dawn_proc.h +53 -0
  16. package/cpp/dawn/include/dawn/dawn_proc_table.h +329 -0
  17. package/cpp/dawn/include/dawn/dawn_thread_dispatch_proc.h +47 -0
  18. package/cpp/dawn/include/dawn/dawn_version.h +51 -0
  19. package/cpp/dawn/include/dawn/native/D3D11Backend.h +65 -0
  20. package/cpp/dawn/include/dawn/native/D3D12Backend.h +104 -0
  21. package/cpp/dawn/include/dawn/native/D3DBackend.h +56 -0
  22. package/cpp/dawn/include/dawn/native/DawnNative.h +375 -0
  23. package/cpp/dawn/include/dawn/native/MetalBackend.h +67 -0
  24. package/cpp/dawn/include/dawn/native/NullBackend.h +39 -0
  25. package/cpp/dawn/include/dawn/native/OpenGLBackend.h +89 -0
  26. package/cpp/dawn/include/dawn/native/VulkanBackend.h +199 -0
  27. package/cpp/dawn/include/dawn/native/WebGPUBackend.h +49 -0
  28. package/cpp/dawn/include/dawn/native/dawn_native_export.h +49 -0
  29. package/cpp/dawn/include/dawn/platform/DawnPlatform.h +210 -0
  30. package/cpp/dawn/include/dawn/platform/dawn_platform_export.h +49 -0
  31. package/cpp/dawn/include/dawn/replay/Replay.h +99 -0
  32. package/cpp/dawn/include/dawn/replay/dawn_replay_export.h +49 -0
  33. package/cpp/dawn/include/dawn/webgpu.h +5119 -0
  34. package/cpp/dawn/include/dawn/webgpu_cpp.h +10506 -0
  35. package/cpp/dawn/include/dawn/webgpu_cpp_print.h +2897 -0
  36. package/cpp/dawn/include/webgpu/webgpu.h +33 -0
  37. package/cpp/dawn/include/webgpu/webgpu_cpp.h +33 -0
  38. package/cpp/dawn/include/webgpu/webgpu_cpp_chained_struct.h +57 -0
  39. package/cpp/dawn/include/webgpu/webgpu_cpp_print.h +33 -0
  40. package/cpp/dawn/include/webgpu/webgpu_enum_class_bitmasks.h +163 -0
  41. package/cpp/dawn/include/webgpu/webgpu_glfw.h +88 -0
  42. package/cpp/rnwgpu/GpuPurge.cpp +86 -0
  43. package/cpp/rnwgpu/GpuPurge.h +66 -0
  44. package/cpp/rnwgpu/PlatformContext.h +1 -1
  45. package/cpp/rnwgpu/SurfaceRegistry.h +2 -612
  46. package/cpp/rnwgpu/api/GPUAdapter.cpp +1 -1
  47. package/cpp/rnwgpu/api/GPUDevice.cpp +59 -32
  48. package/cpp/rnwgpu/api/GPUDevice.h +49 -4
  49. package/cpp/rnwgpu/api/RNWebGPU.h +11 -4
  50. package/lib/commonjs/Canvas.js +8 -26
  51. package/lib/commonjs/Canvas.js.map +1 -1
  52. package/lib/commonjs/main/index.js +12 -0
  53. package/lib/commonjs/main/index.js.map +1 -1
  54. package/lib/commonjs/main/index.web.js +11 -0
  55. package/lib/commonjs/main/index.web.js.map +1 -1
  56. package/lib/commonjs/mock.js +4 -1
  57. package/lib/commonjs/mock.js.map +1 -1
  58. package/lib/commonjs/purgeGpuResources.js +29 -0
  59. package/lib/commonjs/purgeGpuResources.js.map +1 -0
  60. package/lib/commonjs/video.js +8 -4
  61. package/lib/commonjs/video.js.map +1 -1
  62. package/lib/module/Canvas.js +8 -26
  63. package/lib/module/Canvas.js.map +1 -1
  64. package/lib/module/main/index.js +1 -0
  65. package/lib/module/main/index.js.map +1 -1
  66. package/lib/module/main/index.web.js +1 -0
  67. package/lib/module/main/index.web.js.map +1 -1
  68. package/lib/module/mock.js +1 -0
  69. package/lib/module/mock.js.map +1 -1
  70. package/lib/module/purgeGpuResources.js +22 -0
  71. package/lib/module/purgeGpuResources.js.map +1 -0
  72. package/lib/module/video.js +6 -2
  73. package/lib/module/video.js.map +1 -1
  74. package/lib/typescript/lib/commonjs/Canvas.d.ts.map +1 -1
  75. package/lib/typescript/lib/commonjs/mock.d.ts +1 -0
  76. package/lib/typescript/lib/commonjs/mock.d.ts.map +1 -1
  77. package/lib/typescript/lib/commonjs/purgeGpuResources.d.ts +18 -0
  78. package/lib/typescript/lib/commonjs/purgeGpuResources.d.ts.map +1 -0
  79. package/lib/typescript/lib/commonjs/video.d.ts +6 -2
  80. package/lib/typescript/lib/commonjs/video.d.ts.map +1 -1
  81. package/lib/typescript/lib/module/Canvas.d.ts.map +1 -1
  82. package/lib/typescript/lib/module/main/index.d.ts +1 -0
  83. package/lib/typescript/lib/module/main/index.web.d.ts +1 -0
  84. package/lib/typescript/lib/module/mock.d.ts +1 -0
  85. package/lib/typescript/lib/module/mock.d.ts.map +1 -1
  86. package/lib/typescript/lib/module/purgeGpuResources.d.ts +2 -0
  87. package/lib/typescript/lib/module/purgeGpuResources.d.ts.map +1 -0
  88. package/lib/typescript/lib/module/video.d.ts +1 -1
  89. package/lib/typescript/lib/module/video.d.ts.map +1 -1
  90. package/lib/typescript/react-native.config.d.ts +1 -0
  91. package/lib/typescript/src/Canvas.d.ts +2 -12
  92. package/lib/typescript/src/Canvas.d.ts.map +1 -1
  93. package/lib/typescript/src/WebGPUViewNativeComponent.d.ts +1 -1
  94. package/lib/typescript/src/WebGPUViewNativeComponent.d.ts.map +1 -1
  95. package/lib/typescript/src/WebGPUViewNativeComponent.web.d.ts +1 -1
  96. package/lib/typescript/src/WebGPUViewNativeComponent.web.d.ts.map +1 -1
  97. package/lib/typescript/src/index.d.ts +3 -2
  98. package/lib/typescript/src/index.d.ts.map +1 -1
  99. package/lib/typescript/src/main/index.d.ts +1 -0
  100. package/lib/typescript/src/main/index.d.ts.map +1 -1
  101. package/lib/typescript/src/main/index.web.d.ts +1 -0
  102. package/lib/typescript/src/main/index.web.d.ts.map +1 -1
  103. package/lib/typescript/src/mock.d.ts +2 -1
  104. package/lib/typescript/src/mock.d.ts.map +1 -1
  105. package/lib/typescript/src/purgeGpuResources.d.ts +17 -0
  106. package/lib/typescript/src/purgeGpuResources.d.ts.map +1 -0
  107. package/lib/typescript/src/types.d.ts +1 -1
  108. package/lib/typescript/src/types.d.ts.map +1 -1
  109. package/lib/typescript/src/video.d.ts +7 -3
  110. package/lib/typescript/src/video.d.ts.map +1 -1
  111. package/package.json +10 -5
  112. package/react-native-webgpu.podspec +46 -78
  113. package/react-native.config.js +9 -6
  114. package/scripts/apple-binaries-utils.sh +280 -0
  115. package/scripts/prepare-apple-binaries.sh +309 -0
  116. package/scripts/spm-plugin.js +130 -0
  117. package/src/Canvas.tsx +12 -50
  118. package/src/WebGPUViewNativeComponent.ts +1 -1
  119. package/src/WebGPUViewNativeComponent.web.ts +1 -1
  120. package/src/index.tsx +5 -4
  121. package/src/main/index.tsx +1 -0
  122. package/src/main/index.web.tsx +1 -0
  123. package/src/mock.ts +2 -1
  124. package/src/purgeGpuResources.ts +21 -0
  125. package/src/types.ts +1 -1
  126. package/src/video.ts +12 -5
  127. package/android/src/main/java/com/webgpu/WebGPUHardwareBufferView.java +0 -278
@@ -2,6 +2,7 @@
2
2
  #include "ApplePlatformContext.h"
3
3
  #include "DawnBlobCache.h"
4
4
  #import "GPUCanvasContext.h"
5
+ #include "GpuPurge.h"
5
6
  #import "RNWGUIKit.h"
6
7
 
7
8
  #import <React/RCTBridge+Private.h>
@@ -22,6 +23,24 @@ namespace react = facebook::react;
22
23
  - (void *)runtime;
23
24
  @end
24
25
 
26
+ #if !TARGET_OS_OSX
27
+ // A memory warning goes to the native side as it comes, which decides when the
28
+ // GPU memory nothing uses goes back to the system (see GpuPurge). Once for the
29
+ // process: devices outlive a React reload.
30
+ static void observeMemoryWarnings() {
31
+ static dispatch_once_t once;
32
+ dispatch_once(&once, ^{
33
+ [[NSNotificationCenter defaultCenter]
34
+ addObserverForName:UIApplicationDidReceiveMemoryWarningNotification
35
+ object:nil
36
+ queue:nil
37
+ usingBlock:^(NSNotification *) {
38
+ rnwgpu::GpuPurge::onMemoryWarning();
39
+ }];
40
+ });
41
+ }
42
+ #endif
43
+
25
44
  @implementation WebGPUModule
26
45
 
27
46
  RCT_EXPORT_MODULE(WebGPUModule)
@@ -149,6 +168,9 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
149
168
  rnwgpu::DawnBlobCache::setDirectory(
150
169
  [caches stringByAppendingPathComponent:@"webgpu-dawn"].UTF8String);
151
170
  }
171
+ #if !TARGET_OS_OSX
172
+ observeMemoryWarnings();
173
+ #endif
152
174
  webgpuManager = std::make_shared<rnwgpu::RNWebGPUManager>(runtime, jsInvoker,
153
175
  platformContext);
154
176
  return @true;
package/binaries.json CHANGED
@@ -1,156 +1,104 @@
1
1
  {
2
- "version": "158.0.0",
3
- "tag": "binaries-158.0.0",
4
- "skia": "m158",
2
+ "version": "158.1.0",
3
+ "tag": "binaries-158.1.0",
4
+ "skia": "m158a",
5
5
  "dawn": {
6
6
  "commit": "1716e88cc9e58398fab5d4473f7f2e858667b677",
7
7
  "repository": "https://dawn.googlesource.com/dawn.git",
8
8
  "patches": [
9
- "metal-maccatalyst.patch",
9
+ "metal-platforms.patch",
10
10
  "metal-suspend-submissions-in-background.patch",
11
11
  "vulkan-fifo-three-images-android.patch"
12
12
  ]
13
13
  },
14
14
  "assets": {
15
15
  "skia-graphite-android-armeabi-v7a.zip": {
16
- "sha256": "ed4e7772d97cac8c03d759451711de69cd723c60cf5e6571fe78da5f21cdf9a3",
17
- "size": 17220410
16
+ "sha256": "47781a5c9a8cadcacfd34ecc7ba4fb693720317ecf5a3222d06f2a8e2d68bfbf",
17
+ "size": 15722986
18
18
  },
19
19
  "dawn-android-armeabi-v7a.zip": {
20
- "sha256": "0d15912b225a079f850af8195ce7be50c4e63d337a63aebd2cbebe1173b110f4",
20
+ "sha256": "2b57530193b024be85f285b6da30298afd53900c9280fb2ffdd46f008c3f3d1e",
21
21
  "size": 4885803
22
22
  },
23
23
  "skia-graphite-android-arm64-v8a.zip": {
24
- "sha256": "2a2e2fdc22aebe827ccc4d613c1336b1f8ec68384df68f057c3aa6b5e8a5da43",
25
- "size": 18419606
24
+ "sha256": "ea089e96d0f6ceab54d548086d59b16aa3eb4cb74b938e01615090d161d85682",
25
+ "size": 16819745
26
26
  },
27
27
  "dawn-android-arm64-v8a.zip": {
28
- "sha256": "5a48fdafbf73ae870b073a20cce9e46a9b3fbb9aecdc312fc900af2a3e83312f",
28
+ "sha256": "9d6ba71daeb9b10b0209d542a0579bbb55dcf9be88af1792aaa5681b92860b94",
29
29
  "size": 5308117
30
30
  },
31
31
  "skia-graphite-android-x86.zip": {
32
- "sha256": "d5ce0c75db0016986a4840996bc66ae345806f4f41fb7820e9ee11815ed928a0",
33
- "size": 18838978
32
+ "sha256": "2b3da6ede43dec15b4daaed779d98f5b86b445c4805db2b4a289460fc079a029",
33
+ "size": 17308398
34
34
  },
35
35
  "dawn-android-x86.zip": {
36
- "sha256": "13e3f79fc2447f0b71d6ad559df7a8f2e7857bd02faac83a2ca7e5670963b8ed",
36
+ "sha256": "a2d86b4c796e41124cf12a455644dc668cab2d77c1d920892b8d8633d87c15de",
37
37
  "size": 6066809
38
38
  },
39
39
  "skia-graphite-android-x86_64.zip": {
40
- "sha256": "b69568bffb06a14cfea785c4ebfdc0f292986a6bd51bba37774d65233602f778",
41
- "size": 18422759
40
+ "sha256": "91c49f9174bd3d869cb633b3ddcfe8ba50e91cc20a7e3b41f99cda951d54386b",
41
+ "size": 16894623
42
42
  },
43
43
  "dawn-android-x86_64.zip": {
44
- "sha256": "2e41a8983a379f8798d1d26ae223b123b2347b593190fd1c7d344956a796240a",
44
+ "sha256": "2dc9d121cd1d03b9d864daf42ea89363ac7aa9307194bfd624d13243ec744335",
45
45
  "size": 5659211
46
46
  },
47
47
  "dawn-headers.zip": {
48
- "sha256": "fe255214b596fd884a480078d417571a7fd7b4beb04e8ce1a93f140b12a0a4a8",
48
+ "sha256": "52306f91ada60f507924ae2b377423b4630ba2610f6921771026831d1dcd7ee6",
49
49
  "size": 150497
50
50
  },
51
51
  "dawn-LICENSE.txt": {
52
52
  "sha256": "0493f897193af1796d5054659f45ec7d4c5af648fa67a99f01d30e55cc805abc",
53
53
  "size": 11829
54
54
  },
55
- "skia-graphite-apple-ios-libskia.xcframework.zip": {
56
- "sha256": "93e76f7320bc5b782b847b4b26aeec8730cdf6b7f06575d583e626eb9ed53350",
57
- "size": 33541685
55
+ "skia-graphite-apple-iphoneos.zip": {
56
+ "sha256": "73f4f5f26decc5406ecf51d49b8fa4f49e1d22fe01888921d060c7dda5df24a2",
57
+ "size": 13661198
58
58
  },
59
- "skia-graphite-apple-ios-libsvg.xcframework.zip": {
60
- "sha256": "ea5b1bb251faad33e7f3799286d8f57479cf80cdc741d436fc7d2d9c64c9c8e6",
61
- "size": 9658038
59
+ "dawn-apple-iphoneos.zip": {
60
+ "sha256": "02447594afe473f138e8af0bca7797da5065cb47fd386e9b865e8979b8f56323",
61
+ "size": 5165717
62
62
  },
63
- "skia-graphite-apple-ios-libskshaper.xcframework.zip": {
64
- "sha256": "35b68ae901b50d41a6c353a34f81f4a69efec9420f9976414428636544f6595f",
65
- "size": 12905519
63
+ "skia-graphite-apple-iphonesimulator.zip": {
64
+ "sha256": "a241b57f7bf5e3496e3886336593a3272427701346f1cbf3000309fd305e36b5",
65
+ "size": 27756601
66
66
  },
67
- "skia-graphite-apple-ios-libskparagraph.xcframework.zip": {
68
- "sha256": "b17b30a587b7d5248e0f1d716c938d19d09855772e2b63dc29590ca409b2370b",
69
- "size": 1132911
67
+ "dawn-apple-iphonesimulator.zip": {
68
+ "sha256": "6dbd06127709c7bc2f291f624943386642c86507a10c51f978ccacbacd8b2073",
69
+ "size": 10355986
70
70
  },
71
- "skia-graphite-apple-ios-libskunicode_core.xcframework.zip": {
72
- "sha256": "52f4a1001f9d88e957091bebbf65f72f9f9e4d6fb18f15e50335e8b76cfb4ec4",
73
- "size": 18600
71
+ "skia-graphite-apple-maccatalyst.zip": {
72
+ "sha256": "7555f273222a6a53d14cea1111d1442fee0cfbaf61503f233678a37271509921",
73
+ "size": 28586272
74
74
  },
75
- "skia-graphite-apple-ios-libskunicode_libgrapheme.xcframework.zip": {
76
- "sha256": "9419f8f0467095d331ec5dcc0c83652e4719d94d7553e9bf1bfd3c3a9c8bdb82",
77
- "size": 824822
75
+ "dawn-apple-maccatalyst.zip": {
76
+ "sha256": "2b7469f7634e751159f500bc75c71db3c019440cb74f3dbd79589d0e3cb491d8",
77
+ "size": 10682325
78
78
  },
79
- "skia-graphite-apple-ios-libskottie.xcframework.zip": {
80
- "sha256": "dc2a5842b7f5732e578ee349883a01784c75ca607f89137ee6e381eba1769a61",
81
- "size": 10719542
79
+ "skia-graphite-apple-appletvos.zip": {
80
+ "sha256": "9a76b0e38fac39a92decee00dc1827982b93c79c4e46fad5023cc8745af1a7ef",
81
+ "size": 13661376
82
82
  },
83
- "skia-graphite-apple-ios-libsksg.xcframework.zip": {
84
- "sha256": "d25a3e0571393f36a6fac0c0dbcfd729019626ebac2cf8d840a40e5c72c2a1cb",
85
- "size": 9024381
83
+ "dawn-apple-appletvos.zip": {
84
+ "sha256": "a20dd2d2e7355588a576e49a8efaff00124ebb241e9c94600b66fcfaeeb88754",
85
+ "size": 5163794
86
86
  },
87
- "skia-graphite-apple-tvos-libskia.xcframework.zip": {
88
- "sha256": "4d29ae8db6e106267bed8ba693ac097d97c4436a981a036b8d7d59aa578c72b2",
89
- "size": 19847689
87
+ "skia-graphite-apple-appletvsimulator.zip": {
88
+ "sha256": "f633d90ab9f4030183ec5da9c09e2b0415fb55e689e82825945dc8a46a233297",
89
+ "size": 27755222
90
90
  },
91
- "skia-graphite-apple-tvos-libsvg.xcframework.zip": {
92
- "sha256": "c3f6bf08448ad5e1cce10b32d2c43d062bb56ac84dff2af6b5d95a8d019c3af9",
93
- "size": 5705277
91
+ "dawn-apple-appletvsimulator.zip": {
92
+ "sha256": "2d41261a7bd067c32c001fd39eadafa29c22e625f77cfba3f7ec22b110ae8b3a",
93
+ "size": 10352864
94
94
  },
95
- "skia-graphite-apple-tvos-libskshaper.xcframework.zip": {
96
- "sha256": "f18b368fad922e5a6bd736b84509c51364b4c9b8ca9cbca14a1404996cfe0d59",
97
- "size": 7664970
95
+ "skia-graphite-apple-macos.zip": {
96
+ "sha256": "fe3a7388c25e807774bac85b2b3526947bde8717beb4c6379b810e62185c602d",
97
+ "size": 28540342
98
98
  },
99
- "skia-graphite-apple-tvos-libskparagraph.xcframework.zip": {
100
- "sha256": "495fcfef1b0094def9c7b514f0f27290ff43ebdfaa6f7f73c7409b545f2958c8",
101
- "size": 670608
102
- },
103
- "skia-graphite-apple-tvos-libskunicode_core.xcframework.zip": {
104
- "sha256": "f73bb1ce3cee1d2fbd940b8b5b91ed4512cb618f91a0009f49cf718945826812",
105
- "size": 11546
106
- },
107
- "skia-graphite-apple-tvos-libskunicode_libgrapheme.xcframework.zip": {
108
- "sha256": "c515f56f998e6ea7e2b74b853915e1627e3efcf406b7ec29316fd0769ca5c1e3",
109
- "size": 491185
110
- },
111
- "skia-graphite-apple-tvos-libskottie.xcframework.zip": {
112
- "sha256": "384f861b6c635199a249f2b76d4c2bbd55a3f3480b4fc0f5f0879d6862f0daf9",
113
- "size": 6335725
114
- },
115
- "skia-graphite-apple-tvos-libsksg.xcframework.zip": {
116
- "sha256": "929096f800fcfe775218625eb4eb9ecba3e5c8a547f6eb3d6a2867e175531a8e",
117
- "size": 5328696
118
- },
119
- "skia-graphite-apple-macos-libskia.xcframework.zip": {
120
- "sha256": "96526c51628b7ac52360c3ea6c4c86f16c8e28801fc9428fc42b36e6555b01bc",
121
- "size": 13678266
122
- },
123
- "skia-graphite-apple-macos-libsvg.xcframework.zip": {
124
- "sha256": "636d4d2c6e38ea1bb4e7c19dba98ed013745975bef38ffd53d96d901b3206e8c",
125
- "size": 3939058
126
- },
127
- "skia-graphite-apple-macos-libskshaper.xcframework.zip": {
128
- "sha256": "80d719fb0c9cb5311791170204102d0a5901e92d43f428f856ee60a32706dc7c",
129
- "size": 5251775
130
- },
131
- "skia-graphite-apple-macos-libskparagraph.xcframework.zip": {
132
- "sha256": "15a6fe0ade4e5d08661c0282aadc76a5f9293745dfb77e2d3cfe20f5258c315a",
133
- "size": 462769
134
- },
135
- "skia-graphite-apple-macos-libskunicode_core.xcframework.zip": {
136
- "sha256": "a0f5173dcee332280e72dd49411fa4534256fd6540dfa69ec71463d822fca238",
137
- "size": 7659
138
- },
139
- "skia-graphite-apple-macos-libskunicode_libgrapheme.xcframework.zip": {
140
- "sha256": "8129e8ab9bfa8d9ced3793db079e0977cdbd9c7436d057eb1ce4b48fb03b082b",
141
- "size": 334680
142
- },
143
- "skia-graphite-apple-macos-libskottie.xcframework.zip": {
144
- "sha256": "ffbcc4ccb3dd37ac634d394f263488c5f216bdaa2aa5a819093edc5ca03a0fc4",
145
- "size": 4373140
146
- },
147
- "skia-graphite-apple-macos-libsksg.xcframework.zip": {
148
- "sha256": "58b85895c87561cc4904e1c24b2b05faf6776e5f2fcf49469d6808f0421f5f8f",
149
- "size": 3684323
150
- },
151
- "dawn-apple-libwebgpu_dawn.xcframework.zip": {
152
- "sha256": "b1844ccfb27809361a9724cf5dac4b1a4b7f9e40f26dc7cf60d40a5013dd7114",
153
- "size": 53231891
99
+ "dawn-apple-macos.zip": {
100
+ "sha256": "79f72607b6793e299fa6668c3c589f96f90f581b28a7782b6688239607facb9b",
101
+ "size": 10596222
154
102
  }
155
103
  }
156
104
  }
@@ -29,9 +29,9 @@
29
29
  //
30
30
  // Vendored from Dawn's src/dawn/common/ExternalTextureParams.h, unchanged. The
31
31
  // functions it declares are compiled into the Dawn binaries that
32
- // react-native-webgpu-dawn ships (libwebgpu_dawn.so, libwebgpu_dawn.a), which
33
- // export them, but the package only ships Dawn's public headers. The copy is
34
- // pinned to the Dawn commit of the package in scripts/check-dawn.ts: on a Dawn
32
+ // the pinned release ships (libwebgpu_dawn.so, libwebgpu_dawn.a), which
33
+ // export them, but the released include/ tree has only public headers. The copy
34
+ // is pinned to the release commit in scripts/check-dawn.ts: on a Dawn
35
35
  // bump, diff it against the new commit's file and re-sync it.
36
36
 
37
37
  #ifndef SRC_DAWN_COMMON_EXTERNALTEXTUREPARAMS_H_
@@ -0,0 +1,53 @@
1
+ // Copyright 2019 The Dawn & Tint Authors
2
+ //
3
+ // Redistribution and use in source and binary forms, with or without
4
+ // modification, are permitted provided that the following conditions are met:
5
+ //
6
+ // 1. Redistributions of source code must retain the above copyright notice, this
7
+ // list of conditions and the following disclaimer.
8
+ //
9
+ // 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ // this list of conditions and the following disclaimer in the documentation
11
+ // and/or other materials provided with the distribution.
12
+ //
13
+ // 3. Neither the name of the copyright holder nor the names of its
14
+ // contributors may be used to endorse or promote products derived from
15
+ // this software without specific prior written permission.
16
+ //
17
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef INCLUDE_DAWN_DAWN_PROC_H_
29
+ #define INCLUDE_DAWN_DAWN_PROC_H_
30
+
31
+ #include <webgpu/webgpu.h>
32
+
33
+ #include "dawn/dawn_proc_table.h"
34
+
35
+ #ifdef __cplusplus
36
+ extern "C" {
37
+ #endif
38
+
39
+ // Sets the static proctable used by libdawn_proc to implement the Dawn entrypoints. Passing NULL
40
+ // for `procs` sets up the null proctable that contains only null function pointers. It is the
41
+ // default value of the proctable. Setting the proctable back to null is good practice when you
42
+ // are done using libdawn_proc since further usage will cause a segfault instead of calling an
43
+ // unexpected function.
44
+ WGPU_EXPORT void dawnProcSetProcs(const DawnProcTable* procs);
45
+
46
+ // Returns the static array of uint8_t of size 20 representing the Dawn version.
47
+ WGPU_EXPORT const uint8_t* dawnProcGetVersion();
48
+
49
+ #ifdef __cplusplus
50
+ } // extern "C"
51
+ #endif
52
+
53
+ #endif // INCLUDE_DAWN_DAWN_PROC_H_
@@ -0,0 +1,329 @@
1
+
2
+ #ifndef DAWN_DAWN_PROC_TABLE_H_
3
+ #define DAWN_DAWN_PROC_TABLE_H_
4
+
5
+ #include "dawn/webgpu.h"
6
+
7
+ // Note: Often allocated as a static global. Do not add a complex constructor.
8
+ typedef struct DawnProcTable {
9
+ uint8_t version[20]{};
10
+
11
+ WGPUProcCreateInstance createInstance = nullptr;
12
+ WGPUProcGetInstanceFeatures getInstanceFeatures = nullptr;
13
+ WGPUProcGetInstanceLimits getInstanceLimits = nullptr;
14
+ WGPUProcHasInstanceFeature hasInstanceFeature = nullptr;
15
+ WGPUProcGetProcAddress getProcAddress = nullptr;
16
+
17
+ WGPUProcAdapterCreateDevice adapterCreateDevice = nullptr;
18
+ WGPUProcAdapterGetFeatures adapterGetFeatures = nullptr;
19
+ WGPUProcAdapterGetFormatCapabilities adapterGetFormatCapabilities = nullptr;
20
+ WGPUProcAdapterGetInfo adapterGetInfo = nullptr;
21
+ WGPUProcAdapterGetInstance adapterGetInstance = nullptr;
22
+ WGPUProcAdapterGetLimits adapterGetLimits = nullptr;
23
+ WGPUProcAdapterHasFeature adapterHasFeature = nullptr;
24
+ WGPUProcAdapterRequestDevice adapterRequestDevice = nullptr;
25
+ WGPUProcAdapterAddRef adapterAddRef = nullptr;
26
+ WGPUProcAdapterRelease adapterRelease = nullptr;
27
+
28
+ WGPUProcAdapterInfoFreeMembers adapterInfoFreeMembers = nullptr;
29
+
30
+ WGPUProcAdapterPropertiesMemoryHeapsFreeMembers adapterPropertiesMemoryHeapsFreeMembers = nullptr;
31
+
32
+ WGPUProcAdapterPropertiesSubgroupMatrixConfigsFreeMembers adapterPropertiesSubgroupMatrixConfigsFreeMembers = nullptr;
33
+
34
+ WGPUProcBindGroupSetLabel bindGroupSetLabel = nullptr;
35
+ WGPUProcBindGroupAddRef bindGroupAddRef = nullptr;
36
+ WGPUProcBindGroupRelease bindGroupRelease = nullptr;
37
+
38
+ WGPUProcBindGroupLayoutSetLabel bindGroupLayoutSetLabel = nullptr;
39
+ WGPUProcBindGroupLayoutAddRef bindGroupLayoutAddRef = nullptr;
40
+ WGPUProcBindGroupLayoutRelease bindGroupLayoutRelease = nullptr;
41
+
42
+ WGPUProcBufferCreateTexelView bufferCreateTexelView = nullptr;
43
+ WGPUProcBufferDestroy bufferDestroy = nullptr;
44
+ WGPUProcBufferGetConstMappedRange bufferGetConstMappedRange = nullptr;
45
+ WGPUProcBufferGetMappedRange bufferGetMappedRange = nullptr;
46
+ WGPUProcBufferGetMapState bufferGetMapState = nullptr;
47
+ WGPUProcBufferGetSize bufferGetSize = nullptr;
48
+ WGPUProcBufferGetUsage bufferGetUsage = nullptr;
49
+ WGPUProcBufferMapAsync bufferMapAsync = nullptr;
50
+ WGPUProcBufferReadMappedRange bufferReadMappedRange = nullptr;
51
+ WGPUProcBufferSetLabel bufferSetLabel = nullptr;
52
+ WGPUProcBufferUnmap bufferUnmap = nullptr;
53
+ WGPUProcBufferWriteMappedRange bufferWriteMappedRange = nullptr;
54
+ WGPUProcBufferAddRef bufferAddRef = nullptr;
55
+ WGPUProcBufferRelease bufferRelease = nullptr;
56
+
57
+ WGPUProcCommandBufferSetLabel commandBufferSetLabel = nullptr;
58
+ WGPUProcCommandBufferAddRef commandBufferAddRef = nullptr;
59
+ WGPUProcCommandBufferRelease commandBufferRelease = nullptr;
60
+
61
+ WGPUProcCommandEncoderBeginComputePass commandEncoderBeginComputePass = nullptr;
62
+ WGPUProcCommandEncoderBeginRenderPass commandEncoderBeginRenderPass = nullptr;
63
+ WGPUProcCommandEncoderClearBuffer commandEncoderClearBuffer = nullptr;
64
+ WGPUProcCommandEncoderCopyBufferToBuffer commandEncoderCopyBufferToBuffer = nullptr;
65
+ WGPUProcCommandEncoderCopyBufferToTexture commandEncoderCopyBufferToTexture = nullptr;
66
+ WGPUProcCommandEncoderCopyTextureToBuffer commandEncoderCopyTextureToBuffer = nullptr;
67
+ WGPUProcCommandEncoderCopyTextureToTexture commandEncoderCopyTextureToTexture = nullptr;
68
+ WGPUProcCommandEncoderFinish commandEncoderFinish = nullptr;
69
+ WGPUProcCommandEncoderInjectValidationError commandEncoderInjectValidationError = nullptr;
70
+ WGPUProcCommandEncoderInsertDebugMarker commandEncoderInsertDebugMarker = nullptr;
71
+ WGPUProcCommandEncoderPopDebugGroup commandEncoderPopDebugGroup = nullptr;
72
+ WGPUProcCommandEncoderPushDebugGroup commandEncoderPushDebugGroup = nullptr;
73
+ WGPUProcCommandEncoderResolveQuerySet commandEncoderResolveQuerySet = nullptr;
74
+ WGPUProcCommandEncoderSetLabel commandEncoderSetLabel = nullptr;
75
+ WGPUProcCommandEncoderWriteBuffer commandEncoderWriteBuffer = nullptr;
76
+ WGPUProcCommandEncoderWriteTimestamp commandEncoderWriteTimestamp = nullptr;
77
+ WGPUProcCommandEncoderAddRef commandEncoderAddRef = nullptr;
78
+ WGPUProcCommandEncoderRelease commandEncoderRelease = nullptr;
79
+
80
+ WGPUProcComputePassEncoderDispatchWorkgroups computePassEncoderDispatchWorkgroups = nullptr;
81
+ WGPUProcComputePassEncoderDispatchWorkgroupsIndirect computePassEncoderDispatchWorkgroupsIndirect = nullptr;
82
+ WGPUProcComputePassEncoderEnd computePassEncoderEnd = nullptr;
83
+ WGPUProcComputePassEncoderInsertDebugMarker computePassEncoderInsertDebugMarker = nullptr;
84
+ WGPUProcComputePassEncoderPopDebugGroup computePassEncoderPopDebugGroup = nullptr;
85
+ WGPUProcComputePassEncoderPushDebugGroup computePassEncoderPushDebugGroup = nullptr;
86
+ WGPUProcComputePassEncoderSetBindGroup computePassEncoderSetBindGroup = nullptr;
87
+ WGPUProcComputePassEncoderSetImmediates computePassEncoderSetImmediates = nullptr;
88
+ WGPUProcComputePassEncoderSetLabel computePassEncoderSetLabel = nullptr;
89
+ WGPUProcComputePassEncoderSetPipeline computePassEncoderSetPipeline = nullptr;
90
+ WGPUProcComputePassEncoderSetResourceTable computePassEncoderSetResourceTable = nullptr;
91
+ WGPUProcComputePassEncoderWriteTimestamp computePassEncoderWriteTimestamp = nullptr;
92
+ WGPUProcComputePassEncoderAddRef computePassEncoderAddRef = nullptr;
93
+ WGPUProcComputePassEncoderRelease computePassEncoderRelease = nullptr;
94
+
95
+ WGPUProcComputePipelineGetBindGroupLayout computePipelineGetBindGroupLayout = nullptr;
96
+ WGPUProcComputePipelineSetLabel computePipelineSetLabel = nullptr;
97
+ WGPUProcComputePipelineAddRef computePipelineAddRef = nullptr;
98
+ WGPUProcComputePipelineRelease computePipelineRelease = nullptr;
99
+
100
+ WGPUProcDawnDrmFormatCapabilitiesFreeMembers dawnDrmFormatCapabilitiesFreeMembers = nullptr;
101
+
102
+ WGPUProcDeviceCreateBindGroup deviceCreateBindGroup = nullptr;
103
+ WGPUProcDeviceCreateBindGroupLayout deviceCreateBindGroupLayout = nullptr;
104
+ WGPUProcDeviceCreateBuffer deviceCreateBuffer = nullptr;
105
+ WGPUProcDeviceCreateCommandEncoder deviceCreateCommandEncoder = nullptr;
106
+ WGPUProcDeviceCreateComputePipeline deviceCreateComputePipeline = nullptr;
107
+ WGPUProcDeviceCreateComputePipelineAsync deviceCreateComputePipelineAsync = nullptr;
108
+ WGPUProcDeviceCreateErrorBuffer deviceCreateErrorBuffer = nullptr;
109
+ WGPUProcDeviceCreateErrorComputePipeline deviceCreateErrorComputePipeline = nullptr;
110
+ WGPUProcDeviceCreateErrorExternalTexture deviceCreateErrorExternalTexture = nullptr;
111
+ WGPUProcDeviceCreateErrorRenderPipeline deviceCreateErrorRenderPipeline = nullptr;
112
+ WGPUProcDeviceCreateErrorShaderModule deviceCreateErrorShaderModule = nullptr;
113
+ WGPUProcDeviceCreateErrorTexture deviceCreateErrorTexture = nullptr;
114
+ WGPUProcDeviceCreateExternalTexture deviceCreateExternalTexture = nullptr;
115
+ WGPUProcDeviceCreatePipelineLayout deviceCreatePipelineLayout = nullptr;
116
+ WGPUProcDeviceCreateQuerySet deviceCreateQuerySet = nullptr;
117
+ WGPUProcDeviceCreateRenderBundleEncoder deviceCreateRenderBundleEncoder = nullptr;
118
+ WGPUProcDeviceCreateRenderPipeline deviceCreateRenderPipeline = nullptr;
119
+ WGPUProcDeviceCreateRenderPipelineAsync deviceCreateRenderPipelineAsync = nullptr;
120
+ WGPUProcDeviceCreateResourceTable deviceCreateResourceTable = nullptr;
121
+ WGPUProcDeviceCreateSampler deviceCreateSampler = nullptr;
122
+ WGPUProcDeviceCreateShaderModule deviceCreateShaderModule = nullptr;
123
+ WGPUProcDeviceCreateTexture deviceCreateTexture = nullptr;
124
+ WGPUProcDeviceDestroy deviceDestroy = nullptr;
125
+ WGPUProcDeviceForceLoss deviceForceLoss = nullptr;
126
+ WGPUProcDeviceGetAdapter deviceGetAdapter = nullptr;
127
+ WGPUProcDeviceGetAdapterInfo deviceGetAdapterInfo = nullptr;
128
+ WGPUProcDeviceGetAHardwareBufferProperties deviceGetAHardwareBufferProperties = nullptr;
129
+ WGPUProcDeviceGetFeatures deviceGetFeatures = nullptr;
130
+ WGPUProcDeviceGetLimits deviceGetLimits = nullptr;
131
+ WGPUProcDeviceGetLostFuture deviceGetLostFuture = nullptr;
132
+ WGPUProcDeviceGetQueue deviceGetQueue = nullptr;
133
+ WGPUProcDeviceHasFeature deviceHasFeature = nullptr;
134
+ WGPUProcDeviceImportSharedBufferMemory deviceImportSharedBufferMemory = nullptr;
135
+ WGPUProcDeviceImportSharedFence deviceImportSharedFence = nullptr;
136
+ WGPUProcDeviceImportSharedTextureMemory deviceImportSharedTextureMemory = nullptr;
137
+ WGPUProcDeviceInjectError deviceInjectError = nullptr;
138
+ WGPUProcDevicePopErrorScope devicePopErrorScope = nullptr;
139
+ WGPUProcDevicePushErrorScope devicePushErrorScope = nullptr;
140
+ WGPUProcDeviceSetLabel deviceSetLabel = nullptr;
141
+ WGPUProcDeviceSetLoggingCallback deviceSetLoggingCallback = nullptr;
142
+ WGPUProcDeviceTick deviceTick = nullptr;
143
+ WGPUProcDeviceValidateTextureDescriptor deviceValidateTextureDescriptor = nullptr;
144
+ WGPUProcDeviceAddRef deviceAddRef = nullptr;
145
+ WGPUProcDeviceRelease deviceRelease = nullptr;
146
+
147
+ WGPUProcExternalTextureDestroy externalTextureDestroy = nullptr;
148
+ WGPUProcExternalTextureExpire externalTextureExpire = nullptr;
149
+ WGPUProcExternalTextureRefresh externalTextureRefresh = nullptr;
150
+ WGPUProcExternalTextureSetLabel externalTextureSetLabel = nullptr;
151
+ WGPUProcExternalTextureAddRef externalTextureAddRef = nullptr;
152
+ WGPUProcExternalTextureRelease externalTextureRelease = nullptr;
153
+
154
+ WGPUProcInstanceCreateSurface instanceCreateSurface = nullptr;
155
+ WGPUProcInstanceGetWGSLLanguageFeatures instanceGetWGSLLanguageFeatures = nullptr;
156
+ WGPUProcInstanceHasWGSLLanguageFeature instanceHasWGSLLanguageFeature = nullptr;
157
+ WGPUProcInstanceProcessEvents instanceProcessEvents = nullptr;
158
+ WGPUProcInstanceRequestAdapter instanceRequestAdapter = nullptr;
159
+ WGPUProcInstanceWaitAny instanceWaitAny = nullptr;
160
+ WGPUProcInstanceAddRef instanceAddRef = nullptr;
161
+ WGPUProcInstanceRelease instanceRelease = nullptr;
162
+
163
+ WGPUProcPipelineLayoutSetLabel pipelineLayoutSetLabel = nullptr;
164
+ WGPUProcPipelineLayoutAddRef pipelineLayoutAddRef = nullptr;
165
+ WGPUProcPipelineLayoutRelease pipelineLayoutRelease = nullptr;
166
+
167
+ WGPUProcQuerySetDestroy querySetDestroy = nullptr;
168
+ WGPUProcQuerySetGetCount querySetGetCount = nullptr;
169
+ WGPUProcQuerySetGetType querySetGetType = nullptr;
170
+ WGPUProcQuerySetSetLabel querySetSetLabel = nullptr;
171
+ WGPUProcQuerySetAddRef querySetAddRef = nullptr;
172
+ WGPUProcQuerySetRelease querySetRelease = nullptr;
173
+
174
+ WGPUProcQueueCopyExternalTextureForBrowser queueCopyExternalTextureForBrowser = nullptr;
175
+ WGPUProcQueueCopyTextureForBrowser queueCopyTextureForBrowser = nullptr;
176
+ WGPUProcQueueOnSubmittedWorkDone queueOnSubmittedWorkDone = nullptr;
177
+ WGPUProcQueueSetLabel queueSetLabel = nullptr;
178
+ WGPUProcQueueSubmit queueSubmit = nullptr;
179
+ WGPUProcQueueWriteBuffer queueWriteBuffer = nullptr;
180
+ WGPUProcQueueWriteTexture queueWriteTexture = nullptr;
181
+ WGPUProcQueueAddRef queueAddRef = nullptr;
182
+ WGPUProcQueueRelease queueRelease = nullptr;
183
+
184
+ WGPUProcRenderBundleSetLabel renderBundleSetLabel = nullptr;
185
+ WGPUProcRenderBundleAddRef renderBundleAddRef = nullptr;
186
+ WGPUProcRenderBundleRelease renderBundleRelease = nullptr;
187
+
188
+ WGPUProcRenderBundleEncoderDraw renderBundleEncoderDraw = nullptr;
189
+ WGPUProcRenderBundleEncoderDrawIndexed renderBundleEncoderDrawIndexed = nullptr;
190
+ WGPUProcRenderBundleEncoderDrawIndexedIndirect renderBundleEncoderDrawIndexedIndirect = nullptr;
191
+ WGPUProcRenderBundleEncoderDrawIndirect renderBundleEncoderDrawIndirect = nullptr;
192
+ WGPUProcRenderBundleEncoderFinish renderBundleEncoderFinish = nullptr;
193
+ WGPUProcRenderBundleEncoderInsertDebugMarker renderBundleEncoderInsertDebugMarker = nullptr;
194
+ WGPUProcRenderBundleEncoderPopDebugGroup renderBundleEncoderPopDebugGroup = nullptr;
195
+ WGPUProcRenderBundleEncoderPushDebugGroup renderBundleEncoderPushDebugGroup = nullptr;
196
+ WGPUProcRenderBundleEncoderSetBindGroup renderBundleEncoderSetBindGroup = nullptr;
197
+ WGPUProcRenderBundleEncoderSetImmediates renderBundleEncoderSetImmediates = nullptr;
198
+ WGPUProcRenderBundleEncoderSetIndexBuffer renderBundleEncoderSetIndexBuffer = nullptr;
199
+ WGPUProcRenderBundleEncoderSetLabel renderBundleEncoderSetLabel = nullptr;
200
+ WGPUProcRenderBundleEncoderSetPipeline renderBundleEncoderSetPipeline = nullptr;
201
+ WGPUProcRenderBundleEncoderSetVertexBuffer renderBundleEncoderSetVertexBuffer = nullptr;
202
+ WGPUProcRenderBundleEncoderAddRef renderBundleEncoderAddRef = nullptr;
203
+ WGPUProcRenderBundleEncoderRelease renderBundleEncoderRelease = nullptr;
204
+
205
+ WGPUProcRenderPassEncoderBeginOcclusionQuery renderPassEncoderBeginOcclusionQuery = nullptr;
206
+ WGPUProcRenderPassEncoderDraw renderPassEncoderDraw = nullptr;
207
+ WGPUProcRenderPassEncoderDrawIndexed renderPassEncoderDrawIndexed = nullptr;
208
+ WGPUProcRenderPassEncoderDrawIndexedIndirect renderPassEncoderDrawIndexedIndirect = nullptr;
209
+ WGPUProcRenderPassEncoderDrawIndirect renderPassEncoderDrawIndirect = nullptr;
210
+ WGPUProcRenderPassEncoderEnd renderPassEncoderEnd = nullptr;
211
+ WGPUProcRenderPassEncoderEndOcclusionQuery renderPassEncoderEndOcclusionQuery = nullptr;
212
+ WGPUProcRenderPassEncoderExecuteBundles renderPassEncoderExecuteBundles = nullptr;
213
+ WGPUProcRenderPassEncoderInsertDebugMarker renderPassEncoderInsertDebugMarker = nullptr;
214
+ WGPUProcRenderPassEncoderMultiDrawIndexedIndirect renderPassEncoderMultiDrawIndexedIndirect = nullptr;
215
+ WGPUProcRenderPassEncoderMultiDrawIndirect renderPassEncoderMultiDrawIndirect = nullptr;
216
+ WGPUProcRenderPassEncoderPixelLocalStorageBarrier renderPassEncoderPixelLocalStorageBarrier = nullptr;
217
+ WGPUProcRenderPassEncoderPopDebugGroup renderPassEncoderPopDebugGroup = nullptr;
218
+ WGPUProcRenderPassEncoderPushDebugGroup renderPassEncoderPushDebugGroup = nullptr;
219
+ WGPUProcRenderPassEncoderSetBindGroup renderPassEncoderSetBindGroup = nullptr;
220
+ WGPUProcRenderPassEncoderSetBlendConstant renderPassEncoderSetBlendConstant = nullptr;
221
+ WGPUProcRenderPassEncoderSetImmediates renderPassEncoderSetImmediates = nullptr;
222
+ WGPUProcRenderPassEncoderSetIndexBuffer renderPassEncoderSetIndexBuffer = nullptr;
223
+ WGPUProcRenderPassEncoderSetLabel renderPassEncoderSetLabel = nullptr;
224
+ WGPUProcRenderPassEncoderSetPipeline renderPassEncoderSetPipeline = nullptr;
225
+ WGPUProcRenderPassEncoderSetResourceTable renderPassEncoderSetResourceTable = nullptr;
226
+ WGPUProcRenderPassEncoderSetScissorRect renderPassEncoderSetScissorRect = nullptr;
227
+ WGPUProcRenderPassEncoderSetStencilReference renderPassEncoderSetStencilReference = nullptr;
228
+ WGPUProcRenderPassEncoderSetVertexBuffer renderPassEncoderSetVertexBuffer = nullptr;
229
+ WGPUProcRenderPassEncoderSetViewport renderPassEncoderSetViewport = nullptr;
230
+ WGPUProcRenderPassEncoderWriteTimestamp renderPassEncoderWriteTimestamp = nullptr;
231
+ WGPUProcRenderPassEncoderAddRef renderPassEncoderAddRef = nullptr;
232
+ WGPUProcRenderPassEncoderRelease renderPassEncoderRelease = nullptr;
233
+
234
+ WGPUProcRenderPipelineGetBindGroupLayout renderPipelineGetBindGroupLayout = nullptr;
235
+ WGPUProcRenderPipelineSetLabel renderPipelineSetLabel = nullptr;
236
+ WGPUProcRenderPipelineAddRef renderPipelineAddRef = nullptr;
237
+ WGPUProcRenderPipelineRelease renderPipelineRelease = nullptr;
238
+
239
+ WGPUProcResourceTableDestroy resourceTableDestroy = nullptr;
240
+ WGPUProcResourceTableGetSize resourceTableGetSize = nullptr;
241
+ WGPUProcResourceTableInsert resourceTableInsert = nullptr;
242
+ WGPUProcResourceTableRemove resourceTableRemove = nullptr;
243
+ WGPUProcResourceTableSetLabel resourceTableSetLabel = nullptr;
244
+ WGPUProcResourceTableUpdate resourceTableUpdate = nullptr;
245
+ WGPUProcResourceTableAddRef resourceTableAddRef = nullptr;
246
+ WGPUProcResourceTableRelease resourceTableRelease = nullptr;
247
+
248
+ WGPUProcSamplerSetLabel samplerSetLabel = nullptr;
249
+ WGPUProcSamplerAddRef samplerAddRef = nullptr;
250
+ WGPUProcSamplerRelease samplerRelease = nullptr;
251
+
252
+ WGPUProcShaderModuleGetCompilationInfo shaderModuleGetCompilationInfo = nullptr;
253
+ WGPUProcShaderModuleSetLabel shaderModuleSetLabel = nullptr;
254
+ WGPUProcShaderModuleAddRef shaderModuleAddRef = nullptr;
255
+ WGPUProcShaderModuleRelease shaderModuleRelease = nullptr;
256
+
257
+ WGPUProcSharedBufferMemoryBeginAccess sharedBufferMemoryBeginAccess = nullptr;
258
+ WGPUProcSharedBufferMemoryCreateBuffer sharedBufferMemoryCreateBuffer = nullptr;
259
+ WGPUProcSharedBufferMemoryEndAccess sharedBufferMemoryEndAccess = nullptr;
260
+ WGPUProcSharedBufferMemoryGetProperties sharedBufferMemoryGetProperties = nullptr;
261
+ WGPUProcSharedBufferMemoryIsDeviceLost sharedBufferMemoryIsDeviceLost = nullptr;
262
+ WGPUProcSharedBufferMemorySetLabel sharedBufferMemorySetLabel = nullptr;
263
+ WGPUProcSharedBufferMemoryAddRef sharedBufferMemoryAddRef = nullptr;
264
+ WGPUProcSharedBufferMemoryRelease sharedBufferMemoryRelease = nullptr;
265
+
266
+ WGPUProcSharedBufferMemoryEndAccessStateFreeMembers sharedBufferMemoryEndAccessStateFreeMembers = nullptr;
267
+
268
+ WGPUProcSharedFenceExportInfo sharedFenceExportInfo = nullptr;
269
+ WGPUProcSharedFenceSetLabel sharedFenceSetLabel = nullptr;
270
+ WGPUProcSharedFenceAddRef sharedFenceAddRef = nullptr;
271
+ WGPUProcSharedFenceRelease sharedFenceRelease = nullptr;
272
+
273
+ WGPUProcSharedTextureMemoryBeginAccess sharedTextureMemoryBeginAccess = nullptr;
274
+ WGPUProcSharedTextureMemoryCreateTexture sharedTextureMemoryCreateTexture = nullptr;
275
+ WGPUProcSharedTextureMemoryEndAccess sharedTextureMemoryEndAccess = nullptr;
276
+ WGPUProcSharedTextureMemoryGetProperties sharedTextureMemoryGetProperties = nullptr;
277
+ WGPUProcSharedTextureMemoryIsDeviceLost sharedTextureMemoryIsDeviceLost = nullptr;
278
+ WGPUProcSharedTextureMemorySetLabel sharedTextureMemorySetLabel = nullptr;
279
+ WGPUProcSharedTextureMemoryAddRef sharedTextureMemoryAddRef = nullptr;
280
+ WGPUProcSharedTextureMemoryRelease sharedTextureMemoryRelease = nullptr;
281
+
282
+ WGPUProcSharedTextureMemoryEndAccessStateFreeMembers sharedTextureMemoryEndAccessStateFreeMembers = nullptr;
283
+
284
+ WGPUProcSupportedFeaturesFreeMembers supportedFeaturesFreeMembers = nullptr;
285
+
286
+ WGPUProcSupportedInstanceFeaturesFreeMembers supportedInstanceFeaturesFreeMembers = nullptr;
287
+
288
+ WGPUProcSupportedWGSLLanguageFeaturesFreeMembers supportedWGSLLanguageFeaturesFreeMembers = nullptr;
289
+
290
+ WGPUProcSurfaceConfigure surfaceConfigure = nullptr;
291
+ WGPUProcSurfaceGetCapabilities surfaceGetCapabilities = nullptr;
292
+ WGPUProcSurfaceGetCurrentTexture surfaceGetCurrentTexture = nullptr;
293
+ WGPUProcSurfacePresent surfacePresent = nullptr;
294
+ WGPUProcSurfaceSetLabel surfaceSetLabel = nullptr;
295
+ WGPUProcSurfaceUnconfigure surfaceUnconfigure = nullptr;
296
+ WGPUProcSurfaceAddRef surfaceAddRef = nullptr;
297
+ WGPUProcSurfaceRelease surfaceRelease = nullptr;
298
+
299
+ WGPUProcSurfaceCapabilitiesFreeMembers surfaceCapabilitiesFreeMembers = nullptr;
300
+
301
+ WGPUProcTexelBufferViewSetLabel texelBufferViewSetLabel = nullptr;
302
+ WGPUProcTexelBufferViewAddRef texelBufferViewAddRef = nullptr;
303
+ WGPUProcTexelBufferViewRelease texelBufferViewRelease = nullptr;
304
+
305
+ WGPUProcTextureCreateErrorView textureCreateErrorView = nullptr;
306
+ WGPUProcTextureCreateView textureCreateView = nullptr;
307
+ WGPUProcTextureDestroy textureDestroy = nullptr;
308
+ WGPUProcTextureGetDepthOrArrayLayers textureGetDepthOrArrayLayers = nullptr;
309
+ WGPUProcTextureGetDimension textureGetDimension = nullptr;
310
+ WGPUProcTextureGetFormat textureGetFormat = nullptr;
311
+ WGPUProcTextureGetHeight textureGetHeight = nullptr;
312
+ WGPUProcTextureGetMipLevelCount textureGetMipLevelCount = nullptr;
313
+ WGPUProcTextureGetSampleCount textureGetSampleCount = nullptr;
314
+ WGPUProcTextureGetTextureBindingViewDimension textureGetTextureBindingViewDimension = nullptr;
315
+ WGPUProcTextureGetUsage textureGetUsage = nullptr;
316
+ WGPUProcTextureGetWidth textureGetWidth = nullptr;
317
+ WGPUProcTextureSetLabel textureSetLabel = nullptr;
318
+ WGPUProcTextureSetOwnershipForMemoryDump textureSetOwnershipForMemoryDump = nullptr;
319
+ WGPUProcTextureAddRef textureAddRef = nullptr;
320
+ WGPUProcTextureRelease textureRelease = nullptr;
321
+
322
+ WGPUProcTextureViewSetLabel textureViewSetLabel = nullptr;
323
+ WGPUProcTextureViewAddRef textureViewAddRef = nullptr;
324
+ WGPUProcTextureViewRelease textureViewRelease = nullptr;
325
+
326
+
327
+ } DawnProcTable;
328
+
329
+ #endif // DAWN_DAWN_PROC_TABLE_H_