mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
d3d12: Do not bind depth stencil buffer if depth test is disabled
This commit is contained in:
parent
1228787355
commit
56853de0ef
1 changed files with 6 additions and 5 deletions
|
@ -615,23 +615,24 @@ void D3D12GSRender::ExecCMD()
|
||||||
|
|
||||||
InitDrawBuffers();
|
InitDrawBuffers();
|
||||||
|
|
||||||
|
D3D12_CPU_DESCRIPTOR_HANDLE *DepthStencilHandle = m_set_depth_test ? &m_fbo->getDSVCPUHandle() : nullptr;
|
||||||
switch (m_surface_color_target)
|
switch (m_surface_color_target)
|
||||||
{
|
{
|
||||||
case CELL_GCM_SURFACE_TARGET_NONE: break;
|
case CELL_GCM_SURFACE_TARGET_NONE: break;
|
||||||
case CELL_GCM_SURFACE_TARGET_0:
|
case CELL_GCM_SURFACE_TARGET_0:
|
||||||
commandList->OMSetRenderTargets(1, &m_fbo->getRTTCPUHandle(0), true, &m_fbo->getDSVCPUHandle());
|
commandList->OMSetRenderTargets(1, &m_fbo->getRTTCPUHandle(0), true, DepthStencilHandle);
|
||||||
break;
|
break;
|
||||||
case CELL_GCM_SURFACE_TARGET_1:
|
case CELL_GCM_SURFACE_TARGET_1:
|
||||||
commandList->OMSetRenderTargets(1, &m_fbo->getRTTCPUHandle(1), true, &m_fbo->getDSVCPUHandle());
|
commandList->OMSetRenderTargets(1, &m_fbo->getRTTCPUHandle(1), true, DepthStencilHandle);
|
||||||
break;
|
break;
|
||||||
case CELL_GCM_SURFACE_TARGET_MRT1:
|
case CELL_GCM_SURFACE_TARGET_MRT1:
|
||||||
commandList->OMSetRenderTargets(2, &m_fbo->getRTTCPUHandle(0), true, &m_fbo->getDSVCPUHandle());
|
commandList->OMSetRenderTargets(2, &m_fbo->getRTTCPUHandle(0), true, DepthStencilHandle);
|
||||||
break;
|
break;
|
||||||
case CELL_GCM_SURFACE_TARGET_MRT2:
|
case CELL_GCM_SURFACE_TARGET_MRT2:
|
||||||
commandList->OMSetRenderTargets(3, &m_fbo->getRTTCPUHandle(0), true, &m_fbo->getDSVCPUHandle());
|
commandList->OMSetRenderTargets(3, &m_fbo->getRTTCPUHandle(0), true, DepthStencilHandle);
|
||||||
break;
|
break;
|
||||||
case CELL_GCM_SURFACE_TARGET_MRT3:
|
case CELL_GCM_SURFACE_TARGET_MRT3:
|
||||||
commandList->OMSetRenderTargets(4, &m_fbo->getRTTCPUHandle(0), true, &m_fbo->getDSVCPUHandle());
|
commandList->OMSetRenderTargets(4, &m_fbo->getRTTCPUHandle(0), true, DepthStencilHandle);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(RSX, "Bad surface color target: %d", m_surface_color_target);
|
LOG_ERROR(RSX, "Bad surface color target: %d", m_surface_color_target);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue