Generate multiple variants of webgpu.h header

Adds a "tag" system so that entries of dawn.json can be conditionally
emitted in different configurations. With a few more dawn.json changes,
this will enable generating the exact upstream header.

Bug: dawn:1080
Change-Id: I3506dadd485e31786578a3a64c3603c964c5354f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62580
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Kai Ninomiya
2021-09-17 19:44:43 +00:00
committed by Dawn LUCI CQ
parent 0a4cb8d859
commit 930e9186a6
11 changed files with 243 additions and 110 deletions

View File

@@ -17,7 +17,7 @@
//* Emscripten's library_webgpu.js.
//* https://github.com/emscripten-core/emscripten/blob/master/src/library_webgpu.js
//*
{% for type in by_category["enum"] if type.javascript %}
{% for type in by_category["enum"] if not type.json_data.get("emscripten_no_enum_table") %}
{{type.name.CamelCase()}}: {% if type.contiguousFromZero -%}
[
{% for value in type.values %}