react-native-wgpu 0.1.18 → 0.1.20
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.
- package/android/build.gradle +1 -1
- package/android/cpp/AndroidPlatformContext.h +1 -1
- package/android/src/main/java/com/webgpu/WebGPUAHBView.java +41 -33
- package/android/src/main/java/com/webgpu/{SurfaceView2.java → WebGPUSurfaceViewWithSC.java} +3 -3
- package/android/src/main/java/com/webgpu/WebGPUView.java +15 -42
- package/android/src/main/java/com/webgpu/WebGPUViewManager.java +3 -3
- package/android/src/oldarch/com/webgpu/WebGPUViewManagerSpec.java +1 -1
- package/apple/ApplePlatformContext.mm +11 -3
- package/apple/MetalView.h +2 -2
- package/apple/MetalView.mm +12 -0
- package/apple/RNWGUIKit.h +11 -0
- package/apple/WebGPUModule.mm +3 -12
- package/apple/WebGPUViewManager.mm +3 -2
- package/cpp/dawn/dawn_proc.h +50 -0
- package/cpp/dawn/dawn_proc_table.h +300 -0
- package/cpp/dawn/dawn_thread_dispatch_proc.h +47 -0
- package/cpp/dawn/native/D3D11Backend.h +64 -0
- package/cpp/dawn/native/D3D12Backend.h +68 -0
- package/cpp/dawn/native/D3DBackend.h +59 -0
- package/cpp/dawn/native/DawnNative.h +313 -0
- package/cpp/dawn/native/MetalBackend.h +55 -0
- package/cpp/dawn/native/NullBackend.h +39 -0
- package/cpp/dawn/native/OpenGLBackend.h +82 -0
- package/cpp/dawn/native/VulkanBackend.h +183 -0
- package/cpp/dawn/native/dawn_native_export.h +49 -0
- package/cpp/dawn/platform/DawnPlatform.h +165 -0
- package/cpp/dawn/platform/dawn_platform_export.h +49 -0
- package/cpp/dawn/webgpu_cpp_print.h +2484 -0
- package/cpp/rnwgpu/api/GPU.h +1 -1
- package/cpp/rnwgpu/api/GPUCanvasContext.cpp +4 -0
- package/cpp/rnwgpu/api/GPUCanvasContext.h +0 -16
- package/cpp/webgpu/webgpu_glfw.h +71 -0
- package/lib/commonjs/Canvas.js +2 -5
- package/lib/commonjs/Canvas.js.map +1 -1
- package/lib/module/Canvas.js +2 -5
- package/lib/module/Canvas.js.map +1 -1
- package/lib/typescript/lib/module/Canvas.d.ts.map +1 -1
- package/lib/typescript/src/Canvas.d.ts +1 -2
- package/lib/typescript/src/Canvas.d.ts.map +1 -1
- package/lib/typescript/src/WebGPUViewNativeComponent.d.ts +2 -2
- package/lib/typescript/src/WebGPUViewNativeComponent.d.ts.map +1 -1
- package/libs/android/arm64-v8a/libwebgpu_dawn.so +0 -0
- package/libs/android/armeabi-v7a/libwebgpu_dawn.so +0 -0
- package/libs/android/x86/libwebgpu_dawn.so +0 -0
- package/libs/android/x86_64/libwebgpu_dawn.so +0 -0
- package/libs/apple/arm64_iphoneos/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_iphonesimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_xros/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_xrsimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/iphonesimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/Info.plist +10 -10
- package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64_x86_64-simulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/macos-arm64_x86_64/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64-simulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/universal_macosx/libwebgpu_dawn.a +0 -0
- package/libs/apple/x86_64_iphonesimulator/libwebgpu_dawn.a +0 -0
- package/package.json +2 -1
- package/react-native-wgpu.podspec +1 -1
- package/src/Canvas.tsx +51 -65
- package/src/WebGPUViewNativeComponent.ts +2 -2
- package/cpp/rnwgpu/api/WebGPUCanvasContextFactory.h +0 -59
|
@@ -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_
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Copyright 2020 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_THREAD_DISPATCH_PROC_H_
|
|
29
|
+
#define INCLUDE_DAWN_DAWN_THREAD_DISPATCH_PROC_H_
|
|
30
|
+
|
|
31
|
+
#include "dawn/dawn_proc.h"
|
|
32
|
+
|
|
33
|
+
#ifdef __cplusplus
|
|
34
|
+
extern "C" {
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
// Call dawnProcSetProcs(&dawnThreadDispatchProcTable) and then use dawnProcSetPerThreadProcs
|
|
38
|
+
// to set per-thread procs.
|
|
39
|
+
WGPU_EXPORT extern DawnProcTable dawnThreadDispatchProcTable;
|
|
40
|
+
WGPU_EXPORT void dawnProcSetDefaultThreadProcs(const DawnProcTable* procs);
|
|
41
|
+
WGPU_EXPORT void dawnProcSetPerThreadProcs(const DawnProcTable* procs);
|
|
42
|
+
|
|
43
|
+
#ifdef __cplusplus
|
|
44
|
+
} // extern "C"
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#endif // INCLUDE_DAWN_DAWN_THREAD_DISPATCH_PROC_H_
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Copyright 2023 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_NATIVE_D3D11BACKEND_H_
|
|
29
|
+
#define INCLUDE_DAWN_NATIVE_D3D11BACKEND_H_
|
|
30
|
+
|
|
31
|
+
#include <d3d11_1.h>
|
|
32
|
+
#include <wrl/client.h>
|
|
33
|
+
|
|
34
|
+
#include <memory>
|
|
35
|
+
|
|
36
|
+
#include "dawn/native/D3DBackend.h"
|
|
37
|
+
|
|
38
|
+
namespace dawn::native::d3d11 {
|
|
39
|
+
|
|
40
|
+
DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr<ID3D11Device> GetD3D11Device(WGPUDevice device);
|
|
41
|
+
|
|
42
|
+
// May be chained on RequestAdapterOptions
|
|
43
|
+
struct DAWN_NATIVE_EXPORT RequestAdapterOptionsD3D11Device : wgpu::ChainedStruct {
|
|
44
|
+
RequestAdapterOptionsD3D11Device() {
|
|
45
|
+
sType = static_cast<wgpu::SType>(WGPUSType_RequestAdapterOptionsD3D11Device);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
Microsoft::WRL::ComPtr<ID3D11Device> device;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// May be chained on SharedTextureMemoryDescriptor
|
|
52
|
+
struct DAWN_NATIVE_EXPORT SharedTextureMemoryD3D11Texture2DDescriptor : wgpu::ChainedStruct {
|
|
53
|
+
SharedTextureMemoryD3D11Texture2DDescriptor() {
|
|
54
|
+
sType = static_cast<wgpu::SType>(WGPUSType_SharedTextureMemoryD3D11Texture2DDescriptor);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// This ID3D11Texture2D object must be created from the same ID3D11Device used in the
|
|
58
|
+
// WGPUDevice.
|
|
59
|
+
Microsoft::WRL::ComPtr<ID3D11Texture2D> texture;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace dawn::native::d3d11
|
|
63
|
+
|
|
64
|
+
#endif // INCLUDE_DAWN_NATIVE_D3D11BACKEND_H_
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Copyright 2018 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_NATIVE_D3D12BACKEND_H_
|
|
29
|
+
#define INCLUDE_DAWN_NATIVE_D3D12BACKEND_H_
|
|
30
|
+
|
|
31
|
+
#include <d3d12.h>
|
|
32
|
+
#include <dxgi1_4.h>
|
|
33
|
+
#include <wrl/client.h>
|
|
34
|
+
|
|
35
|
+
#include "dawn/native/D3DBackend.h"
|
|
36
|
+
|
|
37
|
+
struct ID3D12Device;
|
|
38
|
+
struct ID3D12Resource;
|
|
39
|
+
|
|
40
|
+
namespace dawn::native::d3d12 {
|
|
41
|
+
|
|
42
|
+
class Device;
|
|
43
|
+
|
|
44
|
+
enum MemorySegment {
|
|
45
|
+
Local,
|
|
46
|
+
NonLocal,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr<ID3D12Device> GetD3D12Device(WGPUDevice device);
|
|
50
|
+
|
|
51
|
+
DAWN_NATIVE_EXPORT uint64_t SetExternalMemoryReservation(WGPUDevice device,
|
|
52
|
+
uint64_t requestedReservationSize,
|
|
53
|
+
MemorySegment memorySegment);
|
|
54
|
+
|
|
55
|
+
// May be chained on SharedBufferMemoryDescriptor
|
|
56
|
+
struct DAWN_NATIVE_EXPORT SharedBufferMemoryD3D12ResourceDescriptor : wgpu::ChainedStruct {
|
|
57
|
+
SharedBufferMemoryD3D12ResourceDescriptor() {
|
|
58
|
+
sType = static_cast<wgpu::SType>(WGPUSType_SharedBufferMemoryD3D12ResourceDescriptor);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// This ID3D12Resource object must be created from the same ID3D12Device used in the
|
|
62
|
+
// WGPUDevice.
|
|
63
|
+
Microsoft::WRL::ComPtr<ID3D12Resource> resource;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
} // namespace dawn::native::d3d12
|
|
67
|
+
|
|
68
|
+
#endif // INCLUDE_DAWN_NATIVE_D3D12BACKEND_H_
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright 2023 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_NATIVE_D3DBACKEND_H_
|
|
29
|
+
#define INCLUDE_DAWN_NATIVE_D3DBACKEND_H_
|
|
30
|
+
|
|
31
|
+
#include <dxgi1_4.h>
|
|
32
|
+
#include <webgpu/webgpu_cpp_chained_struct.h>
|
|
33
|
+
#include <windows.h>
|
|
34
|
+
#include <wrl/client.h>
|
|
35
|
+
|
|
36
|
+
#include <memory>
|
|
37
|
+
#include <vector>
|
|
38
|
+
|
|
39
|
+
#include "dawn/native/DawnNative.h"
|
|
40
|
+
|
|
41
|
+
namespace dawn::native::d3d {
|
|
42
|
+
|
|
43
|
+
class ExternalImageDXGIImpl;
|
|
44
|
+
|
|
45
|
+
DAWN_NATIVE_EXPORT Microsoft::WRL::ComPtr<IDXGIAdapter> GetDXGIAdapter(WGPUAdapter adapter);
|
|
46
|
+
|
|
47
|
+
// Can be chained in WGPURequestAdapterOptions
|
|
48
|
+
struct DAWN_NATIVE_EXPORT RequestAdapterOptionsLUID : wgpu::ChainedStruct {
|
|
49
|
+
RequestAdapterOptionsLUID();
|
|
50
|
+
|
|
51
|
+
::LUID adapterLUID;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Chrome uses 0 as acquire key.
|
|
55
|
+
static constexpr uint64_t kDXGIKeyedMutexAcquireKey = 0;
|
|
56
|
+
|
|
57
|
+
} // namespace dawn::native::d3d
|
|
58
|
+
|
|
59
|
+
#endif // INCLUDE_DAWN_NATIVE_D3DBACKEND_H_
|