dawn.json changes to match upstream webgpu.h

Bug: dawn:1080
Change-Id: Icc77f8ccd5a07162d0e7795d7160d936f9c33e49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64620
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Kai Ninomiya 2021-09-21 17:36:27 +00:00 committed by Dawn LUCI CQ
parent edeb54abf3
commit 7d174a1eff
3 changed files with 66 additions and 6 deletions

View File

@ -22,7 +22,9 @@
"extensible": "in",
"tags": ["upstream"],
"members": [
{"name": "compatible surface", "type": "surface"}
{"name": "compatible surface", "type": "surface"},
{"name": "power preference", "type": "power preference", "tags": ["upstream"]},
{"name": "force fallback adapter", "type": "bool", "tags": ["upstream"]}
]
},
"request adapter status": {
@ -50,6 +52,14 @@
"category": "object",
"tags": ["upstream"],
"methods": [
{
"name": "get limits",
"returns": "bool",
"tags": ["upstream"],
"args": [
{"name": "limits", "type": "supported limits", "annotation": "*"}
]
},
{
"name": "get properties",
"tags": ["upstream"],
@ -57,6 +67,14 @@
{"name": "properties", "type": "adapter properties", "annotation": "*"}
]
},
{
"name": "has feature",
"returns": "bool",
"tags": ["upstream"],
"args": [
{"name": "feature", "type": "feature name"}
]
},
{
"name": "request device",
"args": [
@ -94,7 +112,11 @@
"extensible": "in",
"tags": ["upstream"],
"_TODO": "Add requiredFeatures and requiredLimits support",
"members": []
"members": [
{"name": "required features count", "type": "uint32_t"},
{"name": "required features", "type": "feature name", "annotation": "const*", "length": "required features count"},
{"name": "required limits", "type": "required limits", "annotation": "const*"}
]
},
"address mode": {
"category": "enum",
@ -412,6 +434,14 @@
{"value": 15, "name": "all"}
]
},
"constant entry": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "key", "type": "char", "annotation": "const*"},
{"name": "value", "type": "double"}
]
},
"command buffer": {
"category": "object"
},
@ -524,6 +554,7 @@
},
{
"name": "write buffer",
"tags": ["dawn"],
"args": [
{"name": "buffer", "type": "buffer"},
{"name": "buffer offset", "type": "uint64_t"},
@ -1126,6 +1157,21 @@
{"name": "format", "type": "texture format"}
]
},
"feature name": {
"category": "enum",
"tags": ["upstream"],
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined"},
{"value": 1, "name": "depth clamping"},
{"value": 2, "name": "depth24 unorm stencil8"},
{"value": 3, "name": "depth32 float stencil8"},
{"value": 4, "name": "timestamp query"},
{"value": 5, "name": "pipeline statistics query"},
{"value": 6, "name": "texture compression BC"},
{"value": 7, "name": "texture compression ETC2"},
{"value": 8, "name": "texture compression ASTC"}
]
},
"filter mode": {
"category": "enum",
"values": [
@ -1278,6 +1324,14 @@
{"value": 4, "name": "compute shader invocations"}
]
},
"power preference": {
"category": "enum",
"tags": ["upstream"],
"values": [
{"value": 0, "name": "low power"},
{"value": 1, "name": "high performance"}
]
},
"present mode": {
"category": "enum",
"emscripten_no_enum_table": true,
@ -1292,7 +1346,9 @@
"extensible": "in",
"members": [
{"name": "module", "type": "shader module"},
{"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"}
{"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "constant count", "type": "uint32_t", "tags": ["upstream"]},
{"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count", "tags": ["upstream"]}
]
},
"primitive topology": {
@ -1760,6 +1816,8 @@
"members": [
{"name": "module", "type": "shader module"},
{"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "constant count", "type": "uint32_t", "tags": ["upstream"]},
{"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count", "tags": ["upstream"]},
{"name": "buffer count", "type": "uint32_t", "default": 0},
{"name": "buffers", "type": "vertex buffer layout", "annotation": "const*", "length": "buffer count"}
]
@ -1817,6 +1875,8 @@
"members": [
{"name": "module", "type": "shader module"},
{"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "constant count", "type": "uint32_t", "tags": ["upstream"]},
{"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count", "tags": ["upstream"]},
{"name": "target count", "type": "uint32_t"},
{"name": "targets", "type": "color target state", "annotation": "const*", "length": "target count"}
]

View File

@ -309,7 +309,7 @@ def link_typedef(typedef, types):
# similar to the original order (though the sort isn't technically stable).
#
# It works by computing for each struct type what is the depth of its DAG of
# dependents, then resorting based on that depth using Python's stable sort.
# dependents, then re-sorting based on that depth using Python's stable sort.
# This makes a toposort because if A depends on B then its depth will be bigger
# than B's. It is also nice because all nodes with the same depth are kept in
# the input order.