gsdx-ogl: reduce toggling of scissor state for DATE

This commit is contained in:
Gregory Hainaut 2015-05-01 00:59:49 +02:00
parent 71e517108d
commit 7367b22e03
2 changed files with 2 additions and 5 deletions

View File

@ -948,7 +948,7 @@ void GSDeviceOGL::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* ver
OMSetDepthStencilState(m_date.dss, 1);
OMSetBlendState(m_date.bs, 0);
OMSetRenderTargets(t, ds);
OMSetRenderTargets(t, ds, &GLState::scissor);
// ia

View File

@ -265,6 +265,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
// Reduce the quantity of clean function
glScissor( ri.x, ri.y, ri.width(), ri.height() );
GLState::scissor = ri;
// Must be done here to avoid any GL state pertubation (clear function...)
// Create an r32ui image that will containt primitive ID
@ -287,10 +288,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
dev->SetupDATE(rt, ds, vertices, m_context->TEST.DATM);
}
// Restore the scissor state
ri = GLState::scissor;
glScissor( ri.x, ri.y, ri.width(), ri.height() );
}
//