Signed-off-by: Chip Davis cdavis@codeweavers.com --- dlls/d3d11/tests/d3d11.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 37ec829cd78..3ae05537a1e 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -1011,7 +1011,7 @@ static void check_readback_data_u8_(unsigned int line, struct resource_readback for (x = rect->left; x < rect->right; ++x) { value = get_readback_u8(rb, x, y, z); - if (abs((int)value - (int)expected_value) > max_diff) + if (!compare_uint(value, expected_value, max_diff)) goto done; } } @@ -1046,7 +1046,7 @@ static void check_readback_data_u16_(unsigned int line, struct resource_readback for (x = rect->left; x < rect->right; ++x) { value = get_readback_u16(rb, x, y, z); - if (abs((int)value - (int)expected_value) > max_diff) + if (!compare_uint(value, expected_value, max_diff)) goto done; } } @@ -1081,7 +1081,7 @@ static void check_readback_data_u24_(unsigned int line, struct resource_readback for (x = rect->left; x < rect->right; ++x) { value = get_readback_u32(rb, x, y, z) >> shift; - if (abs((int)value - (int)expected_value) > max_diff) + if (!compare_uint(value, expected_value, max_diff)) goto done; } } @@ -25841,7 +25841,7 @@ static void test_depth_bias(void) u32 = get_readback_data(&rb, 0, y, 0, sizeof(*u32)); u32_value = *u32 >> shift; expected_value = depth * 16777215.0f + 0.5f; - all_match = abs(u32_value - expected_value) <= 3; + all_match = compare_uint(u32_value, expected_value, 3); ok(all_match, "Got value %#x (%.8e), expected %#x (%.8e).\n", u32_value, u32_value / 16777215.0f, @@ -25850,7 +25850,7 @@ static void test_depth_bias(void) case DXGI_FORMAT_D16_UNORM: u16 = get_readback_data(&rb, 0, y, 0, sizeof(*u16)); expected_value = depth * 65535.0f + 0.5f; - all_match = abs(*u16 - expected_value) <= 1; + all_match = compare_uint(*u16, expected_value, 1); ok(all_match, "Got value %#x (%.8e), expected %#x (%.8e).\n", *u16, *u16 / 65535.0f, expected_value, expected_value / 65535.0f);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68874
Your paranoid android.
=== w864 (32 bit report) ===
d3d11: d3d11.c:6105: Test failed: Got unexpected NumPrimitivesWritten: 2888510267.
=== w1064v1809_2scr (32 bit report) ===
d3d11: d3d11.c:5775: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5776: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5777: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5780: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5781: Test failed: Got unexpected CPrimitives count: 0.
=== w1064v1809_ar (32 bit report) ===
d3d11: d3d11.c:5775: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5776: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5777: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5780: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5781: Test failed: Got unexpected CPrimitives count: 0. d3d11.c:5622: Test failed: Got unexpected query result 0x0000000000000000. d3d11.c:5792: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5793: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5794: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5797: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5798: Test failed: Got unexpected CPrimitives count: 0. d3d11.c:5799: Test failed: Got unexpected PSInvocations count: 0.