Add utilities for printing Dawn enums and bitmasks

This is a header-only utility so it can be easily included and
used anyhere. Include it in DawnTest.h to automatically pick up
definitions to print test parameters.

Also, work around bot limitations for very-long test names.

Bug: none
Change-Id: I940263ab0a4cc415b06fa04749694f16ff08335c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51841
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng
2021-06-01 18:49:12 +00:00
committed by Dawn LUCI CQ
parent f56dab0d72
commit a9e39e11a8
6 changed files with 154 additions and 23 deletions

View File

@@ -697,6 +697,11 @@ class MultiGeneratorFromDawnJSON(Generator):
FileRender('webgpu_cpp.h', 'src/include/dawn/webgpu_cpp.h',
[base_params, api_params]))
renders.append(
FileRender('webgpu_cpp_print.h',
'src/include/dawn/webgpu_cpp_print.h',
[base_params, api_params]))
if 'dawn_proc' in targets:
renders.append(
FileRender('dawn_proc.c', 'src/dawn/dawn_proc.c',