mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 09:55:26 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user