react-native-wgpu 0.1.19 → 0.1.21

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 (54) hide show
  1. package/README.md +9 -63
  2. package/android/CMakeLists.txt +15 -1
  3. package/android/build.gradle +1 -1
  4. package/android/cpp/AndroidPlatformContext.h +1 -1
  5. package/apple/ApplePlatformContext.mm +11 -3
  6. package/apple/MetalView.h +2 -2
  7. package/apple/MetalView.mm +12 -0
  8. package/apple/RNWGUIKit.h +11 -0
  9. package/apple/WebGPUModule.mm +3 -12
  10. package/apple/WebGPUViewManager.mm +3 -2
  11. package/cpp/dawn/dawn_proc.h +50 -0
  12. package/cpp/dawn/dawn_proc_table.h +300 -0
  13. package/cpp/dawn/dawn_thread_dispatch_proc.h +47 -0
  14. package/cpp/dawn/native/D3D11Backend.h +64 -0
  15. package/cpp/dawn/native/D3D12Backend.h +68 -0
  16. package/cpp/dawn/native/D3DBackend.h +59 -0
  17. package/cpp/dawn/native/DawnNative.h +313 -0
  18. package/cpp/dawn/native/MetalBackend.h +55 -0
  19. package/cpp/dawn/native/NullBackend.h +39 -0
  20. package/cpp/dawn/native/OpenGLBackend.h +82 -0
  21. package/cpp/dawn/native/VulkanBackend.h +183 -0
  22. package/cpp/dawn/native/dawn_native_export.h +49 -0
  23. package/cpp/dawn/platform/DawnPlatform.h +165 -0
  24. package/cpp/dawn/platform/dawn_platform_export.h +49 -0
  25. package/cpp/dawn/webgpu_cpp_print.h +2484 -0
  26. package/cpp/rnwgpu/api/GPU.h +1 -1
  27. package/cpp/rnwgpu/api/GPUCanvasContext.cpp +4 -0
  28. package/cpp/rnwgpu/api/GPUCanvasContext.h +0 -16
  29. package/cpp/webgpu/webgpu_glfw.h +71 -0
  30. package/lib/commonjs/NativeWebGPUModule.js.map +1 -1
  31. package/lib/module/NativeWebGPUModule.js.map +1 -1
  32. package/lib/typescript/src/NativeWebGPUModule.d.ts +0 -1
  33. package/lib/typescript/src/NativeWebGPUModule.d.ts.map +1 -1
  34. package/libs/android/arm64-v8a/libwebgpu_dawn.so +0 -0
  35. package/libs/android/armeabi-v7a/libwebgpu_dawn.so +0 -0
  36. package/libs/android/x86/libwebgpu_dawn.so +0 -0
  37. package/libs/android/x86_64/libwebgpu_dawn.so +0 -0
  38. package/libs/apple/arm64_iphoneos/libwebgpu_dawn.a +0 -0
  39. package/libs/apple/arm64_iphonesimulator/libwebgpu_dawn.a +0 -0
  40. package/libs/apple/arm64_xros/libwebgpu_dawn.a +0 -0
  41. package/libs/apple/arm64_xrsimulator/libwebgpu_dawn.a +0 -0
  42. package/libs/apple/iphonesimulator/libwebgpu_dawn.a +0 -0
  43. package/libs/apple/libwebgpu_dawn.xcframework/Info.plist +10 -10
  44. package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64/libwebgpu_dawn.a +0 -0
  45. package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64_x86_64-simulator/libwebgpu_dawn.a +0 -0
  46. package/libs/apple/libwebgpu_dawn.xcframework/macos-arm64_x86_64/libwebgpu_dawn.a +0 -0
  47. package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64/libwebgpu_dawn.a +0 -0
  48. package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64-simulator/libwebgpu_dawn.a +0 -0
  49. package/libs/apple/universal_macosx/libwebgpu_dawn.a +0 -0
  50. package/libs/apple/x86_64_iphonesimulator/libwebgpu_dawn.a +0 -0
  51. package/package.json +1 -1
  52. package/react-native-wgpu.podspec +1 -1
  53. package/src/NativeWebGPUModule.ts +0 -1
  54. package/cpp/rnwgpu/api/WebGPUCanvasContextFactory.h +0 -59
package/README.md CHANGED
@@ -11,15 +11,21 @@ Please note that the package name is `react-native-wgpu`.
11
11
  npm install react-native-wgpu
12
12
  ```
13
13
 
14
- Below are some examples from the [example app](/package/example/).
14
+ Below are some examples from the [example app](/apps/example/).
15
15
 
16
16
  https://github.com/user-attachments/assets/116a41b2-2cf8-49f1-9f16-a5c83637c198
17
17
 
18
18
  Starting from `r168`, Three.js runs out of the box with React Native WebGPU.
19
- You need to have a slight modification of [the metro config](/package/example/metro.config.js) to resolve Three.js to the WebGPU build.
19
+ You need to have a slight modification of [the metro config](/apps/example/metro.config.js) to resolve Three.js to the WebGPU build.
20
+ We also support [three-fiber](/apps/example/src/ThreeJS/Fiber.tsx).
21
+ For model loading, we also need [the following polyfill](/apps/example/src/App.tsx#29).
20
22
 
21
23
  https://github.com/user-attachments/assets/5b49ef63-0a3c-4679-aeb5-e4b4dddfcc1d
22
24
 
25
+ We also provide prebuilt binaries for visionOS and macOS.
26
+
27
+ https://github.com/user-attachments/assets/2d5c618e-5b15-4cef-8558-d4ddf8c70667
28
+
23
29
  ## Usage
24
30
 
25
31
  Currently we recommend to use the `useCanvasEffect` to access the WebGPU context.
@@ -123,13 +129,7 @@ const style = StyleSheet.create({
123
129
 
124
130
  ## Example App
125
131
 
126
- To run the example app you first need to build Dawn.
127
-
128
- ```sh
129
- $ git submodule update --init
130
- $ cd package && yarn
131
- $ yarn build-dawn
132
- ```
132
+ To run the example app you first need to [build Dawn or download the prebuilt binaries](#building-dawn).
133
133
 
134
134
  From there you will be able to run the example app properly.
135
135
 
@@ -184,57 +184,3 @@ device.queue.copyExternalImageToTexture(
184
184
  [imageBitmap.width, imageBitmap.height],
185
185
  );
186
186
  ```
187
-
188
- ## Troubleshooting
189
-
190
- ### iOS
191
-
192
- To run the React Native WebGPU project on the iOS simulator, you need to disable the Metal validation API.
193
- In "Edit Scheme," uncheck "Metal Validation."
194
-
195
- <img width="1052" alt="Uncheck 'Metal Validation'" src="https://github.com/user-attachments/assets/2676e5cc-e351-4a97-bdc8-22cbd7df2ef2">
196
-
197
- ### Android
198
-
199
- On an Android simulator, a CPU emulation layer is used which may result in very slow performance.
200
-
201
- ## Library Development
202
-
203
- Make sure to check out the submodules:
204
-
205
- ```
206
- git submodule update --init
207
- ```
208
-
209
- Make sure you have all the tools required for building the Skia libraries (Android Studio, XCode, Ninja, CMake, Android NDK/build tools).
210
-
211
- ### Building
212
-
213
- * `cd packages/webgpu && yarn`
214
- * `yarn build-dawn`
215
-
216
- ### Upgrading
217
-
218
- 1. `git submodule update --remote`
219
- 2. `yarn clean-dawn`
220
- 3. `yarn build-dawn`
221
-
222
- ### Codegen
223
-
224
- * `cd packages/webgpu && yarn codegen`
225
-
226
- ### Testing
227
-
228
- In the `package` folder, to run the test against Chrome for reference:
229
-
230
- ```
231
- yarn test:ref
232
- ```
233
-
234
- To run the e2e test, open the example app on the e2e screen.
235
- By default, it will try to connect to a localhost test server.
236
- If you want to run the test suite on a physical device, you can modify the address [here](/package/example/src/useClient.ts#L4).
237
-
238
- ```
239
- yarn test
240
- ```
@@ -82,7 +82,20 @@ add_library(webgpu_dawn SHARED IMPORTED)
82
82
  set_property(TARGET webgpu_dawn PROPERTY IMPORTED_LOCATION "${WEBGPU_LIBS_PATH}/libwebgpu_dawn.so")
83
83
 
84
84
  # Link
85
- target_link_libraries(
85
+ if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
86
+ target_link_libraries(
87
+ ${PACKAGE_NAME}
88
+ ${FBJNI_LIBRARY}
89
+ log
90
+ jnigraphics
91
+ android
92
+ fbjni::fbjni
93
+ ReactAndroid::jsi
94
+ ReactAndroid::reactnative
95
+ webgpu_dawn
96
+ )
97
+ else()
98
+ target_link_libraries(
86
99
  ${PACKAGE_NAME}
87
100
  ${FBJNI_LIBRARY}
88
101
  log
@@ -93,3 +106,4 @@ target_link_libraries(
93
106
  ReactAndroid::reactnativejni
94
107
  webgpu_dawn
95
108
  )
109
+ endif()
@@ -47,7 +47,7 @@ static def findNodeModules(baseDir) {
47
47
  basePath = basePath.getParent()
48
48
  }
49
49
 
50
- throw new GradleException("react-native-filament: Failed to find node_modules/ path!")
50
+ throw new GradleException("react-native-wgpu: Failed to find node_modules/ path!")
51
51
  }
52
52
 
53
53
  def nodeModules = findNodeModules(projectDir)
@@ -34,7 +34,7 @@ public:
34
34
 
35
35
  wgpu::Surface makeSurface(wgpu::Instance instance, void *window, int width,
36
36
  int height) override {
37
- wgpu::SurfaceDescriptorFromAndroidNativeWindow androidSurfaceDesc;
37
+ wgpu::SurfaceSourceAndroidNativeWindow androidSurfaceDesc;
38
38
  androidSurfaceDesc.window = reinterpret_cast<ANativeWindow *>(window);
39
39
  wgpu::SurfaceDescriptor surfaceDescriptor;
40
40
  surfaceDescriptor.nextInChain = &androidSurfaceDesc;
@@ -11,7 +11,7 @@
11
11
 
12
12
  namespace rnwgpu {
13
13
 
14
- void isSimulatorWithAPIValidation() {
14
+ void checkIfUsingSimulatorWithAPIValidation() {
15
15
  #if TARGET_OS_SIMULATOR
16
16
  NSDictionary *environment = [[NSProcessInfo processInfo] environment];
17
17
  NSString *metalDeviceWrapperType = environment[@"METAL_DEVICE_WRAPPER_TYPE"];
@@ -25,12 +25,12 @@ void isSimulatorWithAPIValidation() {
25
25
  #endif
26
26
  }
27
27
 
28
- ApplePlatformContext::ApplePlatformContext() { isSimulatorWithAPIValidation(); }
28
+ ApplePlatformContext::ApplePlatformContext() { checkIfUsingSimulatorWithAPIValidation(); }
29
29
 
30
30
  wgpu::Surface ApplePlatformContext::makeSurface(wgpu::Instance instance,
31
31
  void *surface, int width,
32
32
  int height) {
33
- wgpu::SurfaceDescriptorFromMetalLayer metalSurfaceDesc;
33
+ wgpu::SurfaceSourceMetalLayer metalSurfaceDesc;
34
34
  metalSurfaceDesc.layer = surface;
35
35
  wgpu::SurfaceDescriptor surfaceDescriptor;
36
36
  surfaceDescriptor.nextInChain = &metalSurfaceDesc;
@@ -50,12 +50,20 @@ ImageData ApplePlatformContext::createImageBitmap(std::string blobId,
50
50
  throw std::runtime_error("Couldn't retrive blob data");
51
51
  }
52
52
 
53
+ #if !TARGET_OS_OSX
53
54
  UIImage *image = [UIImage imageWithData:blobData];
55
+ #else
56
+ NSImage *image = [[NSImage alloc] initWithData:blobData];
57
+ #endif
54
58
  if (!image) {
55
59
  throw std::runtime_error("Couldn't decode image");
56
60
  }
57
61
 
62
+ #if !TARGET_OS_OSX
58
63
  CGImageRef cgImage = image.CGImage;
64
+ #else
65
+ CGImageRef cgImage = [image CGImageForProposedRect:NULL context:NULL hints:NULL];
66
+ #endif
59
67
  size_t width = CGImageGetWidth(cgImage);
60
68
  size_t height = CGImageGetHeight(cgImage);
61
69
  size_t bitsPerComponent = 8;
package/apple/MetalView.h CHANGED
@@ -1,9 +1,9 @@
1
1
  #pragma once
2
2
 
3
3
  #import "WebGPUModule.h"
4
- #import <UIKit/UIKit.h>
4
+ #import "RNWGUIKit.h"
5
5
 
6
- @interface MetalView : UIView
6
+ @interface MetalView : RNWGPlatformView
7
7
 
8
8
  @property NSNumber *contextId;
9
9
 
@@ -9,9 +9,21 @@
9
9
  BOOL _isConfigured;
10
10
  }
11
11
 
12
+ #if !TARGET_OS_OSX
12
13
  + (Class)layerClass {
13
14
  return [CAMetalLayer class];
14
15
  }
16
+ #else // !TARGET_OS_OSX
17
+ - (instancetype)init
18
+ {
19
+ self = [super init];
20
+ if (self) {
21
+ self.wantsLayer = true;
22
+ self.layer = [CAMetalLayer layer];
23
+ }
24
+ return self;
25
+ }
26
+ #endif // !TARGET_OS_OSX
15
27
 
16
28
  - (void)configure {
17
29
  auto size = self.frame.size;
@@ -0,0 +1,11 @@
1
+ #if !TARGET_OS_OSX
2
+ #import <UIKit/UIKit.h>
3
+ #else
4
+ #import <Appkit/Appkit.h>
5
+ #endif
6
+
7
+ #if !TARGET_OS_OSX
8
+ typedef UIView RNWGPlatformView;
9
+ #else
10
+ typedef NSView RNWGPlatformView;
11
+ #endif
@@ -46,19 +46,19 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
46
46
  }
47
47
  RCTCxxBridge *cxxBridge = (RCTCxxBridge *)[RCTBridge currentBridge];
48
48
  if (!cxxBridge.runtime) {
49
- NSLog(@"Failed to install react-native-filament: RCTBridge is not a "
49
+ NSLog(@"Failed to install react-native-wgpu: RCTBridge is not a "
50
50
  @"RCTCxxBridge!");
51
51
  return [NSNumber numberWithBool:NO];
52
52
  }
53
53
 
54
54
  jsi::Runtime *runtime = (jsi::Runtime *)cxxBridge.runtime;
55
55
  if (!runtime) {
56
- NSLog(@"Failed to install react-native-filament: jsi::Runtime* was null!");
56
+ NSLog(@"Failed to install react-native-wgpu: jsi::Runtime* was null!");
57
57
  return [NSNumber numberWithBool:NO];
58
58
  }
59
59
  std::shared_ptr<react::CallInvoker> jsInvoker = cxxBridge.jsCallInvoker;
60
60
  if (!jsInvoker) {
61
- NSLog(@"Failed to install react-native-filament: react::CallInvoker was "
61
+ NSLog(@"Failed to install react-native-wgpu: react::CallInvoker was "
62
62
  @"null!");
63
63
  return [NSNumber numberWithBool:NO];
64
64
  }
@@ -74,15 +74,6 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
74
74
  return @true;
75
75
  }
76
76
 
77
- // RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(createSurfaceContext
78
- // : (double)contextId) {
79
- // int contextIdInt = contextId;
80
- // RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge;
81
- // auto runtime = (jsi::Runtime *)cxxBridge.runtime;
82
-
83
- // return @true;
84
- // }
85
-
86
77
  #ifdef RCT_NEW_ARCH_ENABLED
87
78
  - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
88
79
  (const facebook::react::ObjCTurboModule::InitParams &)params {
@@ -1,5 +1,6 @@
1
1
  #import "MetalView.h"
2
2
  #import "RCTBridge.h"
3
+ #import "RNWGUIKit.h"
3
4
  #import "WebGPUModule.h"
4
5
  #import <React/RCTUIManager.h>
5
6
  #import <React/RCTViewManager.h>
@@ -11,11 +12,11 @@
11
12
 
12
13
  RCT_EXPORT_MODULE(WebGPUView)
13
14
 
14
- - (UIView *)view {
15
+ - (RNWGPlatformView *)view {
15
16
  return [MetalView new];
16
17
  }
17
18
 
18
- RCT_CUSTOM_VIEW_PROPERTY(contextId, NSNumber, UIView) {
19
+ RCT_CUSTOM_VIEW_PROPERTY(contextId, NSNumber, RNWGPlatformView) {
19
20
  NSNumber *contextId = [RCTConvert NSNumber:json];
20
21
  [(MetalView *)view setContextId:contextId];
21
22
  }
@@ -0,0 +1,50 @@
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
+ #ifdef __cplusplus
47
+ } // extern "C"
48
+ #endif
49
+
50
+ #endif // INCLUDE_DAWN_DAWN_PROC_H_
@@ -0,0 +1,300 @@
1
+
2
+ #ifndef DAWN_DAWN_PROC_TABLE_H_
3
+ #define DAWN_DAWN_PROC_TABLE_H_
4
+
5
+ #include "webgpu/webgpu.h"
6
+
7
+ // Note: Often allocated as a static global. Do not add a complex constructor.
8
+ typedef struct DawnProcTable {
9
+ WGPUProcAdapterInfoFreeMembers adapterInfoFreeMembers;
10
+ WGPUProcAdapterPropertiesMemoryHeapsFreeMembers adapterPropertiesMemoryHeapsFreeMembers;
11
+ WGPUProcCreateInstance createInstance;
12
+ WGPUProcDrmFormatCapabilitiesFreeMembers drmFormatCapabilitiesFreeMembers;
13
+ WGPUProcGetInstanceFeatures getInstanceFeatures;
14
+ WGPUProcGetProcAddress getProcAddress;
15
+ WGPUProcSharedBufferMemoryEndAccessStateFreeMembers sharedBufferMemoryEndAccessStateFreeMembers;
16
+ WGPUProcSharedTextureMemoryEndAccessStateFreeMembers sharedTextureMemoryEndAccessStateFreeMembers;
17
+ WGPUProcSurfaceCapabilitiesFreeMembers surfaceCapabilitiesFreeMembers;
18
+
19
+ WGPUProcAdapterCreateDevice adapterCreateDevice;
20
+ WGPUProcAdapterEnumerateFeatures adapterEnumerateFeatures;
21
+ WGPUProcAdapterGetFormatCapabilities adapterGetFormatCapabilities;
22
+ WGPUProcAdapterGetInfo adapterGetInfo;
23
+ WGPUProcAdapterGetInstance adapterGetInstance;
24
+ WGPUProcAdapterGetLimits adapterGetLimits;
25
+ WGPUProcAdapterHasFeature adapterHasFeature;
26
+ WGPUProcAdapterRequestDevice adapterRequestDevice;
27
+ WGPUProcAdapterRequestDevice2 adapterRequestDevice2;
28
+ WGPUProcAdapterRequestDeviceF adapterRequestDeviceF;
29
+ WGPUProcAdapterAddRef adapterAddRef;
30
+ WGPUProcAdapterRelease adapterRelease;
31
+
32
+ WGPUProcBindGroupSetLabel bindGroupSetLabel;
33
+ WGPUProcBindGroupAddRef bindGroupAddRef;
34
+ WGPUProcBindGroupRelease bindGroupRelease;
35
+
36
+ WGPUProcBindGroupLayoutSetLabel bindGroupLayoutSetLabel;
37
+ WGPUProcBindGroupLayoutAddRef bindGroupLayoutAddRef;
38
+ WGPUProcBindGroupLayoutRelease bindGroupLayoutRelease;
39
+
40
+ WGPUProcBufferDestroy bufferDestroy;
41
+ WGPUProcBufferGetConstMappedRange bufferGetConstMappedRange;
42
+ WGPUProcBufferGetMapState bufferGetMapState;
43
+ WGPUProcBufferGetMappedRange bufferGetMappedRange;
44
+ WGPUProcBufferGetSize bufferGetSize;
45
+ WGPUProcBufferGetUsage bufferGetUsage;
46
+ WGPUProcBufferMapAsync bufferMapAsync;
47
+ WGPUProcBufferMapAsync2 bufferMapAsync2;
48
+ WGPUProcBufferMapAsyncF bufferMapAsyncF;
49
+ WGPUProcBufferSetLabel bufferSetLabel;
50
+ WGPUProcBufferUnmap bufferUnmap;
51
+ WGPUProcBufferAddRef bufferAddRef;
52
+ WGPUProcBufferRelease bufferRelease;
53
+
54
+ WGPUProcCommandBufferSetLabel commandBufferSetLabel;
55
+ WGPUProcCommandBufferAddRef commandBufferAddRef;
56
+ WGPUProcCommandBufferRelease commandBufferRelease;
57
+
58
+ WGPUProcCommandEncoderBeginComputePass commandEncoderBeginComputePass;
59
+ WGPUProcCommandEncoderBeginRenderPass commandEncoderBeginRenderPass;
60
+ WGPUProcCommandEncoderClearBuffer commandEncoderClearBuffer;
61
+ WGPUProcCommandEncoderCopyBufferToBuffer commandEncoderCopyBufferToBuffer;
62
+ WGPUProcCommandEncoderCopyBufferToTexture commandEncoderCopyBufferToTexture;
63
+ WGPUProcCommandEncoderCopyTextureToBuffer commandEncoderCopyTextureToBuffer;
64
+ WGPUProcCommandEncoderCopyTextureToTexture commandEncoderCopyTextureToTexture;
65
+ WGPUProcCommandEncoderFinish commandEncoderFinish;
66
+ WGPUProcCommandEncoderInjectValidationError commandEncoderInjectValidationError;
67
+ WGPUProcCommandEncoderInsertDebugMarker commandEncoderInsertDebugMarker;
68
+ WGPUProcCommandEncoderPopDebugGroup commandEncoderPopDebugGroup;
69
+ WGPUProcCommandEncoderPushDebugGroup commandEncoderPushDebugGroup;
70
+ WGPUProcCommandEncoderResolveQuerySet commandEncoderResolveQuerySet;
71
+ WGPUProcCommandEncoderSetLabel commandEncoderSetLabel;
72
+ WGPUProcCommandEncoderWriteBuffer commandEncoderWriteBuffer;
73
+ WGPUProcCommandEncoderWriteTimestamp commandEncoderWriteTimestamp;
74
+ WGPUProcCommandEncoderAddRef commandEncoderAddRef;
75
+ WGPUProcCommandEncoderRelease commandEncoderRelease;
76
+
77
+ WGPUProcComputePassEncoderDispatchWorkgroups computePassEncoderDispatchWorkgroups;
78
+ WGPUProcComputePassEncoderDispatchWorkgroupsIndirect computePassEncoderDispatchWorkgroupsIndirect;
79
+ WGPUProcComputePassEncoderEnd computePassEncoderEnd;
80
+ WGPUProcComputePassEncoderInsertDebugMarker computePassEncoderInsertDebugMarker;
81
+ WGPUProcComputePassEncoderPopDebugGroup computePassEncoderPopDebugGroup;
82
+ WGPUProcComputePassEncoderPushDebugGroup computePassEncoderPushDebugGroup;
83
+ WGPUProcComputePassEncoderSetBindGroup computePassEncoderSetBindGroup;
84
+ WGPUProcComputePassEncoderSetLabel computePassEncoderSetLabel;
85
+ WGPUProcComputePassEncoderSetPipeline computePassEncoderSetPipeline;
86
+ WGPUProcComputePassEncoderWriteTimestamp computePassEncoderWriteTimestamp;
87
+ WGPUProcComputePassEncoderAddRef computePassEncoderAddRef;
88
+ WGPUProcComputePassEncoderRelease computePassEncoderRelease;
89
+
90
+ WGPUProcComputePipelineGetBindGroupLayout computePipelineGetBindGroupLayout;
91
+ WGPUProcComputePipelineSetLabel computePipelineSetLabel;
92
+ WGPUProcComputePipelineAddRef computePipelineAddRef;
93
+ WGPUProcComputePipelineRelease computePipelineRelease;
94
+
95
+ WGPUProcDeviceCreateBindGroup deviceCreateBindGroup;
96
+ WGPUProcDeviceCreateBindGroupLayout deviceCreateBindGroupLayout;
97
+ WGPUProcDeviceCreateBuffer deviceCreateBuffer;
98
+ WGPUProcDeviceCreateCommandEncoder deviceCreateCommandEncoder;
99
+ WGPUProcDeviceCreateComputePipeline deviceCreateComputePipeline;
100
+ WGPUProcDeviceCreateComputePipelineAsync deviceCreateComputePipelineAsync;
101
+ WGPUProcDeviceCreateComputePipelineAsync2 deviceCreateComputePipelineAsync2;
102
+ WGPUProcDeviceCreateComputePipelineAsyncF deviceCreateComputePipelineAsyncF;
103
+ WGPUProcDeviceCreateErrorBuffer deviceCreateErrorBuffer;
104
+ WGPUProcDeviceCreateErrorExternalTexture deviceCreateErrorExternalTexture;
105
+ WGPUProcDeviceCreateErrorShaderModule deviceCreateErrorShaderModule;
106
+ WGPUProcDeviceCreateErrorTexture deviceCreateErrorTexture;
107
+ WGPUProcDeviceCreateExternalTexture deviceCreateExternalTexture;
108
+ WGPUProcDeviceCreatePipelineLayout deviceCreatePipelineLayout;
109
+ WGPUProcDeviceCreateQuerySet deviceCreateQuerySet;
110
+ WGPUProcDeviceCreateRenderBundleEncoder deviceCreateRenderBundleEncoder;
111
+ WGPUProcDeviceCreateRenderPipeline deviceCreateRenderPipeline;
112
+ WGPUProcDeviceCreateRenderPipelineAsync deviceCreateRenderPipelineAsync;
113
+ WGPUProcDeviceCreateRenderPipelineAsync2 deviceCreateRenderPipelineAsync2;
114
+ WGPUProcDeviceCreateRenderPipelineAsyncF deviceCreateRenderPipelineAsyncF;
115
+ WGPUProcDeviceCreateSampler deviceCreateSampler;
116
+ WGPUProcDeviceCreateShaderModule deviceCreateShaderModule;
117
+ WGPUProcDeviceCreateTexture deviceCreateTexture;
118
+ WGPUProcDeviceDestroy deviceDestroy;
119
+ WGPUProcDeviceEnumerateFeatures deviceEnumerateFeatures;
120
+ WGPUProcDeviceForceLoss deviceForceLoss;
121
+ WGPUProcDeviceGetAHardwareBufferProperties deviceGetAHardwareBufferProperties;
122
+ WGPUProcDeviceGetAdapter deviceGetAdapter;
123
+ WGPUProcDeviceGetLimits deviceGetLimits;
124
+ WGPUProcDeviceGetQueue deviceGetQueue;
125
+ WGPUProcDeviceHasFeature deviceHasFeature;
126
+ WGPUProcDeviceImportSharedBufferMemory deviceImportSharedBufferMemory;
127
+ WGPUProcDeviceImportSharedFence deviceImportSharedFence;
128
+ WGPUProcDeviceImportSharedTextureMemory deviceImportSharedTextureMemory;
129
+ WGPUProcDeviceInjectError deviceInjectError;
130
+ WGPUProcDevicePopErrorScope devicePopErrorScope;
131
+ WGPUProcDevicePopErrorScope2 devicePopErrorScope2;
132
+ WGPUProcDevicePopErrorScopeF devicePopErrorScopeF;
133
+ WGPUProcDevicePushErrorScope devicePushErrorScope;
134
+ WGPUProcDeviceSetDeviceLostCallback deviceSetDeviceLostCallback;
135
+ WGPUProcDeviceSetLabel deviceSetLabel;
136
+ WGPUProcDeviceSetLoggingCallback deviceSetLoggingCallback;
137
+ WGPUProcDeviceSetUncapturedErrorCallback deviceSetUncapturedErrorCallback;
138
+ WGPUProcDeviceTick deviceTick;
139
+ WGPUProcDeviceValidateTextureDescriptor deviceValidateTextureDescriptor;
140
+ WGPUProcDeviceAddRef deviceAddRef;
141
+ WGPUProcDeviceRelease deviceRelease;
142
+
143
+ WGPUProcExternalTextureDestroy externalTextureDestroy;
144
+ WGPUProcExternalTextureExpire externalTextureExpire;
145
+ WGPUProcExternalTextureRefresh externalTextureRefresh;
146
+ WGPUProcExternalTextureSetLabel externalTextureSetLabel;
147
+ WGPUProcExternalTextureAddRef externalTextureAddRef;
148
+ WGPUProcExternalTextureRelease externalTextureRelease;
149
+
150
+ WGPUProcInstanceCreateSurface instanceCreateSurface;
151
+ WGPUProcInstanceEnumerateWGSLLanguageFeatures instanceEnumerateWGSLLanguageFeatures;
152
+ WGPUProcInstanceHasWGSLLanguageFeature instanceHasWGSLLanguageFeature;
153
+ WGPUProcInstanceProcessEvents instanceProcessEvents;
154
+ WGPUProcInstanceRequestAdapter instanceRequestAdapter;
155
+ WGPUProcInstanceRequestAdapter2 instanceRequestAdapter2;
156
+ WGPUProcInstanceRequestAdapterF instanceRequestAdapterF;
157
+ WGPUProcInstanceWaitAny instanceWaitAny;
158
+ WGPUProcInstanceAddRef instanceAddRef;
159
+ WGPUProcInstanceRelease instanceRelease;
160
+
161
+ WGPUProcPipelineLayoutSetLabel pipelineLayoutSetLabel;
162
+ WGPUProcPipelineLayoutAddRef pipelineLayoutAddRef;
163
+ WGPUProcPipelineLayoutRelease pipelineLayoutRelease;
164
+
165
+ WGPUProcQuerySetDestroy querySetDestroy;
166
+ WGPUProcQuerySetGetCount querySetGetCount;
167
+ WGPUProcQuerySetGetType querySetGetType;
168
+ WGPUProcQuerySetSetLabel querySetSetLabel;
169
+ WGPUProcQuerySetAddRef querySetAddRef;
170
+ WGPUProcQuerySetRelease querySetRelease;
171
+
172
+ WGPUProcQueueCopyExternalTextureForBrowser queueCopyExternalTextureForBrowser;
173
+ WGPUProcQueueCopyTextureForBrowser queueCopyTextureForBrowser;
174
+ WGPUProcQueueOnSubmittedWorkDone queueOnSubmittedWorkDone;
175
+ WGPUProcQueueOnSubmittedWorkDone2 queueOnSubmittedWorkDone2;
176
+ WGPUProcQueueOnSubmittedWorkDoneF queueOnSubmittedWorkDoneF;
177
+ WGPUProcQueueSetLabel queueSetLabel;
178
+ WGPUProcQueueSubmit queueSubmit;
179
+ WGPUProcQueueWriteBuffer queueWriteBuffer;
180
+ WGPUProcQueueWriteTexture queueWriteTexture;
181
+ WGPUProcQueueAddRef queueAddRef;
182
+ WGPUProcQueueRelease queueRelease;
183
+
184
+ WGPUProcRenderBundleSetLabel renderBundleSetLabel;
185
+ WGPUProcRenderBundleAddRef renderBundleAddRef;
186
+ WGPUProcRenderBundleRelease renderBundleRelease;
187
+
188
+ WGPUProcRenderBundleEncoderDraw renderBundleEncoderDraw;
189
+ WGPUProcRenderBundleEncoderDrawIndexed renderBundleEncoderDrawIndexed;
190
+ WGPUProcRenderBundleEncoderDrawIndexedIndirect renderBundleEncoderDrawIndexedIndirect;
191
+ WGPUProcRenderBundleEncoderDrawIndirect renderBundleEncoderDrawIndirect;
192
+ WGPUProcRenderBundleEncoderFinish renderBundleEncoderFinish;
193
+ WGPUProcRenderBundleEncoderInsertDebugMarker renderBundleEncoderInsertDebugMarker;
194
+ WGPUProcRenderBundleEncoderPopDebugGroup renderBundleEncoderPopDebugGroup;
195
+ WGPUProcRenderBundleEncoderPushDebugGroup renderBundleEncoderPushDebugGroup;
196
+ WGPUProcRenderBundleEncoderSetBindGroup renderBundleEncoderSetBindGroup;
197
+ WGPUProcRenderBundleEncoderSetIndexBuffer renderBundleEncoderSetIndexBuffer;
198
+ WGPUProcRenderBundleEncoderSetLabel renderBundleEncoderSetLabel;
199
+ WGPUProcRenderBundleEncoderSetPipeline renderBundleEncoderSetPipeline;
200
+ WGPUProcRenderBundleEncoderSetVertexBuffer renderBundleEncoderSetVertexBuffer;
201
+ WGPUProcRenderBundleEncoderAddRef renderBundleEncoderAddRef;
202
+ WGPUProcRenderBundleEncoderRelease renderBundleEncoderRelease;
203
+
204
+ WGPUProcRenderPassEncoderBeginOcclusionQuery renderPassEncoderBeginOcclusionQuery;
205
+ WGPUProcRenderPassEncoderDraw renderPassEncoderDraw;
206
+ WGPUProcRenderPassEncoderDrawIndexed renderPassEncoderDrawIndexed;
207
+ WGPUProcRenderPassEncoderDrawIndexedIndirect renderPassEncoderDrawIndexedIndirect;
208
+ WGPUProcRenderPassEncoderDrawIndirect renderPassEncoderDrawIndirect;
209
+ WGPUProcRenderPassEncoderEnd renderPassEncoderEnd;
210
+ WGPUProcRenderPassEncoderEndOcclusionQuery renderPassEncoderEndOcclusionQuery;
211
+ WGPUProcRenderPassEncoderExecuteBundles renderPassEncoderExecuteBundles;
212
+ WGPUProcRenderPassEncoderInsertDebugMarker renderPassEncoderInsertDebugMarker;
213
+ WGPUProcRenderPassEncoderMultiDrawIndexedIndirect renderPassEncoderMultiDrawIndexedIndirect;
214
+ WGPUProcRenderPassEncoderMultiDrawIndirect renderPassEncoderMultiDrawIndirect;
215
+ WGPUProcRenderPassEncoderPixelLocalStorageBarrier renderPassEncoderPixelLocalStorageBarrier;
216
+ WGPUProcRenderPassEncoderPopDebugGroup renderPassEncoderPopDebugGroup;
217
+ WGPUProcRenderPassEncoderPushDebugGroup renderPassEncoderPushDebugGroup;
218
+ WGPUProcRenderPassEncoderSetBindGroup renderPassEncoderSetBindGroup;
219
+ WGPUProcRenderPassEncoderSetBlendConstant renderPassEncoderSetBlendConstant;
220
+ WGPUProcRenderPassEncoderSetIndexBuffer renderPassEncoderSetIndexBuffer;
221
+ WGPUProcRenderPassEncoderSetLabel renderPassEncoderSetLabel;
222
+ WGPUProcRenderPassEncoderSetPipeline renderPassEncoderSetPipeline;
223
+ WGPUProcRenderPassEncoderSetScissorRect renderPassEncoderSetScissorRect;
224
+ WGPUProcRenderPassEncoderSetStencilReference renderPassEncoderSetStencilReference;
225
+ WGPUProcRenderPassEncoderSetVertexBuffer renderPassEncoderSetVertexBuffer;
226
+ WGPUProcRenderPassEncoderSetViewport renderPassEncoderSetViewport;
227
+ WGPUProcRenderPassEncoderWriteTimestamp renderPassEncoderWriteTimestamp;
228
+ WGPUProcRenderPassEncoderAddRef renderPassEncoderAddRef;
229
+ WGPUProcRenderPassEncoderRelease renderPassEncoderRelease;
230
+
231
+ WGPUProcRenderPipelineGetBindGroupLayout renderPipelineGetBindGroupLayout;
232
+ WGPUProcRenderPipelineSetLabel renderPipelineSetLabel;
233
+ WGPUProcRenderPipelineAddRef renderPipelineAddRef;
234
+ WGPUProcRenderPipelineRelease renderPipelineRelease;
235
+
236
+ WGPUProcSamplerSetLabel samplerSetLabel;
237
+ WGPUProcSamplerAddRef samplerAddRef;
238
+ WGPUProcSamplerRelease samplerRelease;
239
+
240
+ WGPUProcShaderModuleGetCompilationInfo shaderModuleGetCompilationInfo;
241
+ WGPUProcShaderModuleGetCompilationInfo2 shaderModuleGetCompilationInfo2;
242
+ WGPUProcShaderModuleGetCompilationInfoF shaderModuleGetCompilationInfoF;
243
+ WGPUProcShaderModuleSetLabel shaderModuleSetLabel;
244
+ WGPUProcShaderModuleAddRef shaderModuleAddRef;
245
+ WGPUProcShaderModuleRelease shaderModuleRelease;
246
+
247
+ WGPUProcSharedBufferMemoryBeginAccess sharedBufferMemoryBeginAccess;
248
+ WGPUProcSharedBufferMemoryCreateBuffer sharedBufferMemoryCreateBuffer;
249
+ WGPUProcSharedBufferMemoryEndAccess sharedBufferMemoryEndAccess;
250
+ WGPUProcSharedBufferMemoryGetProperties sharedBufferMemoryGetProperties;
251
+ WGPUProcSharedBufferMemoryIsDeviceLost sharedBufferMemoryIsDeviceLost;
252
+ WGPUProcSharedBufferMemorySetLabel sharedBufferMemorySetLabel;
253
+ WGPUProcSharedBufferMemoryAddRef sharedBufferMemoryAddRef;
254
+ WGPUProcSharedBufferMemoryRelease sharedBufferMemoryRelease;
255
+
256
+ WGPUProcSharedFenceExportInfo sharedFenceExportInfo;
257
+ WGPUProcSharedFenceAddRef sharedFenceAddRef;
258
+ WGPUProcSharedFenceRelease sharedFenceRelease;
259
+
260
+ WGPUProcSharedTextureMemoryBeginAccess sharedTextureMemoryBeginAccess;
261
+ WGPUProcSharedTextureMemoryCreateTexture sharedTextureMemoryCreateTexture;
262
+ WGPUProcSharedTextureMemoryEndAccess sharedTextureMemoryEndAccess;
263
+ WGPUProcSharedTextureMemoryGetProperties sharedTextureMemoryGetProperties;
264
+ WGPUProcSharedTextureMemoryIsDeviceLost sharedTextureMemoryIsDeviceLost;
265
+ WGPUProcSharedTextureMemorySetLabel sharedTextureMemorySetLabel;
266
+ WGPUProcSharedTextureMemoryAddRef sharedTextureMemoryAddRef;
267
+ WGPUProcSharedTextureMemoryRelease sharedTextureMemoryRelease;
268
+
269
+ WGPUProcSurfaceConfigure surfaceConfigure;
270
+ WGPUProcSurfaceGetCapabilities surfaceGetCapabilities;
271
+ WGPUProcSurfaceGetCurrentTexture surfaceGetCurrentTexture;
272
+ WGPUProcSurfacePresent surfacePresent;
273
+ WGPUProcSurfaceSetLabel surfaceSetLabel;
274
+ WGPUProcSurfaceUnconfigure surfaceUnconfigure;
275
+ WGPUProcSurfaceAddRef surfaceAddRef;
276
+ WGPUProcSurfaceRelease surfaceRelease;
277
+
278
+ WGPUProcTextureCreateErrorView textureCreateErrorView;
279
+ WGPUProcTextureCreateView textureCreateView;
280
+ WGPUProcTextureDestroy textureDestroy;
281
+ WGPUProcTextureGetDepthOrArrayLayers textureGetDepthOrArrayLayers;
282
+ WGPUProcTextureGetDimension textureGetDimension;
283
+ WGPUProcTextureGetFormat textureGetFormat;
284
+ WGPUProcTextureGetHeight textureGetHeight;
285
+ WGPUProcTextureGetMipLevelCount textureGetMipLevelCount;
286
+ WGPUProcTextureGetSampleCount textureGetSampleCount;
287
+ WGPUProcTextureGetUsage textureGetUsage;
288
+ WGPUProcTextureGetWidth textureGetWidth;
289
+ WGPUProcTextureSetLabel textureSetLabel;
290
+ WGPUProcTextureAddRef textureAddRef;
291
+ WGPUProcTextureRelease textureRelease;
292
+
293
+ WGPUProcTextureViewSetLabel textureViewSetLabel;
294
+ WGPUProcTextureViewAddRef textureViewAddRef;
295
+ WGPUProcTextureViewRelease textureViewRelease;
296
+
297
+
298
+ } DawnProcTable;
299
+
300
+ #endif // DAWN_DAWN_PROC_TABLE_H_