Support "length" in dawn.json could be a integer
Struct member defined in dawn.json could have a 'length' attribute
defines the length of the member if it is an array.
In previous, the 'length' could only be 'strlen' or other variable
which has 'uint32_t' types. It cannot support constant length.
CopyTextureForBrowserOptions transfers conversion parameters and
conversion matrix with a constant length. This CL adds this ability
to meet such requirements.
Bug: dawn:1140
Change-Id: I6eeabbc55cc3853fe15e33bdd44060b16f6096bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
diff --git a/dawn.json b/dawn.json
index 97cff4a..e9eea72 100644
--- a/dawn.json
+++ b/dawn.json
@@ -881,14 +881,12 @@
{"name": "alpha op", "type": "alpha op", "default": "dont change", "tags": ["deprecated"]},
{"name": "needs color space conversion", "type": "bool", "default": "false"},
{"name": "src alpha mode", "type": "alpha mode", "default": "unpremultiplied"},
- {"name": "transfer function parameters count", "type": "uint32_t", "default": "0"},
{"name": "src transfer function parameters", "type": "float", "annotation": "const*",
- "length": "transfer function parameters count", "default": "nullptr"},
- {"name": "conversion matrix elements count", "type": "uint32_t", "default": "0"},
+ "length": 7, "optional": true},
{"name": "conversion matrix", "type": "float", "annotation": "const*",
- "length": "conversion matrix elements count", "default": "nullptr"},
+ "length": 9, "optional": true},
{"name": "dst transfer function parameters", "type": "float", "annotation": "const*",
- "length": "transfer function parameters count", "default": "nullptr"},
+ "length": 7, "optional": true},
{"name": "dst alpha mode", "type": "alpha mode", "default": "unpremultiplied"}
]
},