mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-09 09:39:44 +00:00
d3d12: Disable depth test if not required
This commit is contained in:
parent
f77e2acfbe
commit
79420e52a2
2 changed files with 6 additions and 1 deletions
|
@ -579,6 +579,8 @@ bool D3D12GSRender::LoadProgram()
|
||||||
LOG_ERROR(RSX, "Bad surface color target: %d", m_surface_color_target);
|
LOG_ERROR(RSX, "Bad surface color target: %d", m_surface_color_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prop.depthEnabled = m_set_depth_test;
|
||||||
|
|
||||||
prop.IASet = m_IASet;
|
prop.IASet = m_IASet;
|
||||||
|
|
||||||
m_PSO = m_cachePSO.getGraphicPipelineState(m_cur_vertex_prog, m_cur_fragment_prog, prop, std::make_pair(m_device, m_rootSignature));
|
m_PSO = m_cachePSO.getGraphicPipelineState(m_cur_vertex_prog, m_cur_fragment_prog, prop, std::make_pair(m_device, m_rootSignature));
|
||||||
|
|
|
@ -17,11 +17,12 @@ struct D3D12PipelineProperties
|
||||||
std::vector<D3D12_INPUT_ELEMENT_DESC> IASet;
|
std::vector<D3D12_INPUT_ELEMENT_DESC> IASet;
|
||||||
D3D12_BLEND_DESC Blend;
|
D3D12_BLEND_DESC Blend;
|
||||||
unsigned numMRT : 3;
|
unsigned numMRT : 3;
|
||||||
|
bool depthEnabled : 1;
|
||||||
|
|
||||||
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 && DepthStencilFormat == in.DepthStencilFormat && numMRT == in.numMRT;
|
return Topology == in.Topology && DepthStencilFormat == in.DepthStencilFormat && numMRT == in.numMRT && depthEnabled == in.depthEnabled;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -145,6 +146,8 @@ struct D3D12Traits
|
||||||
graphicPipelineStateDesc.RasterizerState = CD3D12_RASTERIZER_DESC;
|
graphicPipelineStateDesc.RasterizerState = CD3D12_RASTERIZER_DESC;
|
||||||
graphicPipelineStateDesc.PrimitiveTopologyType = pipelineProperties.Topology;
|
graphicPipelineStateDesc.PrimitiveTopologyType = pipelineProperties.Topology;
|
||||||
|
|
||||||
|
graphicPipelineStateDesc.DepthStencilState.DepthEnable = pipelineProperties.depthEnabled;
|
||||||
|
|
||||||
graphicPipelineStateDesc.NumRenderTargets = pipelineProperties.numMRT;
|
graphicPipelineStateDesc.NumRenderTargets = pipelineProperties.numMRT;
|
||||||
for (unsigned i = 0; i < pipelineProperties.numMRT; i++)
|
for (unsigned i = 0; i < pipelineProperties.numMRT; i++)
|
||||||
graphicPipelineStateDesc.RTVFormats[i] = DXGI_FORMAT_R8G8B8A8_UNORM;
|
graphicPipelineStateDesc.RTVFormats[i] = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue