summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2014-01-07 19:06:59 -0800
committerIan Romanick <ian.d.romanick@intel.com>2014-01-20 11:31:59 -0800
commitc65db3ebedf884568f9331d00b4759bee28102bb (patch)
tree71deb6d13799ded777654d5cd8a7976b87e46e1e /src
parent9de863603d8092243df502365a75d65982223f0e (diff)
mesa: Restore all the scissor rectangles in _mesa_PopAttrib
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/attrib.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index f55433ea65f..db659ad8dc8 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1269,15 +1269,19 @@ _mesa_PopAttrib(void)
break;
case GL_SCISSOR_BIT:
{
+ unsigned i;
const struct gl_scissor_attrib *scissor;
scissor = (const struct gl_scissor_attrib *) attr->data;
- _mesa_set_scissor(ctx, 0,
- scissor->ScissorArray[0].X,
- scissor->ScissorArray[0].Y,
- scissor->ScissorArray[0].Width,
- scissor->ScissorArray[0].Height);
- _mesa_set_enable(ctx, GL_SCISSOR_TEST, scissor->EnableFlags & 1);
+ for (i = 0; i < ctx->Const.MaxViewports; i++) {
+ _mesa_set_scissor(ctx, i,
+ scissor->ScissorArray[i].X,
+ scissor->ScissorArray[i].Y,
+ scissor->ScissorArray[i].Width,
+ scissor->ScissorArray[i].Height);
+ _mesa_set_enablei(ctx, GL_SCISSOR_TEST, i,
+ (scissor->EnableFlags >> i) & 1);
+ }
}
break;
case GL_STENCIL_BUFFER_BIT: