Default viewFormats to nullptr.
This fixes an issue which triggers an assertion in library_webgpu.js when building for Emscripten unless explicitly set:
https://dawn.googlesource.com/dawn/+/refs/heads/main/third_party/emdawnwebgpu/library_webgpu.js#2299
Change-Id: Ie914e5456842c00d1949bfc1521a4dedb615f028
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/212454
Commit-Queue: Nicolas Chavez <nickchavez@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
diff --git a/src/dawn/dawn.json b/src/dawn/dawn.json
index dafb1cc..bfa79d0 100644
--- a/src/dawn/dawn.json
+++ b/src/dawn/dawn.json
@@ -471,7 +471,7 @@
{"name": "format", "type": "texture format"},
{"name": "usage", "type": "texture usage", "default": "render attachment"},
{"name": "view format count", "type": "size_t", "default": 0},
- {"name": "view formats", "type": "texture format", "annotation": "const*", "length": "view format count"},
+ {"name": "view formats", "type": "texture format", "annotation": "const*", "length": "view format count", "default": "nullptr"},
{"name": "alpha mode", "type": "composite alpha mode", "default": "auto"},
{"name": "width", "type": "uint32_t"},
{"name": "height", "type": "uint32_t"},
@@ -4165,7 +4165,7 @@
{"name": "mip level count", "type": "uint32_t", "default": 1},
{"name": "sample count", "type": "uint32_t", "default": 1},
{"name": "view format count", "type": "size_t", "default": 0},
- {"name": "view formats", "type": "texture format", "annotation": "const*", "length": "view format count"}
+ {"name": "view formats", "type": "texture format", "annotation": "const*", "length": "view format count", "default": "nullptr"}
]
},
"texture binding view dimension descriptor": {