Generalize multi-aspect formats

Removes special casing depth-stencil or multi-planar formats.
Like depth-stencil, NV12 views can be created but not sampled.

BUG=dawn:551

Change-Id: I3cd43d079253f4ee45660d0efd2723e1650f88d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41342
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Bryan Bernhart
2021-02-16 19:55:09 +00:00
committed by Commit Bot service account
parent 6dd34f7e34
commit 536c7aea7d
8 changed files with 115 additions and 108 deletions

View File

@@ -113,6 +113,7 @@ namespace utils {
// Block size of a multi-planar format depends on aspect.
case wgpu::TextureFormat::R8BG8Biplanar420Unorm:
case wgpu::TextureFormat::Stencil8:
case wgpu::TextureFormat::Undefined:
UNREACHABLE();
}
@@ -180,6 +181,7 @@ namespace utils {
// Block size of a multi-planar format depends on aspect.
case wgpu::TextureFormat::R8BG8Biplanar420Unorm:
case wgpu::TextureFormat::Stencil8:
case wgpu::TextureFormat::Undefined:
UNREACHABLE();
}
@@ -247,6 +249,7 @@ namespace utils {
// Block size of a multi-planar format depends on aspect.
case wgpu::TextureFormat::R8BG8Biplanar420Unorm:
case wgpu::TextureFormat::Stencil8:
case wgpu::TextureFormat::Undefined:
UNREACHABLE();
}