mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Rename DeviceErrorCallback to ErrorCallback and add ErrorType arg
This same callback will be used for push/pop error scope. Bug: dawn:153 Change-Id: I2771539e13f8a4e6a59f13c8082689d25ba44905 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10460 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
5603dc9044
commit
cb0cb658d4
@@ -430,6 +430,14 @@ def as_frontendType(typ):
|
||||
else:
|
||||
return as_cType(typ.name)
|
||||
|
||||
def as_wireType(typ):
|
||||
if typ.category == 'object':
|
||||
return typ.name.CamelCase() + '*'
|
||||
elif typ.category in ['bitmask', 'enum']:
|
||||
return 'Dawn' + typ.name.CamelCase()
|
||||
else:
|
||||
return as_cppType(typ.name)
|
||||
|
||||
def cpp_native_methods(types, typ):
|
||||
return typ.methods + typ.native_methods
|
||||
|
||||
@@ -522,7 +530,8 @@ class MultiGeneratorFromDawnJSON(Generator):
|
||||
api_params,
|
||||
c_params,
|
||||
{
|
||||
'as_wireType': lambda typ: typ.name.CamelCase() + '*' if typ.category == 'object' else as_cppType(typ.name)
|
||||
'as_wireType': as_wireType,
|
||||
'as_annotated_wireType': lambda arg: annotated(as_wireType(arg.type), arg),
|
||||
},
|
||||
additional_params
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user