tint/ast: Generate ast::TexelFormat from intrinsics.def

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: I603c2a1bd238eb8d059f3d13238e5e48379de6af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97202
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton
2022-07-27 22:30:10 +00:00
committed by Dawn LUCI CQ
parent fe8e6ee682
commit 08659d098d
22 changed files with 622 additions and 161 deletions

View File

@@ -75,7 +75,7 @@ sem::Type* StorageTexture::SubtypeFor(ast::TexelFormat format, sem::Manager& typ
return type_mgr.Get<sem::F32>();
}
case ast::TexelFormat::kNone:
case ast::TexelFormat::kInvalid:
break;
}