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 ---
This version takes care of a few more messages. Also it indicates which round of a loop caused the failure.
Finally, as far as I can tell, the crash on line 102 is random and not caused by this patch.
dlls/d3d10core/tests/d3d10core.c | 53 +++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 14 deletions(-)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index b9b83f4060d..59c90a697bb 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); @@ -15742,28 +15756,37 @@ static void test_depth_bias(void) case DXGI_FORMAT_D32_FLOAT: data = get_readback_float(&rb, 0, y); ok(compare_float(data, depth, 64), - "Got depth %.8e, expected %.8e.\n", data, depth); + "%d,%d,%d,%d Got depth %.8e, expected %.8e.\n", i, j, k, y, data, depth); + if (winetest_debug <= 1) + goto next_clamp_test; break; case DXGI_FORMAT_D24_UNORM_S8_UINT: u32 = get_readback_data(&rb, 0, y, sizeof(*u32)); u32_value = *u32 >> shift; expected_value = depth * 16777215.0f + 0.5f; ok(abs(u32_value - expected_value) <= 3, - "Got value %#x (%.8e), expected %#x (%.8e).\n", - u32_value, u32_value / 16777215.0f, - expected_value, expected_value / 16777215.0f); + "%d,%d,%d,%d Got value %#x (%.8e), expected %#x (%.8e).\n", + i, j, k, y, + u32_value, u32_value / 16777215.0f, + expected_value, expected_value / 16777215.0f); + if (winetest_debug <= 1) + goto next_clamp_test; break; case DXGI_FORMAT_D16_UNORM: u16 = get_readback_data(&rb, 0, y, sizeof(*u16)); expected_value = depth * 65535.0f + 0.5f; ok(abs(*u16 - expected_value) <= 1, - "Got value %#x (%.8e), expected %#x (%.8e).\n", - *u16, *u16 / 65535.0f, expected_value, expected_value / 65535.0f); + "%d,%d,%d,%d Got value %#x (%.8e), expected %#x (%.8e).\n", + i, j, k, y, *u16, *u16 / 65535.0f, + expected_value, expected_value / 65535.0f); + if (winetest_debug <= 1) + goto next_clamp_test; break; default: break; } } + next_clamp_test: release_resource_readback(&rb); ID3D10RasterizerState_Release(rs); } @@ -16810,6 +16833,8 @@ static void test_generate_mips(void) ok(color == expected_color, "Resource type %u, test %u: pixel (%u, %u) " "has color %08x, expected %08x.\n", i, j, expected[k].pos.x, expected[k].pos.y, color, expected_color); + if (winetest_debug <= 1) + break; } release_resource_readback(&rb);