Update dawn.json to more closely match webgpu.h

- Move wgpu::TextureUsage::Storage at the end of the enum.
 - Reorder some methods of device to be in alphabetical order.
 - Reorder members of wgpu::QuerySetDescriptor.
 - Change SurfaceDescriptorFromHTMLCanvasID to
   SurfaceDescriptorFromCanvasHTMLDescriptor.

Bug: dawn:22
Change-Id: Ib18fbaf153ad2969b0d0c4e49682e8736b00776c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24280
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2020-07-06 18:50:00 +00:00 committed by Commit Bot service account
parent dbf805fe8d
commit 9585c468a2
3 changed files with 25 additions and 25 deletions

View File

@ -117,9 +117,9 @@
{"value": 3, "name": "sampler"},
{"value": 4, "name": "comparison sampler"},
{"value": 5, "name": "sampled texture"},
{"value": 6, "name": "storage texture"},
{"value": 7, "name": "readonly storage texture"},
{"value": 8, "name": "writeonly storage texture"}
{"value": 6, "name": "readonly storage texture"},
{"value": 7, "name": "writeonly storage texture"},
{"value": 8, "name": "storage texture"}
]
},
"blend descriptor": {
@ -569,13 +569,6 @@
{"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}
]
},
{
"name": "create render pipeline",
"returns": "render pipeline",
"args": [
{"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}
]
},
{
"name": "create pipeline layout",
"returns": "pipeline layout",
@ -583,6 +576,13 @@
{"name": "descriptor", "type": "pipeline layout descriptor", "annotation": "const*"}
]
},
{
"name": "create query set",
"returns": "query set",
"args": [
{"name": "descriptor", "type": "query set descriptor", "annotation": "const*"}
]
},
{
"name": "create render bundle encoder",
"returns": "render bundle encoder",
@ -590,6 +590,13 @@
{"name": "descriptor", "type": "render bundle encoder descriptor", "annotation": "const*"}
]
},
{
"name": "create render pipeline",
"returns": "render pipeline",
"args": [
{"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}
]
},
{
"name": "create sampler",
"returns": "sampler",
@ -664,13 +671,6 @@
{"name": "callback", "type": "error callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
{
"name": "create query set",
"returns": "query set",
"args": [
{"name": "descriptor", "type": "query set descriptor", "annotation": "const*"}
]
}
]
},
@ -940,8 +940,8 @@
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "type", "type": "query type"},
{"name": "count", "type": "uint32_t"},
{"name": "pipeline statistics count", "type": "uint32_t", "default": "0"},
{"name": "pipeline statistics", "type": "pipeline statistics name", "annotation": "const*", "length": "pipeline statistics count"}
{"name": "pipeline statistics", "type": "pipeline statistics name", "annotation": "const*", "length": "pipeline statistics count"},
{"name": "pipeline statistics count", "type": "uint32_t", "default": "0"}
]
},
"query type": {
@ -1418,11 +1418,11 @@
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
]
},
"surface descriptor from HTML canvas id": {
"surface descriptor from canvas HTML selector": {
"category": "structure",
"chained": true,
"members": [
{"name": "id", "type": "char", "annotation": "const*", "length": "strlen"}
{"name": "selector", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
"surface descriptor from metal layer": {
@ -1488,7 +1488,7 @@
{"value": 1, "name": "surface descriptor from metal layer"},
{"value": 2, "name": "surface descriptor from windows HWND"},
{"value": 3, "name": "surface descriptor from xlib"},
{"value": 4, "name": "surface descriptor from HTML canvas id"},
{"value": 4, "name": "surface descriptor from canvas HTML selector"},
{"value": 5, "name": "shader module SPIRV descriptor"},
{"value": 6, "name": "shader module WGSL descriptor"},
{"value": 7, "name": "sampler descriptor dummy anisotropic filtering"},

View File

@ -99,7 +99,7 @@ namespace dawn_native {
}
#endif // defined(DAWN_USE_X11)
case wgpu::SType::SurfaceDescriptorFromHTMLCanvasId:
case wgpu::SType::SurfaceDescriptorFromCanvasHTMLSelector:
default:
return DAWN_VALIDATION_ERROR("Unsupported sType");
}

View File

@ -115,8 +115,8 @@ TEST_F(WindowSurfaceInstanceTests, BadChainedDescriptors) {
// Test that a chained descriptor with HTMLCanvas produces an error.
TEST_F(WindowSurfaceInstanceTests, HTMLCanvasDescriptor) {
wgpu::SurfaceDescriptorFromHTMLCanvasId chainedDescriptor;
chainedDescriptor.id = "myCanvas";
wgpu::SurfaceDescriptorFromCanvasHTMLSelector chainedDescriptor;
chainedDescriptor.selector = "#myCanvas";
wgpu::SurfaceDescriptor descriptor;
descriptor.nextInChain = &chainedDescriptor;