From 57824261c6cd966250abea53815366717b711f3e Mon Sep 17 00:00:00 2001 From: Kojin Date: Sun, 20 Jan 2019 01:04:07 -0500 Subject: [PATCH] gsdx-d3d11: Cache rt depth stencil on m_state Cache the depth stencil in addition to color rt. This will allow us to check for depth stencil equality on slot 4. --- plugins/GSdx/Renderers/DX11/GSDevice11.cpp | 4 +++- plugins/GSdx/Renderers/DX11/GSDevice11.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/Renderers/DX11/GSDevice11.cpp b/plugins/GSdx/Renderers/DX11/GSDevice11.cpp index bc78eb3236..7a5b19c764 100644 --- a/plugins/GSdx/Renderers/DX11/GSDevice11.cpp +++ b/plugins/GSdx/Renderers/DX11/GSDevice11.cpp @@ -1309,8 +1309,9 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector if(m_state.rt_view != rtv || m_state.dsv != dsv) { m_state.rt_view = rtv; - m_state.rt_texture = (GSTexture11*)rt; + m_state.rt_texture = static_cast(rt); m_state.dsv = dsv; + m_state.rt_ds = static_cast(ds); m_ctx->OMSetRenderTargets(1, &rtv, dsv); } @@ -1349,6 +1350,7 @@ void GSDevice11::OMSetRenderTargets(const GSVector2i& rtsize, int count, ID3D11U m_state.rt_view = NULL; m_state.rt_texture = NULL; + m_state.rt_ds = NULL; m_state.dsv = NULL; if(m_state.viewport != rtsize) diff --git a/plugins/GSdx/Renderers/DX11/GSDevice11.h b/plugins/GSdx/Renderers/DX11/GSDevice11.h index d288d65cde..42d7b6c861 100644 --- a/plugins/GSdx/Renderers/DX11/GSDevice11.h +++ b/plugins/GSdx/Renderers/DX11/GSDevice11.h @@ -81,6 +81,7 @@ class GSDevice11 : public GSDeviceDX float bf; ID3D11RenderTargetView* rt_view; GSTexture11* rt_texture; + GSTexture11* rt_ds; ID3D11DepthStencilView* dsv; } m_state;