mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d: Disable depth/stencil tests for DXGI_FORMAT_UNKNOWN.
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>
This commit is contained in:
committed by
Alexandre Julliard
parent
1e2070837b
commit
e91bfb882d
@@ -1948,8 +1948,13 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
|||||||
rt_count = ARRAY_SIZE(graphics->attachments) - 1;
|
rt_count = ARRAY_SIZE(graphics->attachments) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (desc->DSVFormat == DXGI_FORMAT_UNKNOWN
|
||||||
|
&& (desc->DepthStencilState.DepthEnable || desc->DepthStencilState.StencilEnable))
|
||||||
|
FIXME("DSV format is DXGI_FORMAT_UNKNOWN, disabling depth/stencil tests.\n");
|
||||||
|
|
||||||
graphics->rt_idx = 0;
|
graphics->rt_idx = 0;
|
||||||
if (desc->DepthStencilState.DepthEnable || desc->DepthStencilState.StencilEnable)
|
if (desc->DSVFormat != DXGI_FORMAT_UNKNOWN
|
||||||
|
&& (desc->DepthStencilState.DepthEnable || desc->DepthStencilState.StencilEnable))
|
||||||
{
|
{
|
||||||
const D3D12_DEPTH_STENCIL_DESC *ds_desc = &desc->DepthStencilState;
|
const D3D12_DEPTH_STENCIL_DESC *ds_desc = &desc->DepthStencilState;
|
||||||
VkImageLayout depth_layout;
|
VkImageLayout depth_layout;
|
||||||
|
@@ -2734,6 +2734,17 @@ static void test_create_graphics_pipeline_state(void)
|
|||||||
&IID_ID3D12PipelineState, (void **)&pipeline_state);
|
&IID_ID3D12PipelineState, (void **)&pipeline_state);
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
|
/* DSVFormat = DXGI_FORMAT_UNKNOWN */
|
||||||
|
memset(blend, 0, sizeof(*blend));
|
||||||
|
pso_desc.DSVFormat = DXGI_FORMAT_UNKNOWN;
|
||||||
|
pso_desc.DepthStencilState.DepthEnable = TRUE;
|
||||||
|
pso_desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
|
||||||
|
pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS;
|
||||||
|
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);
|
refcount = ID3D12RootSignature_Release(root_signature);
|
||||||
ok(!refcount, "ID3D12RootSignature has %u references left.\n", (unsigned int)refcount);
|
ok(!refcount, "ID3D12RootSignature has %u references left.\n", (unsigned int)refcount);
|
||||||
refcount = ID3D12Device_Release(device);
|
refcount = ID3D12Device_Release(device);
|
||||||
|
Reference in New Issue
Block a user