Skip to content

Commit b66000d

Browse files
kainino0xDawn LUCI CQ
authored andcommitted
[dawn] Promote ExternalTexture to Core
These became standard/stable in webgpu-native/webgpu-headers#570 Bug: 462477379, 465339954 Change-Id: I5f1405df128401f97e9a26fb781d56097e13787f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/276941 Commit-Queue: Brandon Jones <bajones@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Auto-Submit: Kai Ninomiya <kainino@chromium.org>
1 parent ee21162 commit b66000d

2 files changed

Lines changed: 3 additions & 190 deletions

File tree

src/dawn/dawn.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,6 @@
515515
"category": "structure",
516516
"chained": "in",
517517
"chain roots": ["bind group entry"],
518-
"tags": ["dawn", "emscripten"],
519518
"members": [
520519
{"name": "external texture", "type": "external texture"}
521520
]
@@ -535,7 +534,6 @@
535534
"category": "structure",
536535
"chained": "in",
537536
"chain roots": ["bind group layout entry"],
538-
"tags": ["dawn", "emscripten"],
539537
"members": []
540538
},
541539

@@ -1837,7 +1835,6 @@
18371835
},
18381836
"external texture": {
18391837
"category": "object",
1840-
"tags": ["dawn", "emscripten"],
18411838
"methods": [
18421839
{
18431840
"name": "set label",
@@ -3938,15 +3935,15 @@
39383935
{"value": 10, "name": "surface color management"},
39393936
{"value": 11, "name": "request adapter WebXR options"},
39403937
{"value": 12, "name": "texture component swizzle descriptor"},
3938+
{"value": 13, "name": "external texture binding layout"},
3939+
{"value": 14, "name": "external texture binding entry"},
39413940

39423941
{"value": 0, "name": "compatibility mode limits", "tags": ["compat"]},
39433942
{"value": 1, "name": "texture binding view dimension descriptor", "tags": ["compat"]},
39443943

39453944
{"value": 0, "name": "emscripten surface source canvas HTML selector", "tags": ["emscripten"]},
39463945

39473946
{"value": 0, "name": "surface descriptor from windows core window", "tags": ["dawn"]},
3948-
{"value": 1, "name": "external texture binding entry", "tags": ["dawn", "emscripten"]},
3949-
{"value": 2, "name": "external texture binding layout", "tags": ["dawn", "emscripten"]},
39503947
{"value": 3, "name": "surface descriptor from windows UWP swap chain panel", "tags": ["dawn"]},
39513948
{"value": 4, "name": "dawn texture internal usage descriptor", "tags": ["dawn"]},
39523949
{"value": 5, "name": "dawn encoder internal usage descriptor", "tags": ["dawn"]},
Lines changed: 1 addition & 185 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,21 @@
11
--- webgpu_header
22
+++ dawn_header
3-
@@
4-
typedef struct WGPUComputePassEncoderImpl* WGPUComputePassEncoder WGPU_OBJECT_ATTRIBUTE;
5-
typedef struct WGPUComputePipelineImpl* WGPUComputePipeline WGPU_OBJECT_ATTRIBUTE;
6-
typedef struct WGPUDeviceImpl* WGPUDevice WGPU_OBJECT_ATTRIBUTE;
7-
-typedef struct WGPUExternalTextureImpl* WGPUExternalTexture WGPU_OBJECT_ATTRIBUTE;
8-
typedef struct WGPUInstanceImpl* WGPUInstance WGPU_OBJECT_ATTRIBUTE;
9-
typedef struct WGPUPipelineLayoutImpl* WGPUPipelineLayout WGPU_OBJECT_ATTRIBUTE;
10-
typedef struct WGPUQuerySetImpl* WGPUQuerySet WGPU_OBJECT_ATTRIBUTE;
11-
@@
12-
typedef struct WGPUTextureViewImpl* WGPUTextureView WGPU_OBJECT_ATTRIBUTE;
13-
14-
struct WGPUAdapterInfo;
15-
+struct WGPUBindGroupEntry;
16-
struct WGPUBlendComponent;
17-
struct WGPUBufferBindingLayout;
18-
struct WGPUBufferDescriptor;
19-
@@
20-
struct WGPUCompilationMessage;
21-
struct WGPUConstantEntry;
22-
struct WGPUExtent3D;
23-
-struct WGPUExternalTextureBindingEntry;
24-
-struct WGPUExternalTextureBindingLayout;
25-
struct WGPUFuture;
26-
struct WGPUInstanceLimits;
27-
struct WGPULimits;
283
@@
294
struct WGPUTexelCopyBufferLayout;
305
struct WGPUTextureBindingLayout;
316
struct WGPUTextureComponentSwizzle;
327
-struct WGPUTextureViewDescriptor;
338
struct WGPUVertexAttribute;
34-
-struct WGPUBindGroupEntry;
35-
+struct WGPUBindGroupDescriptor;
9+
struct WGPUBindGroupEntry;
3610
struct WGPUBindGroupLayoutEntry;
37-
struct WGPUBlendState;
38-
struct WGPUCompilationInfo;
3911
@@
40-
struct WGPUTextureComponentSwizzleDescriptor;
41-
struct WGPUTextureDescriptor;
42-
struct WGPUVertexBufferLayout;
43-
-struct WGPUBindGroupDescriptor;
44-
struct WGPUBindGroupLayoutDescriptor;
4512
struct WGPUColorTargetState;
4613
struct WGPUComputePipelineDescriptor;
4714
struct WGPURenderPassDescriptor;
4815
+struct WGPUTextureViewDescriptor;
4916
struct WGPUVertexState;
5017
struct WGPUFragmentState;
5118
struct WGPURenderPipelineDescriptor;
52-
@@
53-
WGPUSType_SurfaceColorManagement = 0x0000000A,
54-
WGPUSType_RequestAdapterWebXROptions = 0x0000000B,
55-
WGPUSType_TextureComponentSwizzleDescriptor = 0x0000000C,
56-
- WGPUSType_ExternalTextureBindingLayout = 0x0000000D,
57-
- WGPUSType_ExternalTextureBindingEntry = 0x0000000E,
58-
WGPUSType_Force32 = 0x7FFFFFFF
59-
} WGPUSType WGPU_ENUM_ATTRIBUTE;
60-
61-
@@
62-
/*.subgroupMaxSize=*/0 _wgpu_COMMA \
63-
})
64-
65-
+typedef struct WGPUBindGroupEntry {
66-
+ WGPUChainedStruct * nextInChain;
67-
+ uint32_t binding;
68-
+ WGPU_NULLABLE WGPUBuffer buffer;
69-
+ uint64_t offset;
70-
+ uint64_t size;
71-
+ WGPU_NULLABLE WGPUSampler sampler;
72-
+ WGPU_NULLABLE WGPUTextureView textureView;
73-
+} WGPUBindGroupEntry WGPU_STRUCTURE_ATTRIBUTE;
74-
+
75-
+#define WGPU_BIND_GROUP_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupEntry, { \
76-
+ /*.nextInChain=*/NULL _wgpu_COMMA \
77-
+ /*.binding=*/0 _wgpu_COMMA \
78-
+ /*.buffer=*/NULL _wgpu_COMMA \
79-
+ /*.offset=*/0 _wgpu_COMMA \
80-
+ /*.size=*/WGPU_WHOLE_SIZE _wgpu_COMMA \
81-
+ /*.sampler=*/NULL _wgpu_COMMA \
82-
+ /*.textureView=*/NULL _wgpu_COMMA \
83-
+})
84-
+
85-
typedef struct WGPUBlendComponent {
86-
WGPUBlendOperation operation;
87-
WGPUBlendFactor srcFactor;
88-
@@
89-
/*.width=*/0 _wgpu_COMMA \
90-
/*.height=*/1 _wgpu_COMMA \
91-
/*.depthOrArrayLayers=*/1 _wgpu_COMMA \
92-
-})
93-
-
94-
-typedef struct WGPUExternalTextureBindingEntry {
95-
- WGPUChainedStruct chain;
96-
- WGPUExternalTexture externalTexture;
97-
-} WGPUExternalTextureBindingEntry WGPU_STRUCTURE_ATTRIBUTE;
98-
-
99-
-#define WGPU_EXTERNAL_TEXTURE_BINDING_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExternalTextureBindingEntry, { \
100-
- /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
101-
- /*.next=*/NULL _wgpu_COMMA \
102-
- /*.sType=*/WGPUSType_ExternalTextureBindingEntry _wgpu_COMMA \
103-
- }) _wgpu_COMMA \
104-
- /*.externalTexture=*/NULL _wgpu_COMMA \
105-
-})
106-
-
107-
-typedef struct WGPUExternalTextureBindingLayout {
108-
- WGPUChainedStruct chain;
109-
-} WGPUExternalTextureBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
110-
-
111-
-#define WGPU_EXTERNAL_TEXTURE_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExternalTextureBindingLayout, { \
112-
- /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
113-
- /*.next=*/NULL _wgpu_COMMA \
114-
- /*.sType=*/WGPUSType_ExternalTextureBindingLayout _wgpu_COMMA \
115-
- }) _wgpu_COMMA \
116-
})
117-
118-
typedef struct WGPUFuture {
11919
@@
12020
/*.a=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
12121
})
@@ -149,68 +49,6 @@
14949
typedef struct WGPUVertexAttribute {
15050
WGPUChainedStruct * nextInChain;
15151
WGPUVertexFormat format;
152-
@@
153-
/*.shaderLocation=*/0 _wgpu_COMMA \
154-
})
155-
156-
-typedef struct WGPUBindGroupEntry {
157-
- WGPUChainedStruct * nextInChain;
158-
- uint32_t binding;
159-
- WGPU_NULLABLE WGPUBuffer buffer;
160-
- uint64_t offset;
161-
- uint64_t size;
162-
- WGPU_NULLABLE WGPUSampler sampler;
163-
- WGPU_NULLABLE WGPUTextureView textureView;
164-
-} WGPUBindGroupEntry WGPU_STRUCTURE_ATTRIBUTE;
165-
-
166-
-#define WGPU_BIND_GROUP_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupEntry, { \
167-
- /*.nextInChain=*/NULL _wgpu_COMMA \
168-
- /*.binding=*/0 _wgpu_COMMA \
169-
- /*.buffer=*/NULL _wgpu_COMMA \
170-
- /*.offset=*/0 _wgpu_COMMA \
171-
- /*.size=*/WGPU_WHOLE_SIZE _wgpu_COMMA \
172-
- /*.sampler=*/NULL _wgpu_COMMA \
173-
- /*.textureView=*/NULL _wgpu_COMMA \
174-
+typedef struct WGPUBindGroupDescriptor {
175-
+ WGPUChainedStruct * nextInChain;
176-
+ WGPUStringView label;
177-
+ WGPUBindGroupLayout layout;
178-
+ size_t entryCount;
179-
+ WGPUBindGroupEntry const * entries;
180-
+} WGPUBindGroupDescriptor WGPU_STRUCTURE_ATTRIBUTE;
181-
+
182-
+#define WGPU_BIND_GROUP_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupDescriptor, { \
183-
+ /*.nextInChain=*/NULL _wgpu_COMMA \
184-
+ /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
185-
+ /*.layout=*/NULL _wgpu_COMMA \
186-
+ /*.entryCount=*/0 _wgpu_COMMA \
187-
+ /*.entries=*/NULL _wgpu_COMMA \
188-
})
189-
190-
typedef struct WGPUBindGroupLayoutEntry {
191-
@@
192-
/*.attributes=*/NULL _wgpu_COMMA \
193-
})
194-
195-
-typedef struct WGPUBindGroupDescriptor {
196-
- WGPUChainedStruct * nextInChain;
197-
- WGPUStringView label;
198-
- WGPUBindGroupLayout layout;
199-
- size_t entryCount;
200-
- WGPUBindGroupEntry const * entries;
201-
-} WGPUBindGroupDescriptor WGPU_STRUCTURE_ATTRIBUTE;
202-
-
203-
-#define WGPU_BIND_GROUP_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupDescriptor, { \
204-
- /*.nextInChain=*/NULL _wgpu_COMMA \
205-
- /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
206-
- /*.layout=*/NULL _wgpu_COMMA \
207-
- /*.entryCount=*/0 _wgpu_COMMA \
208-
- /*.entries=*/NULL _wgpu_COMMA \
209-
-})
210-
-
211-
typedef struct WGPUBindGroupLayoutDescriptor {
212-
WGPUChainedStruct * nextInChain;
213-
WGPUStringView label;
21452
@@
21553
/*.depthStencilAttachment=*/NULL _wgpu_COMMA \
21654
/*.occlusionQuerySet=*/NULL _wgpu_COMMA \
@@ -244,25 +82,3 @@
24482
})
24583

24684
typedef struct WGPUVertexState {
247-
@@
248-
typedef void (*WGPUProcDeviceAddRef)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
249-
typedef void (*WGPUProcDeviceRelease)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
250-
251-
-typedef void (*WGPUProcExternalTextureSetLabel)(WGPUExternalTexture externalTexture, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
252-
-typedef void (*WGPUProcExternalTextureAddRef)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
253-
-typedef void (*WGPUProcExternalTextureRelease)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
254-
-
255-
typedef WGPUSurface (*WGPUProcInstanceCreateSurface)(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
256-
typedef void (*WGPUProcInstanceGetWGSLLanguageFeatures)(WGPUInstance instance, WGPUSupportedWGSLLanguageFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
257-
typedef WGPUBool (*WGPUProcInstanceHasWGSLLanguageFeature)(WGPUInstance instance, WGPUWGSLLanguageFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
258-
@@
259-
WGPU_EXPORT void wgpuDeviceAddRef(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
260-
WGPU_EXPORT void wgpuDeviceRelease(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
261-
262-
-WGPU_EXPORT void wgpuExternalTextureSetLabel(WGPUExternalTexture externalTexture, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
263-
-WGPU_EXPORT void wgpuExternalTextureAddRef(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
264-
-WGPU_EXPORT void wgpuExternalTextureRelease(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
265-
-
266-
WGPU_EXPORT WGPUSurface wgpuInstanceCreateSurface(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
267-
WGPU_EXPORT void wgpuInstanceGetWGSLLanguageFeatures(WGPUInstance instance, WGPUSupportedWGSLLanguageFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
268-
WGPU_EXPORT WGPUBool wgpuInstanceHasWGSLLanguageFeature(WGPUInstance instance, WGPUWGSLLanguageFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;

0 commit comments

Comments
 (0)