mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 05:27:49 +00:00
Add a category named function in dawn.json
Rename "callback" to "function pointer" category. The function does not belongs to any class that has below two keys: - `"returns"` a string that's the name of the return type - `"args"` a **record**, so an array of **record members** BUG=dawn:1201 Change-Id: I546301a19af9472501122e759c495fd761e27ed5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71060 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Junwei Fu <junwei.fu@intel.com>
This commit is contained in:
@@ -57,7 +57,8 @@ A **record** is a list of **record members**, each of which is a dictionary with
|
||||
|
||||
**`"bitmask"`** an `uint32_t`-based bitmask. It is similar to **`"enum"`** but can be output differently.
|
||||
|
||||
**`"callback"`** defines a function pointer type that can be used by other things (usually callbacks passed to method calls)
|
||||
**`"function pointer"`** defines a function pointer type that can be used by other things.
|
||||
- `"returns"` a string that's the name of the return type
|
||||
- `"args"` a **record**, so an array of **record members**
|
||||
|
||||
**`"structure"`**
|
||||
@@ -75,6 +76,10 @@ A **record** is a list of **record members**, each of which is a dictionary with
|
||||
- `"type"`: a string, the name of the base data type
|
||||
- `"value"`: a string, the value is defined with preprocessor macro
|
||||
|
||||
**`"function"`** declares a function that not belongs to any class.
|
||||
- `"returns"` a string that's the name of the return type
|
||||
- `"args"` a **record**, so an array of **record members**
|
||||
|
||||
## 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:
|
||||
|
||||
Reference in New Issue
Block a user