Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d11/tests/d3d11.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 64729d5f03d0..3d6cbf57e20f 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -14524,31 +14524,36 @@ static void test_clear_buffer_unordered_access_view(void)
for (i = 0; i < ARRAY_SIZE(uvec4_data); ++i) { + const struct uvec4 *data = NULL; + BOOL all_match; + uvec4 = uvec4_data[i]; ID3D11DeviceContext_ClearUnorderedAccessViewUint(context, uav, &uvec4.x); get_buffer_readback(buffer, &rb); - for (x = 0; x < buffer_desc.ByteWidth / sizeof(uvec4); ++x) + for (x = 0, all_match = TRUE; x < buffer_desc.ByteWidth / sizeof(uvec4); ++x) { - const struct uvec4 *data = get_readback_uvec4(&rb, x, 0); const struct uvec4 broken_result = {uvec4.x, uvec4.x, uvec4.x, uvec4.x}; /* Intel */ - ok(compare_uvec4(data, &uvec4) || broken(compare_uvec4(data, &broken_result)), - "Got {%#x, %#x, %#x, %#x}, expected {%#x, %#x, %#x, %#x} at %u.\n", - data->x, data->y, data->z, data->w, uvec4.x, uvec4.y, uvec4.z, uvec4.w, i); + data = get_readback_uvec4(&rb, x, 0); + if (!(compare_uvec4(data, &uvec4) || broken(compare_uvec4(data, &broken_result)))) + all_match = FALSE; } + ok(all_match, "Got {%#x, %#x, %#x, %#x}, expected {%#x, %#x, %#x, %#x} at %u.\n", + data->x, data->y, data->z, data->w, uvec4.x, uvec4.y, uvec4.z, uvec4.w, x); release_resource_readback(&rb);
ID3D11DeviceContext_ClearUnorderedAccessViewUint(context, uav2, &fe_uvec4.x); get_buffer_readback(buffer, &rb); - for (x = 0; x < buffer_desc.ByteWidth / sizeof(uvec4); ++x) + for (x = 0, all_match = TRUE; x < buffer_desc.ByteWidth / sizeof(uvec4); ++x) { - const struct uvec4 *data = get_readback_uvec4(&rb, x, 0); struct uvec4 broken_result; + data = get_readback_uvec4(&rb, x, 0); uvec4 = U(uav_desc).Buffer.FirstElement <= x ? fe_uvec4 : uvec4_data[i]; broken_result.x = broken_result.y = broken_result.z = broken_result.w = uvec4.x; - ok(compare_uvec4(data, &uvec4) || broken(compare_uvec4(data, &broken_result)), - "Got {%#x, %#x, %#x, %#x}, expected {%#x, %#x, %#x, %#x} at %u.\n", - data->x, data->y, data->z, data->w, uvec4.x, uvec4.y, uvec4.z, uvec4.w, i); + if (!(compare_uvec4(data, &uvec4) || broken(compare_uvec4(data, &broken_result)))) + all_match = FALSE; } + ok(all_match, "Got {%#x, %#x, %#x, %#x}, expected {%#x, %#x, %#x, %#x} at %u.\n", + data->x, data->y, data->z, data->w, uvec4.x, uvec4.y, uvec4.z, uvec4.w, x); release_resource_readback(&rb); }
@@ -14574,17 +14579,16 @@ static void test_clear_buffer_unordered_access_view(void) uvec4 = uvec4_data[i]; ID3D11DeviceContext_ClearUnorderedAccessViewUint(context, uav, &uvec4.x); get_buffer_readback(buffer, &rb); - for (x = 0; x < buffer_desc.ByteWidth / sizeof(uvec4.x); ++x) - todo_wine check_rgba_sint8(get_readback_color(&rb, x, 0, 0), &uvec4); + todo_wine check_rgba_sint8(get_readback_color(&rb, 0, 0, 0), &uvec4); + todo_wine check_rgba_sint8(get_readback_color(&rb, 7, 0, 0), &uvec4); + todo_wine check_rgba_sint8(get_readback_color(&rb, 15, 0, 0), &uvec4); release_resource_readback(&rb);
ID3D11DeviceContext_ClearUnorderedAccessViewUint(context, uav2, &fe_uvec4.x); get_buffer_readback(buffer, &rb); - for (x = 0; x < buffer_desc.ByteWidth / sizeof(uvec4.x); ++x) - { - uvec4 = U(uav_desc).Buffer.FirstElement <= x ? fe_uvec4 : uvec4_data[i]; - todo_wine check_rgba_sint8(get_readback_color(&rb, x, 0, 0), &uvec4); - } + todo_wine check_rgba_sint8(get_readback_color(&rb, 0, 0, 0), &uvec4); + todo_wine check_rgba_sint8(get_readback_color(&rb, U(uav_desc).Buffer.FirstElement - 1, 0, 0), &uvec4); + todo_wine check_rgba_sint8(get_readback_color(&rb, U(uav_desc).Buffer.FirstElement, 0, 0), &fe_uvec4); release_resource_readback(&rb); }
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=50671
Your paranoid android.
=== debian9 (32 bit report) ===
d3d11: Unhandled exception: page fault on execute access to 0x00000000 in 32-bit code (0x00000000).
=== debian9 (32 bit French report) ===
d3d11: Unhandled exception: page fault on read access to 0x3f800000 in 32-bit code (0x7ed76e3d).
=== debian9 (32 bit Japanese:Japan report) ===
d3d11: Unhandled exception: page fault on read access to 0x00000001 in 32-bit code (0x7ed5ee3d).
=== debian9 (32 bit Chinese:China report) ===
d3d11: Unhandled exception: page fault on read access to 0x3f800000 in 32-bit code (0x7ed5ee3d).
=== debian9 (64 bit WoW report) ===
d3d11: d3d11.c:16770: Test failed: Got {-1.00787401e+00, 0.00000000e+00, 1.00000000e+00, 5.03937006e-01}, expected {-1.00000000e+00, 0.00000000e+00, 1.00000000e+00, 5.03937006e-01} at (0, 0), sub-resource 0.