Graphics: Fix viewport effect rendering bug

We didn't account for the spec dictating that
scissor test does affect FBO blit operations,
which resulted in corrupted output if more than
one viewport with an active effect (tone, color)
was created.

The reason I never caught this before must be
that the fglrx-legacy driver is actually bugged
in this aspect and ignores the scissor on blit.
This commit is contained in:
Jonas Kulla 2013-12-08 12:23:12 +01:00
parent 94119baeee
commit 5328d17090
1 changed files with 6 additions and 0 deletions

View File

@ -175,7 +175,13 @@ public:
void requestViewportRender(Vec4 &c, Vec4 &f, Vec4 &t)
{
pp.swapRender();
/* Scissor test _does_ affect FBO blit operations,
* and since we're inside the draw cycle, it will
* be turned on, so turn it off temporarily */
glState.scissorTest.pushSet(false);
pp.blitFBOs();
glState.scissorTest.pop();
PlaneShader &shader = shState->planeShader();
shader.bind();