From 803bf596543ad8264438b986eeedd10d11043d10 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Fri, 14 Mar 2025 21:03:26 +0100 Subject: [PATCH] tests: Mark an early depth stencil test as buggy on MoltenVK. On MoltenVK it seems that all draws are always executed, independently of the early depth stencil test. The problem doesn't seem to belong to vkd3d or MoltenVK, because the generated Metal commands look correct. I tried looking at a GPU capture with Xcode, which was not very conclusive because it doesn't state clearly whether early fragment tests were passed or not. Sometimes it says that a fragment shader execution had no thread execution data, which I interpret as the early fragment tests having prevented the fragment shader from running, but it's not really consistent, and it's never clear which results are based on software simulation and which on the hardware run. However taking everything into account I think the most likely explanation is some incorrect optimization at the Metal level. --- tests/d3d12.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index 97c34977..a5efb8ce 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -35343,6 +35343,7 @@ static void test_early_depth_stencil_tests(void) D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); check_sub_resource_float(ds.texture, 0, queue, command_list, 0.6f, 1); reset_command_list(command_list, context.allocator); + bug_if(is_mvk_device(context.device)) check_sub_resource_uint(texture, 0, queue, command_list, 2, 1); reset_command_list(command_list, context.allocator); @@ -35379,6 +35380,7 @@ static void test_early_depth_stencil_tests(void) D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); check_sub_resource_float(ds.texture, 0, queue, command_list, 0.5f, 1); reset_command_list(command_list, context.allocator); + bug_if(is_mvk_device(context.device)) check_sub_resource_uint(texture, 0, queue, command_list, 4, 1); ID3D12Resource_Release(texture);