From ec8413dfcb76d3e3343783b0637bea245250141a Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Thu, 14 Oct 2021 19:24:30 -0400 Subject: [PATCH] Build fixes after a bad merge (#2071) --- wgpu-core/src/command/clear.rs | 2 +- wgpu/tests/clear_texture.rs | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/wgpu-core/src/command/clear.rs b/wgpu-core/src/command/clear.rs index 1247608dc5..e7e6032b76 100644 --- a/wgpu-core/src/command/clear.rs +++ b/wgpu-core/src/command/clear.rs @@ -298,7 +298,7 @@ pub(crate) fn collect_zero_buffer_copies_for_clear_texture( let bytes_per_row = align_to( // row is at least one block wide, need to round up - (mip_size.width + format_desc.block_dimensions.1 as u32 - 1) + (mip_size.width + format_desc.block_dimensions.0 as u32 - 1) / format_desc.block_dimensions.0 as u32 * format_desc.block_size as u32, bytes_per_row_alignment, diff --git a/wgpu/tests/clear_texture.rs b/wgpu/tests/clear_texture.rs index ec218cff61..8f56e3b00e 100644 --- a/wgpu/tests/clear_texture.rs +++ b/wgpu/tests/clear_texture.rs @@ -62,14 +62,16 @@ static TEXTURE_FORMATS_BC: &[wgpu::TextureFormat] = &[ // needs TEXTURE_COMPRESSION_ETC2 static TEXTURE_FORMATS_ETC2: &[wgpu::TextureFormat] = &[ - wgpu::TextureFormat::Etc2RgbUnorm, - wgpu::TextureFormat::Etc2RgbUnormSrgb, - wgpu::TextureFormat::Etc2RgbA1Unorm, - wgpu::TextureFormat::Etc2RgbA1UnormSrgb, - wgpu::TextureFormat::EacRUnorm, - wgpu::TextureFormat::EacRSnorm, - wgpu::TextureFormat::EacRgUnorm, - wgpu::TextureFormat::EacRgSnorm, + wgpu::TextureFormat::Etc2Rgb8Unorm, + wgpu::TextureFormat::Etc2Rgb8UnormSrgb, + wgpu::TextureFormat::Etc2Rgb8A1Unorm, + wgpu::TextureFormat::Etc2Rgb8A1UnormSrgb, + wgpu::TextureFormat::Etc2Rgba8Unorm, + wgpu::TextureFormat::Etc2Rgba8UnormSrgb, + wgpu::TextureFormat::EacR11Unorm, + wgpu::TextureFormat::EacR11Snorm, + wgpu::TextureFormat::EacRg11Unorm, + wgpu::TextureFormat::EacRg11Snorm, ]; // needs TEXTURE_COMPRESSION_ASTC_LDR