summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2014-01-07 19:12:16 -0800
committerIan Romanick <[email protected]>2014-01-20 11:31:59 -0800
commit562f353434878844e3aca4d75d049d5f17242aa8 (patch)
tree1466dfcf63b8b3e806783f961617a89f5ece556e
parentc65db3ebedf884568f9331d00b4759bee28102bb (diff)
mesa: Restore all the viewports in _mesa_PopAttrib
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/main/attrib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index db659ad8dc8..7b7cf0ef3d1 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1357,10 +1357,15 @@ _mesa_PopAttrib(void)
break;
case GL_VIEWPORT_BIT:
{
+ unsigned i;
const struct gl_viewport_attrib *vp;
vp = (const struct gl_viewport_attrib *) attr->data;
- _mesa_Viewport(vp->X, vp->Y, vp->Width, vp->Height);
- _mesa_DepthRange(vp->Near, vp->Far);
+
+ for (i = 0; i < ctx->Const.MaxViewports; i++) {
+ _mesa_set_viewport(ctx, i, vp[i].X, vp[i].Y, vp[i].Width,
+ vp[i].Height);
+ _mesa_set_depth_range(ctx, i, vp[i].Near, vp[i].Far);
+ }
}
break;
case GL_MULTISAMPLE_BIT_ARB: