gsdx-d3d11: Store render target texture in GSDevice11

This commit is contained in:
Kojin 2018-12-15 13:42:58 -05:00 committed by lightningterror
parent 07989a0a17
commit a743707728
2 changed files with 7 additions and 4 deletions

View File

@ -1286,9 +1286,10 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
if(rt) rtv = *(GSTexture11*)rt;
if(ds) dsv = *(GSTexture11*)ds;
if(m_state.rtv != rtv || m_state.dsv != dsv)
if(m_state.rt_view != rtv || m_state.dsv != dsv)
{
m_state.rtv = rtv;
m_state.rt_view = rtv;
m_state.rt_texture = (GSTexture11*)rt;
m_state.dsv = dsv;
m_ctx->OMSetRenderTargets(1, &rtv, dsv);
@ -1326,7 +1327,8 @@ void GSDevice11::OMSetRenderTargets(const GSVector2i& rtsize, int count, ID3D11U
{
m_ctx->OMSetRenderTargetsAndUnorderedAccessViews(0, NULL, NULL, 0, count, uav, counters);
m_state.rtv = NULL;
m_state.rt_view = NULL;
m_state.rt_texture = NULL;
m_state.dsv = NULL;
if(m_state.viewport != rtsize)

View File

@ -79,7 +79,8 @@ class GSDevice11 : public GSDeviceDX
uint8 sref;
ID3D11BlendState* bs;
float bf;
ID3D11RenderTargetView* rtv;
ID3D11RenderTargetView* rt_view;
GSTexture11* rt_texture;
ID3D11DepthStencilView* dsv;
} m_state;