mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
d3d12: Fix depth format mismatch
This commit is contained in:
parent
e6146e4ecb
commit
740354d2c9
@ -758,6 +758,22 @@ bool D3D12GSRender::LoadProgram()
|
|||||||
// checkForGlError("glBlendColor");
|
// checkForGlError("glBlendColor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (m_surface_depth_format)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case CELL_GCM_SURFACE_Z16:
|
||||||
|
prop.DepthStencilFormat = DXGI_FORMAT_D16_UNORM;
|
||||||
|
break;
|
||||||
|
case CELL_GCM_SURFACE_Z24S8:
|
||||||
|
prop.DepthStencilFormat = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
LOG_ERROR(RSX, "Bad depth format! (%d)", m_surface_depth_format);
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
prop.IASet = m_IASet;
|
prop.IASet = m_IASet;
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,13 +13,14 @@
|
|||||||
struct D3D12PipelineProperties
|
struct D3D12PipelineProperties
|
||||||
{
|
{
|
||||||
D3D12_PRIMITIVE_TOPOLOGY_TYPE Topology;
|
D3D12_PRIMITIVE_TOPOLOGY_TYPE Topology;
|
||||||
|
DXGI_FORMAT DepthStencilFormat;
|
||||||
std::vector<D3D12_INPUT_ELEMENT_DESC> IASet;
|
std::vector<D3D12_INPUT_ELEMENT_DESC> IASet;
|
||||||
D3D12_BLEND_DESC Blend;
|
D3D12_BLEND_DESC Blend;
|
||||||
|
|
||||||
bool operator==(const D3D12PipelineProperties &in) const
|
bool operator==(const D3D12PipelineProperties &in) const
|
||||||
{
|
{
|
||||||
// TODO: blend and IASet equality
|
// TODO: blend and IASet equality
|
||||||
return Topology == in.Topology;
|
return Topology == in.Topology && DepthStencilFormat == in.DepthStencilFormat;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -145,7 +146,7 @@ struct D3D12Traits
|
|||||||
|
|
||||||
graphicPipelineStateDesc.NumRenderTargets = 1;
|
graphicPipelineStateDesc.NumRenderTargets = 1;
|
||||||
graphicPipelineStateDesc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
|
graphicPipelineStateDesc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||||
graphicPipelineStateDesc.DSVFormat = DXGI_FORMAT_D16_UNORM;
|
graphicPipelineStateDesc.DSVFormat = pipelineProperties.DepthStencilFormat;
|
||||||
|
|
||||||
graphicPipelineStateDesc.InputLayout.pInputElementDescs = pipelineProperties.IASet.data();
|
graphicPipelineStateDesc.InputLayout.pInputElementDescs = pipelineProperties.IASet.data();
|
||||||
graphicPipelineStateDesc.InputLayout.NumElements = (UINT)pipelineProperties.IASet.size();
|
graphicPipelineStateDesc.InputLayout.NumElements = (UINT)pipelineProperties.IASet.size();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user