Add ability to generate constants from dawn.json

The "constant" category has two keys:
 - `"type"`: a string, the name of the base data type
 - `"value"`: a string, the value is defined with preprocessor macro

Remove deprecated constant InputStepMode.

BUG=dawn:1201, dawn:1023

Change-Id: If4308bd5b25dddd9453514ce362bebe4fd771a57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70704
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
This commit is contained in:
fujunwei
2021-11-25 08:44:01 +00:00
committed by Dawn LUCI CQ
parent a329997e27
commit 4e8769087a
5 changed files with 72 additions and 29 deletions

View File

@@ -71,6 +71,10 @@ A **record** is a list of **record members**, each of which is a dictionary with
- `"return_type"` (default to no return type) a string that's the name of the return type.
- `"arguments"` a **record**, so an array of **record members**
**`"constant"`**
- `"type"`: a string, the name of the base data type
- `"value"`: a string, the value is defined with preprocessor macro
## Dawn "wire" generators
The generator for the pieces of dawn_wire need additional data which is found in [`dawn_wire_json`](../dawn_wire.json). Examples of pieces that are generated are: