mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-17 17:31:47 +00:00
Emit unit tests for parsing and printing. Emit benchmarks for parsing. Uses intrinsics.def as a single-source-of-truth. The generators provide a way to optimize the enum parsers. Change-Id: I1669c123d375f24aca45f3ea4abf04d7892673c7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97150 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@chromium.org>
34 lines
955 B
Cheetah
34 lines
955 B
Cheetah
{{- /*
|
|
--------------------------------------------------------------------------------
|
|
Template file for use with tools/src/cmd/gen to generate parameter_usage.h
|
|
|
|
To update the generated file, run:
|
|
./tools/run gen
|
|
|
|
See:
|
|
* tools/src/cmd/gen for structures used by this template
|
|
* https://golang.org/pkg/text/template/ for documentation on the template syntax
|
|
--------------------------------------------------------------------------------
|
|
*/ -}}
|
|
|
|
#ifndef SRC_TINT_SEM_PARAMETER_USAGE_H_
|
|
#define SRC_TINT_SEM_PARAMETER_USAGE_H_
|
|
|
|
namespace tint::sem {
|
|
|
|
/// ParameterUsage is extra metadata for identifying a parameter based on its
|
|
/// overload position
|
|
enum class ParameterUsage {
|
|
kNone = -1,
|
|
{{- range Sem.UniqueParameterNames }}
|
|
k{{PascalCase .}},
|
|
{{- end }}
|
|
};
|
|
|
|
/// @returns a string representation of the given parameter usage.
|
|
const char* str(ParameterUsage usage);
|
|
|
|
} // namespace tint::sem
|
|
|
|
#endif // SRC_TINT_SEM_PARAMETER_USAGE_H_
|