[PATCH vkd3d v2 3/3] tests: Mark atomic operations as done on AMD.

Giovanni Mascellani gmascellani at codeweavers.com
Thu Mar 17 08:35:52 CDT 2022


They seem to work with mesa 21.3.7. Since some developers are
using older releases where the bug is not yet fixed, I am leaving
it marked as a bug.

Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 tests/d3d12.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/d3d12.c b/tests/d3d12.c
index 5d42a26e..0abdb7b9 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -23057,7 +23057,6 @@ static void test_atomic_instructions(void)
     ID3D12CommandQueue *queue;
     ID3D12Device *device;
     unsigned int i, j;
-    bool is_todo;
     HRESULT hr;
 
     static const DWORD ps_atomics_code[] =
@@ -23267,12 +23266,13 @@ static void test_atomic_instructions(void)
         {
             unsigned int value = get_readback_uint(&rb, j, 0, 0);
             unsigned int expected = test->expected_result[j];
+            bool is_bug;
 
-            is_todo = test->i.x < 0
+            is_bug = test->i.x < 0
                     && (!strcmp(instructions[j], "atomic_imax") || !strcmp(instructions[j], "atomic_imin"));
 
-            bug_if(is_todo && is_nvidia_device(device))
-            todo_if(is_todo)
+            /* Fixed at least on radv with mesa >= 21.3.7. */
+            bug_if(is_bug)
             ok(value == expected, "Test %u: Got %#x (%d), expected %#x (%d) for '%s' "
                     "with inputs (%u, %u), (%d), %#x (%d).\n",
                     i, value, value, expected, expected, instructions[j],
@@ -23286,13 +23286,13 @@ static void test_atomic_instructions(void)
         get_buffer_readback_with_command_list(cs_buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
         for (j = 0; j < ARRAY_SIZE(instructions); ++j)
         {
-            bool todo_instruction = !strcmp(imm_instructions[j], "imm_atomic_imax")
+            bool bug_instruction = !strcmp(imm_instructions[j], "imm_atomic_imax")
                     || !strcmp(imm_instructions[j], "imm_atomic_imin");
             unsigned int value = get_readback_uint(&rb, j, 0, 0);
             unsigned int expected = test->expected_result[j];
 
-            bug_if(test->i.x < 0 && todo_instruction && is_nvidia_device(device))
-            todo_if(test->i.x < 0 && todo_instruction)
+            /* Fixed at least on radv with mesa >= 21.3.7. */
+            bug_if(test->i.x < 0 && bug_instruction)
             ok(value == expected, "Test %u: Got %#x (%d), expected %#x (%d) for '%s' "
                     "with inputs (%u, %u), (%d), %#x (%d).\n",
                     i, value, value, expected, expected, imm_instructions[j],
-- 
2.35.1




More information about the wine-devel mailing list