The rest is in MR !531.
-- v3: tests: Mark count buffers as buggy on MoltenVK. tests: Mark a timestamp query test as buggy on MoltenVK. tests: Mark clip distance as unsupported on MoltenVK. tests: Mark cull distance as buggy on MoltenVK. tests: Skip unbounded descriptor ranges tests when they're unsupported. tests: Mark loading from stencil as buggy on MoltenVK.
From: Giovanni Mascellani gmascellani@codeweavers.com
Specifically, MoltenVK seems to be able to load from stencil, but the specific replicating swizzle (repeating the stencil value on all the channels) is not honored. The stencil value is read only on the red channel. --- tests/d3d12.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 896a0f22b..e6ae6c5f6 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -21394,11 +21394,13 @@ static void test_stencil_load(void)
transition_sub_resource_state(command_list, context.render_target, 0, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); + bug_if(is_mvk_device(context.device)) check_sub_resource_uvec4(context.render_target, 0, queue, command_list, &uvec4);
reset_command_list(command_list, context.allocator); transition_sub_resource_state(command_list, texture, 0, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); + bug_if(is_mvk_device(context.device)) check_sub_resource_uvec4(texture, 0, queue, command_list, &uvec4);
reset_command_list(command_list, context.allocator);
From: Giovanni Mascellani gmascellani@codeweavers.com
They are unsupported if the Vulkan descriptor indexing extension is not available; on MoltenVK it is known to be buggy, so it is disabled. --- tests/d3d12.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index e6ae6c5f6..9b1ec8e34 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -36861,6 +36861,12 @@ static void test_unbounded_resource_arrays(void) command_list = context.list; queue = context.queue;
+ if (get_resource_binding_tier(device) < D3D12_RESOURCE_BINDING_TIER_2) + { + skip("Device doesn't support resource binding tier 2.\n"); + goto done; + } + memset(&root_signature_desc, 0, sizeof(root_signature_desc)); root_signature_desc.NumParameters = ARRAY_SIZE(root_parameters); root_signature_desc.pParameters = root_parameters; @@ -37021,6 +37027,12 @@ static void test_unbounded_samplers(void) command_list = context.list; queue = context.queue;
+ if (get_resource_binding_tier(device) < D3D12_RESOURCE_BINDING_TIER_2) + { + skip("Device doesn't support resource binding tier 2.\n"); + goto done; + } + root_signature_desc.NumParameters = ARRAY_SIZE(root_parameters); root_signature_desc.Flags = 0; root_signature_desc.NumStaticSamplers = 0;
From: Giovanni Mascellani gmascellani@codeweavers.com
The generated MSL code is not accepted by the Metal runtime, and it looks wrong anyway. --- tests/d3d12.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 9b1ec8e34..b0a5182cc 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -31973,6 +31973,13 @@ static void test_combined_clip_and_cull_distances(void) command_list = context.list; queue = context.queue;
+ if (is_mvk_device(device)) + { + skip("Cull distance not supported on MoltenVK.\n"); + destroy_test_context(&context); + return; + } + input_layout.pInputElementDescs = layout_desc; input_layout.NumElements = ARRAY_SIZE(layout_desc);
From: Giovanni Mascellani gmascellani@codeweavers.com
At least for tessellation and geometry shaders. --- tests/d3d12.c | 159 ++++++++++++++++++++++++++------------------------ 1 file changed, 83 insertions(+), 76 deletions(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c index b0a5182cc..fce9d05fa 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -31626,92 +31626,99 @@ static void test_clip_distance(void)
ID3D12PipelineState_Release(pso);
- /* tessellation shaders */ - pso_desc.HS = hs; - pso_desc.DS = ds; - pso_desc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH; - hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc, - &IID_ID3D12PipelineState, (void **)&pso); - ok(hr == S_OK, "Failed to create pipeline state, hr %#x.\n", hr); + if (is_mvk_device(device)) + { + skip("Clipping not supported in tessellation and geometry shaders on MoltenVK.\n"); + } + else + { + /* tessellation shaders */ + pso_desc.HS = hs; + pso_desc.DS = ds; + pso_desc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH; + hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc, + &IID_ID3D12PipelineState, (void **)&pso); + ok(hr == S_OK, "Failed to create pipeline state, hr %#x.\n", hr);
- check_clip_distance(&context, pso, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST, - vbv, vb[1], vs_cb, tess_cb, gs_cb); + check_clip_distance(&context, pso, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST, + vbv, vb[1], vs_cb, tess_cb, gs_cb);
- cb_data.use_constant = false; - cb_data.tessellation_factor = 2.0f; - update_buffer_data(tess_cb, 0, sizeof(cb_data), &cb_data); + cb_data.use_constant = false; + cb_data.tessellation_factor = 2.0f; + update_buffer_data(tess_cb, 0, sizeof(cb_data), &cb_data);
- for (i = 0; i < ARRAY_SIZE(vertices); ++i) - vertices[i].clip_distance0 = 1.0f; - update_buffer_data(vb[1], 0, sizeof(vertices), &vertices); + for (i = 0; i < ARRAY_SIZE(vertices); ++i) + vertices[i].clip_distance0 = 1.0f; + update_buffer_data(vb[1], 0, sizeof(vertices), &vertices);
- ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL); - ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature); - ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0, - ID3D12Resource_GetGPUVirtualAddress(vs_cb)); - ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 1, - ID3D12Resource_GetGPUVirtualAddress(tess_cb)); - ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 2, - ID3D12Resource_GetGPUVirtualAddress(tess_cb)); - ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 3, - ID3D12Resource_GetGPUVirtualAddress(gs_cb)); - ID3D12GraphicsCommandList_SetPipelineState(command_list, pso); - ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST); - ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); - ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); - ID3D12GraphicsCommandList_IASetVertexBuffers(command_list, 0, ARRAY_SIZE(vbv), vbv); - ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL); - ID3D12GraphicsCommandList_DrawInstanced(command_list, 4, 1, 0, 0); - transition_resource_state(command_list, context.render_target, - D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); - check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0); + ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL); + ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature); + ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0, + ID3D12Resource_GetGPUVirtualAddress(vs_cb)); + ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 1, + ID3D12Resource_GetGPUVirtualAddress(tess_cb)); + ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 2, + ID3D12Resource_GetGPUVirtualAddress(tess_cb)); + ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 3, + ID3D12Resource_GetGPUVirtualAddress(gs_cb)); + ID3D12GraphicsCommandList_SetPipelineState(command_list, pso); + ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST); + ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); + ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); + ID3D12GraphicsCommandList_IASetVertexBuffers(command_list, 0, ARRAY_SIZE(vbv), vbv); + ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL); + ID3D12GraphicsCommandList_DrawInstanced(command_list, 4, 1, 0, 0); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); + check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0);
- ID3D12PipelineState_Release(pso); - reset_command_list(command_list, context.allocator); - transition_resource_state(command_list, context.render_target, - D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + ID3D12PipelineState_Release(pso); + reset_command_list(command_list, context.allocator); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
- cb_data.use_constant = true; - cb_data.clip_distance0 = -1.0f; - update_buffer_data(tess_cb, 0, sizeof(cb_data), &cb_data); + cb_data.use_constant = true; + cb_data.clip_distance0 = -1.0f; + update_buffer_data(tess_cb, 0, sizeof(cb_data), &cb_data);
- /* geometry shader */ - pso_desc.GS = gs; - hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc, - &IID_ID3D12PipelineState, (void **)&pso); - ok(hr == S_OK, "Failed to create pipeline state, hr %#x.\n", hr); + /* geometry shader */ + pso_desc.GS = gs; + hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc, + &IID_ID3D12PipelineState, (void **)&pso); + ok(hr == S_OK, "Failed to create pipeline state, hr %#x.\n", hr);
- check_clip_distance(&context, pso, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST, - vbv, vb[1], vs_cb, tess_cb, gs_cb); + check_clip_distance(&context, pso, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST, + vbv, vb[1], vs_cb, tess_cb, gs_cb);
- cb_data.use_constant = true; - cb_data.clip_distance0 = 1.0f; - update_buffer_data(gs_cb, 0, sizeof(cb_data), &cb_data); - ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL); - ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature); - ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0, - ID3D12Resource_GetGPUVirtualAddress(vs_cb)); - ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 1, - ID3D12Resource_GetGPUVirtualAddress(tess_cb)); - ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 2, - ID3D12Resource_GetGPUVirtualAddress(tess_cb)); - ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 3, - ID3D12Resource_GetGPUVirtualAddress(gs_cb)); - ID3D12GraphicsCommandList_SetPipelineState(command_list, pso); - ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST); - ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); - ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); - ID3D12GraphicsCommandList_IASetVertexBuffers(command_list, 0, ARRAY_SIZE(vbv), vbv); - ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL); - ID3D12GraphicsCommandList_DrawInstanced(command_list, 4, 1, 0, 0); - transition_resource_state(command_list, context.render_target, - D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); - check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0); + cb_data.use_constant = true; + cb_data.clip_distance0 = 1.0f; + update_buffer_data(gs_cb, 0, sizeof(cb_data), &cb_data); + ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL); + ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature); + ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 0, + ID3D12Resource_GetGPUVirtualAddress(vs_cb)); + ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 1, + ID3D12Resource_GetGPUVirtualAddress(tess_cb)); + ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 2, + ID3D12Resource_GetGPUVirtualAddress(tess_cb)); + ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(command_list, 3, + ID3D12Resource_GetGPUVirtualAddress(gs_cb)); + ID3D12GraphicsCommandList_SetPipelineState(command_list, pso); + ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST); + ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); + ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); + ID3D12GraphicsCommandList_IASetVertexBuffers(command_list, 0, ARRAY_SIZE(vbv), vbv); + ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL); + ID3D12GraphicsCommandList_DrawInstanced(command_list, 4, 1, 0, 0); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); + check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0);
- ID3D12PipelineState_Release(pso); - reset_command_list(command_list, context.allocator); - transition_resource_state(command_list, context.render_target, - D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + ID3D12PipelineState_Release(pso); + reset_command_list(command_list, context.allocator); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + }
/* multiple clip distances */ pso_desc.VS = vs_multiple;
From: Giovanni Mascellani gmascellani@codeweavers.com
The generated Vulkan calls look right and do not trigger any validation error, but the returned timestamp is 0. A valid timestamp is returned if the CopyResource() call is commented, or the second EndQuery() call is moved before CopyResource(), or the first EndQuery() call is commented. I am not seeing any sensible pattern here, so I guess there is just a bug in MoltenVK. --- tests/d3d12.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index fce9d05fa..77579c355 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -24848,6 +24848,7 @@ static void test_resolve_non_issued_query_data(void) "Got unexpected timestamp %#"PRIx64".\n", timestamps[0]); ok(!timestamps[1], "Got unexpected timestamp %#"PRIx64".\n", timestamps[1]); ok(!timestamps[2], "Got unexpected timestamp %#"PRIx64".\n", timestamps[2]); + bug_if(is_mvk_device(device)) ok(timestamps[3] != initial_data[3] && timestamps[3] > 0, "Got unexpected timestamp %#"PRIx64".\n", timestamps[3]); release_resource_readback(&rb);
From: Giovanni Mascellani gmascellani@codeweavers.com
They require Vulkan indirect draw count extension. --- tests/d3d12.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 77579c355..73253f547 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -25220,6 +25220,7 @@ static void test_execute_indirect(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, 0xff00ff00, 0);
reset_command_list(command_list, context.allocator); @@ -25317,6 +25318,7 @@ static void test_execute_indirect(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, 0xffffff00, 0);
ID3D12PipelineState_Release(pipeline_state);
This merge request was approved by Henri Verbeet.