mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
Implement builder callback forwarding in the wire
This commit is contained in:
committed by
Corentin Wallez
parent
7f96177289
commit
cd0ea35889
@@ -91,6 +91,7 @@ class ObjectType(Type):
|
||||
Type.__init__(self, name, record)
|
||||
self.methods = []
|
||||
self.native_methods = []
|
||||
self.built_type = None
|
||||
|
||||
############################################################
|
||||
# PARSE
|
||||
@@ -124,6 +125,14 @@ def link_object(obj, types):
|
||||
obj.methods = [method for method in methods if not is_native_method(method)]
|
||||
obj.native_methods = [method for method in methods if is_native_method(method)]
|
||||
|
||||
# Compute the built object type for builders
|
||||
if obj.is_builder:
|
||||
for method in obj.methods:
|
||||
if method.name.canonical_case() == "get result":
|
||||
obj.built_type = method.return_type
|
||||
break
|
||||
assert(obj.built_type != None)
|
||||
|
||||
def parse_json(json):
|
||||
category_to_parser = {
|
||||
'bitmask': BitmaskType,
|
||||
|
||||
Reference in New Issue
Block a user