Make dawn_platform.h template flexible

Replace hardcode content with metadata defined in api.json

BUG=dawn:1201
Change-Id: Ib6d6a9c7afc8fb89d3ff2d0129dbfba04adb542a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/73160
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
This commit is contained in:
fujunwei
2021-12-17 00:46:08 +00:00
committed by Dawn LUCI CQ
parent b6dc96055e
commit fc38f7d879
2 changed files with 18 additions and 10 deletions

View File

@@ -870,7 +870,7 @@ class MultiGeneratorFromDawnJSON(Generator):
frontend_params))
renders.append(
FileRender('dawn_native/dawn_platform.h',
'src/dawn_native/dawn_platform_autogen.h',
'src/' + native_dir + '/' + prefix + '_platform_autogen.h',
frontend_params))
renders.append(
FileRender('dawn_native/wgpu_structs.h',