mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
Round up clear texture tests to block size
This commit is contained in:
parent
36defcfdc2
commit
b1b02fb239
@ -490,12 +490,7 @@ fn skybox_bc1() {
|
||||
width: 1024,
|
||||
height: 768,
|
||||
optional_features: wgpu::Features::TEXTURE_COMPRESSION_BC,
|
||||
base_test_parameters: framework::test_common::TestParameters::default().specific_failure(
|
||||
Some(wgpu::Backends::GL),
|
||||
None,
|
||||
Some("ANGLE"),
|
||||
false,
|
||||
), // https://bugs.chromium.org/p/angleproject/issues/detail?id=7056
|
||||
base_test_parameters: framework::test_common::TestParameters::default(), // https://bugs.chromium.org/p/angleproject/issues/detail?id=7056
|
||||
tolerance: 5,
|
||||
max_outliers: 105, // Bounded by llvmpipe
|
||||
});
|
||||
@ -508,12 +503,7 @@ fn skybox_etc2() {
|
||||
width: 1024,
|
||||
height: 768,
|
||||
optional_features: wgpu::Features::TEXTURE_COMPRESSION_ETC2,
|
||||
base_test_parameters: framework::test_common::TestParameters::default().specific_failure(
|
||||
Some(wgpu::Backends::GL),
|
||||
None,
|
||||
Some("ANGLE"),
|
||||
false,
|
||||
), // https://bugs.chromium.org/p/angleproject/issues/detail?id=7056
|
||||
base_test_parameters: framework::test_common::TestParameters::default(), // https://bugs.chromium.org/p/angleproject/issues/detail?id=7056
|
||||
tolerance: 5,
|
||||
max_outliers: 105, // Bounded by llvmpipe
|
||||
});
|
||||
@ -526,12 +516,7 @@ fn skybox_astc() {
|
||||
width: 1024,
|
||||
height: 768,
|
||||
optional_features: wgpu::Features::TEXTURE_COMPRESSION_ASTC_LDR,
|
||||
base_test_parameters: framework::test_common::TestParameters::default().specific_failure(
|
||||
Some(wgpu::Backends::GL),
|
||||
None,
|
||||
Some("ANGLE"),
|
||||
false,
|
||||
), // https://bugs.chromium.org/p/angleproject/issues/detail?id=7056
|
||||
base_test_parameters: framework::test_common::TestParameters::default(), // https://bugs.chromium.org/p/angleproject/issues/detail?id=7056
|
||||
tolerance: 5,
|
||||
max_outliers: 300, // Bounded by rp4 on vk
|
||||
});
|
||||
|
@ -239,6 +239,10 @@ fn single_texture_clear_test(
|
||||
// TODO: Read back and check zeroness?
|
||||
}
|
||||
|
||||
fn round_up(value: u32, alignment: u32) -> u32 {
|
||||
((value + alignment - 1) / alignment) * alignment
|
||||
}
|
||||
|
||||
fn clear_texture_tests(
|
||||
ctx: &TestingContext,
|
||||
formats: &[wgpu::TextureFormat],
|
||||
@ -246,13 +250,17 @@ fn clear_texture_tests(
|
||||
supports_3d: bool,
|
||||
) {
|
||||
for &format in formats {
|
||||
let desc = format.describe();
|
||||
let rounded_width = round_up(64, desc.block_dimensions.0 as u32);
|
||||
let rounded_height = round_up(64, desc.block_dimensions.1 as u32);
|
||||
|
||||
// 1D texture
|
||||
if supports_1d {
|
||||
single_texture_clear_test(
|
||||
ctx,
|
||||
format,
|
||||
wgpu::Extent3d {
|
||||
width: 64,
|
||||
width: rounded_width,
|
||||
height: 1,
|
||||
depth_or_array_layers: 1,
|
||||
},
|
||||
@ -264,8 +272,8 @@ fn clear_texture_tests(
|
||||
ctx,
|
||||
format,
|
||||
wgpu::Extent3d {
|
||||
width: 64,
|
||||
height: 64,
|
||||
width: rounded_width,
|
||||
height: rounded_height,
|
||||
depth_or_array_layers: 1,
|
||||
},
|
||||
wgpu::TextureDimension::D2,
|
||||
@ -275,8 +283,8 @@ fn clear_texture_tests(
|
||||
ctx,
|
||||
format,
|
||||
wgpu::Extent3d {
|
||||
width: 64,
|
||||
height: 64,
|
||||
width: rounded_width,
|
||||
height: rounded_height,
|
||||
depth_or_array_layers: 4,
|
||||
},
|
||||
wgpu::TextureDimension::D2,
|
||||
@ -287,8 +295,8 @@ fn clear_texture_tests(
|
||||
ctx,
|
||||
format,
|
||||
wgpu::Extent3d {
|
||||
width: 16,
|
||||
height: 16,
|
||||
width: rounded_width,
|
||||
height: rounded_height,
|
||||
depth_or_array_layers: 16,
|
||||
},
|
||||
wgpu::TextureDimension::D3,
|
||||
|
Loading…
Reference in New Issue
Block a user