Module: vkd3d Branch: master Commit: 09f667ce4eaea2bb8c5e6fa8a79553ba9cf2a6aa URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=09f667ce4eaea2bb8c5e6fa8...
Author: Józef Kucia jkucia@codeweavers.com Date: Wed Nov 28 18:51:22 2018 +0100
vkd3d: Add FIXME() for invalid depth/stencil formats.
Needs more tests.
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
libs/vkd3d/state.c | 3 +++ tests/d3d12.c | 8 ++++++++ 2 files changed, 11 insertions(+)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 66da08a..1fefb61 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1966,6 +1966,9 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s goto fail; }
+ if (!(format->vk_aspect_mask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT))) + FIXME("Format %#x is not depth/stencil format.\n", format->dxgi_format); + if ((ds_desc->DepthEnable && ds_desc->DepthWriteMask) || (ds_desc->StencilEnable && ds_desc->StencilWriteMask)) depth_layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; diff --git a/tests/d3d12.c b/tests/d3d12.c index f521766..e5a6249 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -2745,6 +2745,14 @@ static void test_create_graphics_pipeline_state(void) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); ID3D12PipelineState_Release(pipeline_state);
+ /* Invalid DSVFormat */ + pso_desc.DSVFormat = DXGI_FORMAT_R8G8B8A8_UNORM; + pso_desc.DepthStencilState.DepthEnable = TRUE; + hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc, + &IID_ID3D12PipelineState, (void **)&pipeline_state); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ID3D12PipelineState_Release(pipeline_state); + refcount = ID3D12RootSignature_Release(root_signature); ok(!refcount, "ID3D12RootSignature has %u references left.\n", (unsigned int)refcount); refcount = ID3D12Device_Release(device);