-- v3: tests: Clear the UAV before testing.
From: Giovanni Mascellani gmascellani@codeweavers.com
MoltenVK doesn't support the Component decoration on tessellation shaders. --- tests/d3d12.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 49b40a67a..3e75fada4 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -38139,6 +38139,7 @@ static void test_hull_shader_punned_array(void) transition_resource_state(command_list, context.render_target, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
+ bug_if(is_mvk_device(context.device)) check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xcc996633, 0);
destroy_test_context(&context);
From: Giovanni Mascellani gmascellani@codeweavers.com
--- tests/d3d12.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 3e75fada4..ce907c966 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -32383,7 +32383,10 @@ static void test_resource_allocation_info(void) ok(infos1[i].SizeInBytes == sizes[i], "Got unexpected size %"PRIu64".\n", infos1[i].SizeInBytes);
if (!i) + { + vkd3d_test_pop_context(); continue; + }
ok(infos1[i].Offset - infos1[i - 1].Offset >= infos1[i - 1].SizeInBytes, "Got unexpected prev size %"PRIu64", prev offset %"PRIu64", offset %"PRIu64".\n",
From: Giovanni Mascellani gmascellani@codeweavers.com
Apparently MoltenVK doesn't set the SampleMask built-in to the fragment coverage mask. --- tests/d3d12.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index ce907c966..7655c4e92 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -33454,6 +33454,7 @@ static void test_coverage(void) reset_command_list(command_list, context.allocator); transition_resource_state(command_list, texture, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); + bug_if(is_mvk_device(context.device)) check_sub_resource_uint(texture, 0, queue, command_list, tests[i].sample_mask & 0xf, 0);
reset_command_list(command_list, context.allocator);
From: Giovanni Mascellani gmascellani@codeweavers.com
Otherwise the test fails on Intel, NVIDIA and llvmpipe. --- tests/hlsl/nointerpolation.shader_test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/hlsl/nointerpolation.shader_test b/tests/hlsl/nointerpolation.shader_test index 94584ffe2..d2b7d8a46 100644 --- a/tests/hlsl/nointerpolation.shader_test +++ b/tests/hlsl/nointerpolation.shader_test @@ -144,7 +144,7 @@ shader model >= 6.0
[test] draw triangle list 3 -probe (320,240) rgba (0.250390589, 0.499088615, 0.250520796, 1.0) 1 +probe (320,240) rgba (0.250390589, 0.499088615, 0.250520796, 1.0) 4
[require] shader model >= 4.0
From: Giovanni Mascellani gmascellani@codeweavers.com
There is no guarantee that a resource is cleared upon creation. This fixes the test on NVIDIA and llvmpipe. --- tests/d3d12.c | 11 ----------- tests/d3d12_test_utils.h | 11 +++++++++++ tests/hlsl_d3d12.c | 7 +++++++ 3 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 7655c4e92..e3771b7fc 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -128,17 +128,6 @@ static void check_alignment_(unsigned int line, uint64_t size, uint64_t alignmen size, aligned_size); }
-static void uav_barrier(ID3D12GraphicsCommandList *list, ID3D12Resource *resource) -{ - D3D12_RESOURCE_BARRIER barrier; - - barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV; - barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE; - barrier.UAV.pResource = resource; - - ID3D12GraphicsCommandList_ResourceBarrier(list, 1, &barrier); -} - static const DXGI_FORMAT depth_stencil_formats[] = { DXGI_FORMAT_R32G8X24_TYPELESS, diff --git a/tests/d3d12_test_utils.h b/tests/d3d12_test_utils.h index cf27b40f5..4fe6fa716 100644 --- a/tests/d3d12_test_utils.h +++ b/tests/d3d12_test_utils.h @@ -269,6 +269,17 @@ static void transition_sub_resource_state(ID3D12GraphicsCommandList *list, ID3D1 ID3D12GraphicsCommandList_ResourceBarrier(list, 1, &barrier); }
+static inline void uav_barrier(ID3D12GraphicsCommandList *list, ID3D12Resource *resource) +{ + D3D12_RESOURCE_BARRIER barrier; + + barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV; + barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE; + barrier.UAV.pResource = resource; + + ID3D12GraphicsCommandList_ResourceBarrier(list, 1, &barrier); +} + #define create_command_queue(a, b, c) create_command_queue_(__LINE__, a, b, c) static inline ID3D12CommandQueue *create_command_queue_(unsigned int line, ID3D12Device *device, D3D12_COMMAND_LIST_TYPE type, int priority) diff --git a/tests/hlsl_d3d12.c b/tests/hlsl_d3d12.c index b2273ffbc..4188d7204 100644 --- a/tests/hlsl_d3d12.c +++ b/tests/hlsl_d3d12.c @@ -516,10 +516,17 @@ static void test_thread_id(void)
for (i = 0; i < 3; ++i) { + const UINT clear_value[4] = {0}; + textures[i] = create_default_texture3d(device, 16, 8, 8, 1, DXGI_FORMAT_R32G32B32A32_UINT, D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); ID3D12Device_CreateUnorderedAccessView(device, textures[i], NULL, NULL, get_cpu_descriptor_handle(&context, heap, i)); + ID3D12GraphicsCommandList_ClearUnorderedAccessViewUint(command_list, + get_gpu_descriptor_handle(&context, heap, i), + get_cpu_descriptor_handle(&context, heap, i), + textures[i], clear_value, 0, NULL); + uav_barrier(command_list, textures[i]); }
cs_code = compile_shader(cs_source, "cs_5_0");
This merge request was approved by Henri Verbeet.