Introduce a "callback" type in dawn.json

This replaces all instances of "natively defined" with callbacks and
adds information about the callbacks arguments so that their typedefs
can be autogenerated in dawn.json.

Also adds all the methods using callbacks to the list of handwritten
client commands so that the wire templates don't try to generate code
for them.

BUG=dawn:22

Change-Id: I30ce01e3e688a16b31efa74d0c94ebafdca00985
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13901
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Corentin Wallez
2019-11-22 13:18:22 +00:00
committed by Commit Bot service account
parent 4b0b7a532a
commit 540ababb6b
9 changed files with 139 additions and 99 deletions

View File

@@ -90,7 +90,7 @@ namespace wgpu {
{{as_varName(arg.name)}}.Get()
{%- elif arg.type.category == "enum" or arg.type.category == "bitmask" -%}
static_cast<{{as_cType(arg.type.name)}}>({{as_varName(arg.name)}})
{%- elif arg.type.category in ["native", "natively defined"] -%}
{%- elif arg.type.category in ["callback", "native"] -%}
{{as_varName(arg.name)}}
{%- else -%}
UNHANDLED