| {{- /* |
| -------------------------------------------------------------------------------- |
| Template file for use with tools/src/cmd/gen to generate parameter_usage.cc |
| |
| 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 |
| -------------------------------------------------------------------------------- |
| */ -}} |
| |
| #include "src/tint/lang/wgsl/sem/parameter_usage.h" |
| |
| namespace tint::sem { |
| |
| const char* str(ParameterUsage usage) { |
| switch (usage) { |
| case ParameterUsage::kNone: |
| return "none"; |
| {{- range Sem.UniqueParameterNames }} |
| case ParameterUsage::k{{PascalCase .}}: |
| return "{{.}}"; |
| {{- end }} |
| } |
| return "<unknown>"; |
| } |
| |
| } // namespace tint::sem |