mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: always bind the RT as input texture
To avoid code duplication
This commit is contained in:
parent
1fe3e04ce3
commit
2901e94ebc
|
@ -562,8 +562,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
||||||
ps_sel.blend_c = om_bsel.c;
|
ps_sel.blend_c = om_bsel.c;
|
||||||
ps_sel.blend_d = om_bsel.d;
|
ps_sel.blend_d = om_bsel.d;
|
||||||
|
|
||||||
dev->PSSetShaderResource(3, rt);
|
|
||||||
|
|
||||||
// Require the fix alpha vlaue
|
// Require the fix alpha vlaue
|
||||||
if (ALPHA.C == 2) {
|
if (ALPHA.C == 2) {
|
||||||
ps_cb.AlphaCoeff.a = afix;
|
ps_cb.AlphaCoeff.a = afix;
|
||||||
|
@ -590,7 +588,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
||||||
|
|
||||||
if (DATE_GL45) {
|
if (DATE_GL45) {
|
||||||
gl_TextureBarrier();
|
gl_TextureBarrier();
|
||||||
dev->PSSetShaderResource(3, rt);
|
|
||||||
} else if (DATE) {
|
} else if (DATE) {
|
||||||
GSVector4i dRect = ComputeBoundingBox(rtscale, rtsize);
|
GSVector4i dRect = ComputeBoundingBox(rtscale, rtsize);
|
||||||
|
|
||||||
|
@ -602,7 +599,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
||||||
// Create an r32ui image that will containt primitive ID
|
// Create an r32ui image that will containt primitive ID
|
||||||
if (DATE_GL42) {
|
if (DATE_GL42) {
|
||||||
dev->InitPrimDateTexture(rt);
|
dev->InitPrimDateTexture(rt);
|
||||||
dev->PSSetShaderResource(3, rt);
|
|
||||||
} else {
|
} else {
|
||||||
GSVector4 src = GSVector4(dRect) / GSVector4(rtsize.x, rtsize.y).xyxy();
|
GSVector4 src = GSVector4(dRect) / GSVector4(rtsize.x, rtsize.y).xyxy();
|
||||||
GSVector4 dst = src * 2.0f - 1.0f;
|
GSVector4 dst = src * 2.0f - 1.0f;
|
||||||
|
@ -846,6 +842,9 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
||||||
dev->PSSetShaderResource(1, NULL);
|
dev->PSSetShaderResource(1, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
// Always bind the RT. This way special effect can use it.
|
||||||
|
dev->PSSetShaderResource(3, rt);
|
||||||
|
|
||||||
|
|
||||||
// GS
|
// GS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue