From 68556cab752078e08d9656cde869b0ad57105495 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Mon, 24 Jun 2024 18:12:31 +0200 Subject: [PATCH] tests: Check correct uav_offset in amplification indirect state test. Signed-off-by: Hans-Kristian Arntzen --- tests/d3d12_mesh_shader.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/d3d12_mesh_shader.c b/tests/d3d12_mesh_shader.c index 9b67485ac7..80c003e703 100755 --- a/tests/d3d12_mesh_shader.c +++ b/tests/d3d12_mesh_shader.c @@ -1398,7 +1398,16 @@ void test_amplification_shader_execute_indirect_state(void) expected += num_tasks * num_groups_per_task * tests[i + j].data.prims; /* Every primitive increments counter. */ } - ok(get_readback_uint(&rb, i, 0, 0) == expected, "Test %u: expected %u, got %u.\n", i, expected, get_readback_uint(&rb, i, 0, 0)); + if (tests[i].data.indirect_count) + { + ok(get_readback_uint(&rb, tests[i].uav_offset / sizeof(uint32_t), 0, 0) == expected, + "Test %u: expected %u, got %u.\n", i, expected, get_readback_uint(&rb, tests[i].uav_offset / sizeof(uint32_t), 0, 0)); + } + else + { + ok(get_readback_uint(&rb, i, 0, 0) == expected, "Test %u: expected %u, got %u.\n", + i, expected, get_readback_uint(&rb, i, 0, 0)); + } } release_resource_readback(&rb);