react-native-wgpu 0.1.11 → 0.1.13

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 (67) hide show
  1. package/{ios/IOSPlatformContext.h → apple/ApplePlatformContext.h} +4 -4
  2. package/{ios/IOSPlatformContext.mm → apple/ApplePlatformContext.mm} +24 -6
  3. package/{ios → apple}/MetalView.h +3 -0
  4. package/apple/MetalView.mm +58 -0
  5. package/{ios → apple}/WebGPUModule.mm +2 -2
  6. package/{ios → apple}/WebGPUView.h +0 -3
  7. package/apple/WebGPUView.mm +68 -0
  8. package/cpp/rnwgpu/api/Convertors.h +0 -9
  9. package/cpp/rnwgpu/api/GPUCanvasContext.cpp +6 -5
  10. package/cpp/rnwgpu/api/descriptors/GPUCanvasConfiguration.h +7 -0
  11. package/cpp/webgpu/webgpu.h +4182 -5
  12. package/cpp/webgpu/webgpu_cpp.h +9009 -5
  13. package/lib/commonjs/hooks.js +61 -1
  14. package/lib/commonjs/hooks.js.map +1 -1
  15. package/lib/commonjs/index.js +0 -8
  16. package/lib/commonjs/index.js.map +1 -1
  17. package/lib/module/hooks.js +57 -1
  18. package/lib/module/hooks.js.map +1 -1
  19. package/lib/module/index.js +0 -5
  20. package/lib/module/index.js.map +1 -1
  21. package/lib/typescript/lib/commonjs/hooks.d.ts +11 -0
  22. package/lib/typescript/lib/commonjs/hooks.d.ts.map +1 -1
  23. package/lib/typescript/lib/commonjs/index.d.ts +0 -1
  24. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
  25. package/lib/typescript/lib/module/hooks.d.ts +11 -0
  26. package/lib/typescript/lib/module/hooks.d.ts.map +1 -1
  27. package/lib/typescript/lib/module/index.d.ts +0 -1
  28. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  29. package/lib/typescript/src/__tests__/Alpha.spec.d.ts +2 -0
  30. package/lib/typescript/src/__tests__/Alpha.spec.d.ts.map +1 -0
  31. package/lib/typescript/src/hooks.d.ts +18 -0
  32. package/lib/typescript/src/hooks.d.ts.map +1 -1
  33. package/lib/typescript/src/index.d.ts +0 -1
  34. package/lib/typescript/src/index.d.ts.map +1 -1
  35. package/libs/apple/arm64_iphoneos/libwebgpu_dawn.a +0 -0
  36. package/libs/apple/arm64_iphonesimulator/libwebgpu_dawn.a +0 -0
  37. package/libs/apple/arm64_xros/libwebgpu_dawn.a +0 -0
  38. package/libs/apple/arm64_xrsimulator/libwebgpu_dawn.a +0 -0
  39. package/libs/apple/iphonesimulator/libwebgpu_dawn.a +0 -0
  40. package/libs/apple/libwebgpu_dawn.xcframework/Info.plist +8 -8
  41. package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64/libwebgpu_dawn.a +0 -0
  42. package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64_x86_64-simulator/libwebgpu_dawn.a +0 -0
  43. package/libs/apple/libwebgpu_dawn.xcframework/macos-arm64_x86_64/libwebgpu_dawn.a +0 -0
  44. package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64/libwebgpu_dawn.a +0 -0
  45. package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64-simulator/libwebgpu_dawn.a +0 -0
  46. package/libs/apple/universal_macosx/libwebgpu_dawn.a +0 -0
  47. package/libs/apple/x86_64_iphonesimulator/libwebgpu_dawn.a +0 -0
  48. package/package.json +3 -3
  49. package/react-native-wgpu.podspec +1 -1
  50. package/src/__tests__/Alpha.spec.ts +28 -0
  51. package/src/__tests__/snapshots/semi-opaque-cyan.png +0 -0
  52. package/src/hooks.tsx +125 -0
  53. package/src/index.tsx +0 -8
  54. package/cpp/dawn/dawn_proc_table.h +0 -308
  55. package/cpp/dawn/webgpu.h +0 -4210
  56. package/cpp/dawn/webgpu_cpp.h +0 -9037
  57. package/cpp/dawn/webgpu_cpp_print.h +0 -2466
  58. package/cpp/dawn/wire/client/webgpu.h +0 -339
  59. package/cpp/dawn/wire/client/webgpu_cpp.h +0 -9177
  60. package/ios/MetalView.mm +0 -40
  61. package/ios/SurfaceUtils.h +0 -15
  62. package/ios/SurfaceUtils.mm +0 -34
  63. package/ios/WebGPUView.mm +0 -86
  64. package/ios/WebGPUViewComponentDescriptor.h +0 -61
  65. package/src/hooks.ts +0 -53
  66. /package/{ios → apple}/WebGPUModule.h +0 -0
  67. /package/{ios → apple}/WebGPUViewManager.mm +0 -0
package/src/hooks.tsx ADDED
@@ -0,0 +1,125 @@
1
+ import type { ReactNode } from "react";
2
+ import { createContext, useContext, useEffect, useRef, useState } from "react";
3
+
4
+ import type { RNCanvasContext, CanvasRef, NativeCanvas } from "./Canvas";
5
+
6
+ type Unsubscribe = () => void;
7
+
8
+ export const warnIfNotHardwareAccelerated = (adapter: GPUAdapter) => {
9
+ if (adapter.info.architecture === "swiftshader") {
10
+ console.warn(
11
+ "GPUAdapter is not hardware accelerated. This is common on Android emulators. Rendering will be slow.",
12
+ );
13
+ }
14
+ };
15
+
16
+ interface DeviceContext {
17
+ device: GPUDevice | null;
18
+ adapter: GPUAdapter | null;
19
+ }
20
+
21
+ const DeviceContext = createContext<DeviceContext | null>(null);
22
+
23
+ interface DeviceProviderProps {
24
+ children?: ReactNode | ReactNode[];
25
+ adapterOptions?: GPURequestAdapterOptions;
26
+ deviceDescriptor?: GPUDeviceDescriptor;
27
+ }
28
+
29
+ export const GPUDeviceProvider = ({
30
+ children,
31
+ adapterOptions,
32
+ deviceDescriptor,
33
+ }: DeviceProviderProps) => {
34
+ const state = useDevice(adapterOptions, deviceDescriptor);
35
+ if (!state.device) {
36
+ return null;
37
+ }
38
+ return (
39
+ <DeviceContext.Provider value={state}>{children}</DeviceContext.Provider>
40
+ );
41
+ };
42
+
43
+ export const useSurface = () => {
44
+ const [surface, setSurface] = useState<NativeCanvas | null>(null);
45
+ const ref = useCanvasEffect(() => {
46
+ const sur = ref.current!.getNativeSurface();
47
+ setSurface(sur);
48
+ });
49
+ return { ref, surface };
50
+ };
51
+
52
+ export const useMainDevice = () => {
53
+ const ctx = useContext(DeviceContext);
54
+ if (!ctx) {
55
+ throw new Error("No DeviceContext found.");
56
+ }
57
+ return ctx;
58
+ };
59
+
60
+ export const useDevice = (
61
+ adapterOptions?: GPURequestAdapterOptions,
62
+ deviceDescriptor?: GPUDeviceDescriptor,
63
+ ) => {
64
+ const [state, setState] = useState<DeviceContext | null>(null);
65
+ useEffect(() => {
66
+ (async () => {
67
+ if (!state) {
68
+ const adapter = await navigator.gpu.requestAdapter(adapterOptions);
69
+ if (!adapter) {
70
+ throw new Error("No appropriate GPUAdapter found.");
71
+ }
72
+ warnIfNotHardwareAccelerated(adapter);
73
+ const device = await adapter.requestDevice(deviceDescriptor);
74
+ if (!device) {
75
+ throw new Error("No appropriate GPUDevice found.");
76
+ }
77
+ setState({ adapter, device });
78
+ return;
79
+ }
80
+ })();
81
+ }, [adapterOptions, deviceDescriptor, state]);
82
+ return { adapter: state?.adapter ?? null, device: state?.device ?? null };
83
+ };
84
+
85
+ export const useGPUContext = () => {
86
+ const [context, setContext] = useState<RNCanvasContext | null>(null);
87
+ const ref = useCanvasEffect(() => {
88
+ const ctx = ref.current!.getContext("webgpu")!;
89
+ setContext(ctx);
90
+ });
91
+ return { ref, context };
92
+ };
93
+
94
+ export const useCanvasEffect = (
95
+ effect: () =>
96
+ | void
97
+ | Unsubscribe
98
+ | Promise<Unsubscribe | void>
99
+ | Promise<void>,
100
+ ) => {
101
+ const unsub = useRef<Unsubscribe | null | Promise<Unsubscribe | void>>(null);
102
+ const ref = useRef<CanvasRef>(null);
103
+ useEffect(() => {
104
+ if (!ref.current || !ref.current.whenReady) {
105
+ throw new Error("The reference is not assigned to a WebGPU Canvas");
106
+ }
107
+ ref.current.whenReady(async () => {
108
+ const sub = effect();
109
+ if (sub) {
110
+ unsub.current = sub;
111
+ }
112
+ });
113
+ return () => {
114
+ if (unsub.current) {
115
+ if (unsub.current instanceof Promise) {
116
+ unsub.current.then((sub) => sub && sub());
117
+ } else {
118
+ unsub.current();
119
+ }
120
+ }
121
+ };
122
+ // eslint-disable-next-line react-hooks/exhaustive-deps
123
+ }, []);
124
+ return ref;
125
+ };
package/src/index.tsx CHANGED
@@ -7,14 +7,6 @@ export * from "./WebGPUViewNativeComponent";
7
7
  export * from "./hooks";
8
8
  export { default as WebGPUModule } from "./NativeWebGPUModule";
9
9
 
10
- export const warnIfNotHardwareAccelerated = (adapter: GPUAdapter) => {
11
- if (adapter.info.architecture === "swiftshader") {
12
- console.warn(
13
- "GPUAdapter is not hardware accelerated. This is common on Android emulators. Rendering will be slow.",
14
- );
15
- }
16
- };
17
-
18
10
  const GPU: any = {};
19
11
  GPU[Symbol.hasInstance] = function (instance: object) {
20
12
  return "__brand" in instance && instance.__brand === "GPU";
@@ -1,308 +0,0 @@
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
- WGPUProcAdapterInfoFreeMembers adapterInfoFreeMembers;
10
- WGPUProcAdapterPropertiesFreeMembers adapterPropertiesFreeMembers;
11
- WGPUProcAdapterPropertiesMemoryHeapsFreeMembers adapterPropertiesMemoryHeapsFreeMembers;
12
- WGPUProcCreateInstance createInstance;
13
- WGPUProcDrmFormatCapabilitiesFreeMembers drmFormatCapabilitiesFreeMembers;
14
- WGPUProcGetInstanceFeatures getInstanceFeatures;
15
- WGPUProcGetProcAddress getProcAddress;
16
- WGPUProcSharedBufferMemoryEndAccessStateFreeMembers sharedBufferMemoryEndAccessStateFreeMembers;
17
- WGPUProcSharedTextureMemoryEndAccessStateFreeMembers sharedTextureMemoryEndAccessStateFreeMembers;
18
- WGPUProcSurfaceCapabilitiesFreeMembers surfaceCapabilitiesFreeMembers;
19
-
20
- WGPUProcAdapterCreateDevice adapterCreateDevice;
21
- WGPUProcAdapterEnumerateFeatures adapterEnumerateFeatures;
22
- WGPUProcAdapterGetFormatCapabilities adapterGetFormatCapabilities;
23
- WGPUProcAdapterGetInfo adapterGetInfo;
24
- WGPUProcAdapterGetInstance adapterGetInstance;
25
- WGPUProcAdapterGetLimits adapterGetLimits;
26
- WGPUProcAdapterGetProperties adapterGetProperties;
27
- WGPUProcAdapterHasFeature adapterHasFeature;
28
- WGPUProcAdapterRequestDevice adapterRequestDevice;
29
- WGPUProcAdapterRequestDevice2 adapterRequestDevice2;
30
- WGPUProcAdapterRequestDeviceF adapterRequestDeviceF;
31
- WGPUProcAdapterAddRef adapterAddRef;
32
- WGPUProcAdapterRelease adapterRelease;
33
-
34
- WGPUProcBindGroupSetLabel bindGroupSetLabel;
35
- WGPUProcBindGroupAddRef bindGroupAddRef;
36
- WGPUProcBindGroupRelease bindGroupRelease;
37
-
38
- WGPUProcBindGroupLayoutSetLabel bindGroupLayoutSetLabel;
39
- WGPUProcBindGroupLayoutAddRef bindGroupLayoutAddRef;
40
- WGPUProcBindGroupLayoutRelease bindGroupLayoutRelease;
41
-
42
- WGPUProcBufferDestroy bufferDestroy;
43
- WGPUProcBufferGetConstMappedRange bufferGetConstMappedRange;
44
- WGPUProcBufferGetMapState bufferGetMapState;
45
- WGPUProcBufferGetMappedRange bufferGetMappedRange;
46
- WGPUProcBufferGetSize bufferGetSize;
47
- WGPUProcBufferGetUsage bufferGetUsage;
48
- WGPUProcBufferMapAsync bufferMapAsync;
49
- WGPUProcBufferMapAsync2 bufferMapAsync2;
50
- WGPUProcBufferMapAsyncF bufferMapAsyncF;
51
- WGPUProcBufferSetLabel bufferSetLabel;
52
- WGPUProcBufferUnmap bufferUnmap;
53
- WGPUProcBufferAddRef bufferAddRef;
54
- WGPUProcBufferRelease bufferRelease;
55
-
56
- WGPUProcCommandBufferSetLabel commandBufferSetLabel;
57
- WGPUProcCommandBufferAddRef commandBufferAddRef;
58
- WGPUProcCommandBufferRelease commandBufferRelease;
59
-
60
- WGPUProcCommandEncoderBeginComputePass commandEncoderBeginComputePass;
61
- WGPUProcCommandEncoderBeginRenderPass commandEncoderBeginRenderPass;
62
- WGPUProcCommandEncoderClearBuffer commandEncoderClearBuffer;
63
- WGPUProcCommandEncoderCopyBufferToBuffer commandEncoderCopyBufferToBuffer;
64
- WGPUProcCommandEncoderCopyBufferToTexture commandEncoderCopyBufferToTexture;
65
- WGPUProcCommandEncoderCopyTextureToBuffer commandEncoderCopyTextureToBuffer;
66
- WGPUProcCommandEncoderCopyTextureToTexture commandEncoderCopyTextureToTexture;
67
- WGPUProcCommandEncoderFinish commandEncoderFinish;
68
- WGPUProcCommandEncoderInjectValidationError commandEncoderInjectValidationError;
69
- WGPUProcCommandEncoderInsertDebugMarker commandEncoderInsertDebugMarker;
70
- WGPUProcCommandEncoderPopDebugGroup commandEncoderPopDebugGroup;
71
- WGPUProcCommandEncoderPushDebugGroup commandEncoderPushDebugGroup;
72
- WGPUProcCommandEncoderResolveQuerySet commandEncoderResolveQuerySet;
73
- WGPUProcCommandEncoderSetLabel commandEncoderSetLabel;
74
- WGPUProcCommandEncoderWriteBuffer commandEncoderWriteBuffer;
75
- WGPUProcCommandEncoderWriteTimestamp commandEncoderWriteTimestamp;
76
- WGPUProcCommandEncoderAddRef commandEncoderAddRef;
77
- WGPUProcCommandEncoderRelease commandEncoderRelease;
78
-
79
- WGPUProcComputePassEncoderDispatchWorkgroups computePassEncoderDispatchWorkgroups;
80
- WGPUProcComputePassEncoderDispatchWorkgroupsIndirect computePassEncoderDispatchWorkgroupsIndirect;
81
- WGPUProcComputePassEncoderEnd computePassEncoderEnd;
82
- WGPUProcComputePassEncoderInsertDebugMarker computePassEncoderInsertDebugMarker;
83
- WGPUProcComputePassEncoderPopDebugGroup computePassEncoderPopDebugGroup;
84
- WGPUProcComputePassEncoderPushDebugGroup computePassEncoderPushDebugGroup;
85
- WGPUProcComputePassEncoderSetBindGroup computePassEncoderSetBindGroup;
86
- WGPUProcComputePassEncoderSetLabel computePassEncoderSetLabel;
87
- WGPUProcComputePassEncoderSetPipeline computePassEncoderSetPipeline;
88
- WGPUProcComputePassEncoderWriteTimestamp computePassEncoderWriteTimestamp;
89
- WGPUProcComputePassEncoderAddRef computePassEncoderAddRef;
90
- WGPUProcComputePassEncoderRelease computePassEncoderRelease;
91
-
92
- WGPUProcComputePipelineGetBindGroupLayout computePipelineGetBindGroupLayout;
93
- WGPUProcComputePipelineSetLabel computePipelineSetLabel;
94
- WGPUProcComputePipelineAddRef computePipelineAddRef;
95
- WGPUProcComputePipelineRelease computePipelineRelease;
96
-
97
- WGPUProcDeviceCreateBindGroup deviceCreateBindGroup;
98
- WGPUProcDeviceCreateBindGroupLayout deviceCreateBindGroupLayout;
99
- WGPUProcDeviceCreateBuffer deviceCreateBuffer;
100
- WGPUProcDeviceCreateCommandEncoder deviceCreateCommandEncoder;
101
- WGPUProcDeviceCreateComputePipeline deviceCreateComputePipeline;
102
- WGPUProcDeviceCreateComputePipelineAsync deviceCreateComputePipelineAsync;
103
- WGPUProcDeviceCreateComputePipelineAsync2 deviceCreateComputePipelineAsync2;
104
- WGPUProcDeviceCreateComputePipelineAsyncF deviceCreateComputePipelineAsyncF;
105
- WGPUProcDeviceCreateErrorBuffer deviceCreateErrorBuffer;
106
- WGPUProcDeviceCreateErrorExternalTexture deviceCreateErrorExternalTexture;
107
- WGPUProcDeviceCreateErrorShaderModule deviceCreateErrorShaderModule;
108
- WGPUProcDeviceCreateErrorTexture deviceCreateErrorTexture;
109
- WGPUProcDeviceCreateExternalTexture deviceCreateExternalTexture;
110
- WGPUProcDeviceCreatePipelineLayout deviceCreatePipelineLayout;
111
- WGPUProcDeviceCreateQuerySet deviceCreateQuerySet;
112
- WGPUProcDeviceCreateRenderBundleEncoder deviceCreateRenderBundleEncoder;
113
- WGPUProcDeviceCreateRenderPipeline deviceCreateRenderPipeline;
114
- WGPUProcDeviceCreateRenderPipelineAsync deviceCreateRenderPipelineAsync;
115
- WGPUProcDeviceCreateRenderPipelineAsync2 deviceCreateRenderPipelineAsync2;
116
- WGPUProcDeviceCreateRenderPipelineAsyncF deviceCreateRenderPipelineAsyncF;
117
- WGPUProcDeviceCreateSampler deviceCreateSampler;
118
- WGPUProcDeviceCreateShaderModule deviceCreateShaderModule;
119
- WGPUProcDeviceCreateSwapChain deviceCreateSwapChain;
120
- WGPUProcDeviceCreateTexture deviceCreateTexture;
121
- WGPUProcDeviceDestroy deviceDestroy;
122
- WGPUProcDeviceEnumerateFeatures deviceEnumerateFeatures;
123
- WGPUProcDeviceForceLoss deviceForceLoss;
124
- WGPUProcDeviceGetAHardwareBufferProperties deviceGetAHardwareBufferProperties;
125
- WGPUProcDeviceGetAdapter deviceGetAdapter;
126
- WGPUProcDeviceGetLimits deviceGetLimits;
127
- WGPUProcDeviceGetQueue deviceGetQueue;
128
- WGPUProcDeviceGetSupportedSurfaceUsage deviceGetSupportedSurfaceUsage;
129
- WGPUProcDeviceHasFeature deviceHasFeature;
130
- WGPUProcDeviceImportSharedBufferMemory deviceImportSharedBufferMemory;
131
- WGPUProcDeviceImportSharedFence deviceImportSharedFence;
132
- WGPUProcDeviceImportSharedTextureMemory deviceImportSharedTextureMemory;
133
- WGPUProcDeviceInjectError deviceInjectError;
134
- WGPUProcDevicePopErrorScope devicePopErrorScope;
135
- WGPUProcDevicePopErrorScope2 devicePopErrorScope2;
136
- WGPUProcDevicePopErrorScopeF devicePopErrorScopeF;
137
- WGPUProcDevicePushErrorScope devicePushErrorScope;
138
- WGPUProcDeviceSetDeviceLostCallback deviceSetDeviceLostCallback;
139
- WGPUProcDeviceSetLabel deviceSetLabel;
140
- WGPUProcDeviceSetLoggingCallback deviceSetLoggingCallback;
141
- WGPUProcDeviceSetUncapturedErrorCallback deviceSetUncapturedErrorCallback;
142
- WGPUProcDeviceTick deviceTick;
143
- WGPUProcDeviceValidateTextureDescriptor deviceValidateTextureDescriptor;
144
- WGPUProcDeviceAddRef deviceAddRef;
145
- WGPUProcDeviceRelease deviceRelease;
146
-
147
- WGPUProcExternalTextureDestroy externalTextureDestroy;
148
- WGPUProcExternalTextureExpire externalTextureExpire;
149
- WGPUProcExternalTextureRefresh externalTextureRefresh;
150
- WGPUProcExternalTextureSetLabel externalTextureSetLabel;
151
- WGPUProcExternalTextureAddRef externalTextureAddRef;
152
- WGPUProcExternalTextureRelease externalTextureRelease;
153
-
154
- WGPUProcInstanceCreateSurface instanceCreateSurface;
155
- WGPUProcInstanceEnumerateWGSLLanguageFeatures instanceEnumerateWGSLLanguageFeatures;
156
- WGPUProcInstanceHasWGSLLanguageFeature instanceHasWGSLLanguageFeature;
157
- WGPUProcInstanceProcessEvents instanceProcessEvents;
158
- WGPUProcInstanceRequestAdapter instanceRequestAdapter;
159
- WGPUProcInstanceRequestAdapter2 instanceRequestAdapter2;
160
- WGPUProcInstanceRequestAdapterF instanceRequestAdapterF;
161
- WGPUProcInstanceWaitAny instanceWaitAny;
162
- WGPUProcInstanceAddRef instanceAddRef;
163
- WGPUProcInstanceRelease instanceRelease;
164
-
165
- WGPUProcPipelineLayoutSetLabel pipelineLayoutSetLabel;
166
- WGPUProcPipelineLayoutAddRef pipelineLayoutAddRef;
167
- WGPUProcPipelineLayoutRelease pipelineLayoutRelease;
168
-
169
- WGPUProcQuerySetDestroy querySetDestroy;
170
- WGPUProcQuerySetGetCount querySetGetCount;
171
- WGPUProcQuerySetGetType querySetGetType;
172
- WGPUProcQuerySetSetLabel querySetSetLabel;
173
- WGPUProcQuerySetAddRef querySetAddRef;
174
- WGPUProcQuerySetRelease querySetRelease;
175
-
176
- WGPUProcQueueCopyExternalTextureForBrowser queueCopyExternalTextureForBrowser;
177
- WGPUProcQueueCopyTextureForBrowser queueCopyTextureForBrowser;
178
- WGPUProcQueueOnSubmittedWorkDone queueOnSubmittedWorkDone;
179
- WGPUProcQueueOnSubmittedWorkDone2 queueOnSubmittedWorkDone2;
180
- WGPUProcQueueOnSubmittedWorkDoneF queueOnSubmittedWorkDoneF;
181
- WGPUProcQueueSetLabel queueSetLabel;
182
- WGPUProcQueueSubmit queueSubmit;
183
- WGPUProcQueueWriteBuffer queueWriteBuffer;
184
- WGPUProcQueueWriteTexture queueWriteTexture;
185
- WGPUProcQueueAddRef queueAddRef;
186
- WGPUProcQueueRelease queueRelease;
187
-
188
- WGPUProcRenderBundleSetLabel renderBundleSetLabel;
189
- WGPUProcRenderBundleAddRef renderBundleAddRef;
190
- WGPUProcRenderBundleRelease renderBundleRelease;
191
-
192
- WGPUProcRenderBundleEncoderDraw renderBundleEncoderDraw;
193
- WGPUProcRenderBundleEncoderDrawIndexed renderBundleEncoderDrawIndexed;
194
- WGPUProcRenderBundleEncoderDrawIndexedIndirect renderBundleEncoderDrawIndexedIndirect;
195
- WGPUProcRenderBundleEncoderDrawIndirect renderBundleEncoderDrawIndirect;
196
- WGPUProcRenderBundleEncoderFinish renderBundleEncoderFinish;
197
- WGPUProcRenderBundleEncoderInsertDebugMarker renderBundleEncoderInsertDebugMarker;
198
- WGPUProcRenderBundleEncoderPopDebugGroup renderBundleEncoderPopDebugGroup;
199
- WGPUProcRenderBundleEncoderPushDebugGroup renderBundleEncoderPushDebugGroup;
200
- WGPUProcRenderBundleEncoderSetBindGroup renderBundleEncoderSetBindGroup;
201
- WGPUProcRenderBundleEncoderSetIndexBuffer renderBundleEncoderSetIndexBuffer;
202
- WGPUProcRenderBundleEncoderSetLabel renderBundleEncoderSetLabel;
203
- WGPUProcRenderBundleEncoderSetPipeline renderBundleEncoderSetPipeline;
204
- WGPUProcRenderBundleEncoderSetVertexBuffer renderBundleEncoderSetVertexBuffer;
205
- WGPUProcRenderBundleEncoderAddRef renderBundleEncoderAddRef;
206
- WGPUProcRenderBundleEncoderRelease renderBundleEncoderRelease;
207
-
208
- WGPUProcRenderPassEncoderBeginOcclusionQuery renderPassEncoderBeginOcclusionQuery;
209
- WGPUProcRenderPassEncoderDraw renderPassEncoderDraw;
210
- WGPUProcRenderPassEncoderDrawIndexed renderPassEncoderDrawIndexed;
211
- WGPUProcRenderPassEncoderDrawIndexedIndirect renderPassEncoderDrawIndexedIndirect;
212
- WGPUProcRenderPassEncoderDrawIndirect renderPassEncoderDrawIndirect;
213
- WGPUProcRenderPassEncoderEnd renderPassEncoderEnd;
214
- WGPUProcRenderPassEncoderEndOcclusionQuery renderPassEncoderEndOcclusionQuery;
215
- WGPUProcRenderPassEncoderExecuteBundles renderPassEncoderExecuteBundles;
216
- WGPUProcRenderPassEncoderInsertDebugMarker renderPassEncoderInsertDebugMarker;
217
- WGPUProcRenderPassEncoderPixelLocalStorageBarrier renderPassEncoderPixelLocalStorageBarrier;
218
- WGPUProcRenderPassEncoderPopDebugGroup renderPassEncoderPopDebugGroup;
219
- WGPUProcRenderPassEncoderPushDebugGroup renderPassEncoderPushDebugGroup;
220
- WGPUProcRenderPassEncoderSetBindGroup renderPassEncoderSetBindGroup;
221
- WGPUProcRenderPassEncoderSetBlendConstant renderPassEncoderSetBlendConstant;
222
- WGPUProcRenderPassEncoderSetIndexBuffer renderPassEncoderSetIndexBuffer;
223
- WGPUProcRenderPassEncoderSetLabel renderPassEncoderSetLabel;
224
- WGPUProcRenderPassEncoderSetPipeline renderPassEncoderSetPipeline;
225
- WGPUProcRenderPassEncoderSetScissorRect renderPassEncoderSetScissorRect;
226
- WGPUProcRenderPassEncoderSetStencilReference renderPassEncoderSetStencilReference;
227
- WGPUProcRenderPassEncoderSetVertexBuffer renderPassEncoderSetVertexBuffer;
228
- WGPUProcRenderPassEncoderSetViewport renderPassEncoderSetViewport;
229
- WGPUProcRenderPassEncoderWriteTimestamp renderPassEncoderWriteTimestamp;
230
- WGPUProcRenderPassEncoderAddRef renderPassEncoderAddRef;
231
- WGPUProcRenderPassEncoderRelease renderPassEncoderRelease;
232
-
233
- WGPUProcRenderPipelineGetBindGroupLayout renderPipelineGetBindGroupLayout;
234
- WGPUProcRenderPipelineSetLabel renderPipelineSetLabel;
235
- WGPUProcRenderPipelineAddRef renderPipelineAddRef;
236
- WGPUProcRenderPipelineRelease renderPipelineRelease;
237
-
238
- WGPUProcSamplerSetLabel samplerSetLabel;
239
- WGPUProcSamplerAddRef samplerAddRef;
240
- WGPUProcSamplerRelease samplerRelease;
241
-
242
- WGPUProcShaderModuleGetCompilationInfo shaderModuleGetCompilationInfo;
243
- WGPUProcShaderModuleGetCompilationInfo2 shaderModuleGetCompilationInfo2;
244
- WGPUProcShaderModuleGetCompilationInfoF shaderModuleGetCompilationInfoF;
245
- WGPUProcShaderModuleSetLabel shaderModuleSetLabel;
246
- WGPUProcShaderModuleAddRef shaderModuleAddRef;
247
- WGPUProcShaderModuleRelease shaderModuleRelease;
248
-
249
- WGPUProcSharedBufferMemoryBeginAccess sharedBufferMemoryBeginAccess;
250
- WGPUProcSharedBufferMemoryCreateBuffer sharedBufferMemoryCreateBuffer;
251
- WGPUProcSharedBufferMemoryEndAccess sharedBufferMemoryEndAccess;
252
- WGPUProcSharedBufferMemoryGetProperties sharedBufferMemoryGetProperties;
253
- WGPUProcSharedBufferMemoryIsDeviceLost sharedBufferMemoryIsDeviceLost;
254
- WGPUProcSharedBufferMemorySetLabel sharedBufferMemorySetLabel;
255
- WGPUProcSharedBufferMemoryAddRef sharedBufferMemoryAddRef;
256
- WGPUProcSharedBufferMemoryRelease sharedBufferMemoryRelease;
257
-
258
- WGPUProcSharedFenceExportInfo sharedFenceExportInfo;
259
- WGPUProcSharedFenceAddRef sharedFenceAddRef;
260
- WGPUProcSharedFenceRelease sharedFenceRelease;
261
-
262
- WGPUProcSharedTextureMemoryBeginAccess sharedTextureMemoryBeginAccess;
263
- WGPUProcSharedTextureMemoryCreateTexture sharedTextureMemoryCreateTexture;
264
- WGPUProcSharedTextureMemoryEndAccess sharedTextureMemoryEndAccess;
265
- WGPUProcSharedTextureMemoryGetProperties sharedTextureMemoryGetProperties;
266
- WGPUProcSharedTextureMemoryIsDeviceLost sharedTextureMemoryIsDeviceLost;
267
- WGPUProcSharedTextureMemorySetLabel sharedTextureMemorySetLabel;
268
- WGPUProcSharedTextureMemoryAddRef sharedTextureMemoryAddRef;
269
- WGPUProcSharedTextureMemoryRelease sharedTextureMemoryRelease;
270
-
271
- WGPUProcSurfaceConfigure surfaceConfigure;
272
- WGPUProcSurfaceGetCapabilities surfaceGetCapabilities;
273
- WGPUProcSurfaceGetCurrentTexture surfaceGetCurrentTexture;
274
- WGPUProcSurfaceGetPreferredFormat surfaceGetPreferredFormat;
275
- WGPUProcSurfacePresent surfacePresent;
276
- WGPUProcSurfaceUnconfigure surfaceUnconfigure;
277
- WGPUProcSurfaceAddRef surfaceAddRef;
278
- WGPUProcSurfaceRelease surfaceRelease;
279
-
280
- WGPUProcSwapChainGetCurrentTexture swapChainGetCurrentTexture;
281
- WGPUProcSwapChainGetCurrentTextureView swapChainGetCurrentTextureView;
282
- WGPUProcSwapChainPresent swapChainPresent;
283
- WGPUProcSwapChainAddRef swapChainAddRef;
284
- WGPUProcSwapChainRelease swapChainRelease;
285
-
286
- WGPUProcTextureCreateErrorView textureCreateErrorView;
287
- WGPUProcTextureCreateView textureCreateView;
288
- WGPUProcTextureDestroy textureDestroy;
289
- WGPUProcTextureGetDepthOrArrayLayers textureGetDepthOrArrayLayers;
290
- WGPUProcTextureGetDimension textureGetDimension;
291
- WGPUProcTextureGetFormat textureGetFormat;
292
- WGPUProcTextureGetHeight textureGetHeight;
293
- WGPUProcTextureGetMipLevelCount textureGetMipLevelCount;
294
- WGPUProcTextureGetSampleCount textureGetSampleCount;
295
- WGPUProcTextureGetUsage textureGetUsage;
296
- WGPUProcTextureGetWidth textureGetWidth;
297
- WGPUProcTextureSetLabel textureSetLabel;
298
- WGPUProcTextureAddRef textureAddRef;
299
- WGPUProcTextureRelease textureRelease;
300
-
301
- WGPUProcTextureViewSetLabel textureViewSetLabel;
302
- WGPUProcTextureViewAddRef textureViewAddRef;
303
- WGPUProcTextureViewRelease textureViewRelease;
304
-
305
-
306
- } DawnProcTable;
307
-
308
- #endif // DAWN_DAWN_PROC_TABLE_H_