ast: Remove unsupported texel formats

Fixed: tint:1361
Change-Id: Idcf98713d9a380e56811bea6419913714d602103
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/75582
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2022-01-06 18:37:01 +00:00
committed by Tint LUCI CQ
parent 3cbb136b8a
commit 4d245d9a36
18 changed files with 132 additions and 637 deletions

View File

@@ -48,11 +48,7 @@ std::string StorageTexture::FriendlyName(const SymbolTable&) const {
sem::Type* StorageTexture::SubtypeFor(ast::TexelFormat format,
sem::Manager& type_mgr) {
switch (format) {
case ast::TexelFormat::kR8Uint:
case ast::TexelFormat::kR16Uint:
case ast::TexelFormat::kRg8Uint:
case ast::TexelFormat::kR32Uint:
case ast::TexelFormat::kRg16Uint:
case ast::TexelFormat::kRgba8Uint:
case ast::TexelFormat::kRg32Uint:
case ast::TexelFormat::kRgba16Uint:
@@ -60,11 +56,7 @@ sem::Type* StorageTexture::SubtypeFor(ast::TexelFormat format,
return type_mgr.Get<sem::U32>();
}
case ast::TexelFormat::kR8Sint:
case ast::TexelFormat::kR16Sint:
case ast::TexelFormat::kRg8Sint:
case ast::TexelFormat::kR32Sint:
case ast::TexelFormat::kRg16Sint:
case ast::TexelFormat::kRgba8Sint:
case ast::TexelFormat::kRg32Sint:
case ast::TexelFormat::kRgba16Sint:
@@ -72,20 +64,9 @@ sem::Type* StorageTexture::SubtypeFor(ast::TexelFormat format,
return type_mgr.Get<sem::I32>();
}
case ast::TexelFormat::kR8Unorm:
case ast::TexelFormat::kRg8Unorm:
case ast::TexelFormat::kRgba8Unorm:
case ast::TexelFormat::kRgba8UnormSrgb:
case ast::TexelFormat::kBgra8Unorm:
case ast::TexelFormat::kBgra8UnormSrgb:
case ast::TexelFormat::kRgb10A2Unorm:
case ast::TexelFormat::kR8Snorm:
case ast::TexelFormat::kRg8Snorm:
case ast::TexelFormat::kRgba8Snorm:
case ast::TexelFormat::kR16Float:
case ast::TexelFormat::kR32Float:
case ast::TexelFormat::kRg16Float:
case ast::TexelFormat::kRg11B10Float:
case ast::TexelFormat::kRg32Float:
case ast::TexelFormat::kRgba16Float:
case ast::TexelFormat::kRgba32Float: {