It checks every pixel in its 200x200 test area and makes an ok() call for each, typically resulting in 40000 failures when something goes wrong. At 96 bytes each that's a whopping 3.6 MB; way above the 1.5 MB report size limit, thus ensuring that if this one test fails the results from every other Wine test will be lost. So this patch modifies test_depth_bias() to only the report the first failure unless a developper manually runs it with a debug level of 2 or more.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- dlls/d3d10core/tests/d3d10core.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index b9b83f4060d..7b563379f5c 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -15595,7 +15595,12 @@ static void test_depth_bias(void) for (x = 0; x < texture_desc.Width; ++x) { u16 = get_readback_data(&rb, x, y, sizeof(*u16)); - ok(*u16 == 0xffff, "Got unexpected value %#x.\n", *u16); + if (*u16 != 0xffff) + { + ok(0, "Got unexpected value %#x.\n", *u16); + if (winetest_debug <= 1) + break; + } } } release_resource_readback(&rb); @@ -15648,10 +15653,14 @@ static void test_depth_bias(void) { u32 = get_readback_data(&rb, x, y, sizeof(*u32)); u32_value = *u32 >> shift; - ok(abs(u32_value - expected_value) <= 1, - "Got value %#x (%.8e), expected %#x (%.8e).\n", - u32_value, u32_value / 16777215.0f, - expected_value, expected_value / 16777215.0f); + if (abs(u32_value - expected_value) > 1) + { + ok(0, "Got value %#x (%.8e), expected %#x (%.8e).\n", + u32_value, u32_value / 16777215.0f, + expected_value, expected_value / 16777215.0f); + if (winetest_debug <= 1) + break; + } } } release_resource_readback(&rb); @@ -15668,9 +15677,14 @@ static void test_depth_bias(void) for (x = 0; x < texture_desc.Width; ++x) { u16 = get_readback_data(&rb, x, y, sizeof(*u16)); - ok(abs(*u16 - expected_value) <= 1, - "Got value %#x (%.8e), expected %#x (%.8e).\n", - *u16, *u16 / 65535.0f, expected_value, expected_value / 65535.0f); + if (abs(*u16 - expected_value) > 1) + { + ok(0, "Got value %#x (%.8e), expected %#x (%.8e).\n", + *u16, *u16 / 65535.0f, + expected_value, expected_value / 65535.0f); + if (winetest_debug <= 1) + break; + } } } release_resource_readback(&rb);