Expand coverage of NonzeroTextureCreationTests

Expand coverage for these tests by using combinatorial test
parameterization. Covers more cases and expands coverage to
compressed textures. This caught a bug on Vulkan where only the
first region for multi-layer compressed texture copies was cleared.
It also caught a driver bug on some Intel platforms, where clearing
the non-zero mip of a depth texture does not work.

Bug: dawn:780
Change-Id: Ic601bae111c1c2dd150f569d7e02759ca765201e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51680
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng
2021-06-01 20:43:53 +00:00
committed by Dawn LUCI CQ
parent 88097989d0
commit ff70f98545
4 changed files with 292 additions and 240 deletions

View File

@@ -26,7 +26,9 @@ namespace utils {
uint32_t GetMinimumBytesPerRow(wgpu::TextureFormat format, uint32_t width) {
const uint32_t bytesPerBlock = utils::GetTexelBlockSizeInBytes(format);
return Align(bytesPerBlock * width, kTextureBytesPerRowAlignment);
const uint32_t blockWidth = utils::GetTextureFormatBlockWidth(format);
ASSERT(width % blockWidth == 0);
return Align(bytesPerBlock * (width / blockWidth), kTextureBytesPerRowAlignment);
}
TextureDataCopyLayout GetTextureDataCopyLayoutForTexture2DAtLevel(