diff options
author | Courtney Goeltzenleuchter <[email protected]> | 2013-11-13 16:24:56 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-01-20 11:31:56 -0800 |
commit | cbb271a48845c2d236f31327df316d42888a1907 (patch) | |
tree | a860c48f113d8171d31d77bacf1c341627e4c099 /src/mesa/swrast | |
parent | 5b84226c31e941219422f6d60c31524081b7a188 (diff) |
mesa: Convert gl_context::Viewport to gl_context::ViewportArray
Only element 0 of the array is used anywhere at this time, so there
should be no changes.
v4: Split out from a single megapatch. Suggested by Ken.
Signed-off-by: Courtney Goeltzenleuchter <[email protected]>
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_context.c | 8 | ||||
-rw-r--r-- | src/mesa/swrast/s_depth.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 8a5de4761c2..07485006cb7 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -74,10 +74,10 @@ _swrast_update_rasterflags( struct gl_context *ctx ) } if (ctx->Color.ColorLogicOpEnabled) rasterMask |= LOGIC_OP_BIT; if (ctx->Texture._EnabledUnits) rasterMask |= TEXTURE_BIT; - if ( ctx->Viewport.X < 0 - || ctx->Viewport.X + ctx->Viewport.Width > (GLfloat) ctx->DrawBuffer->Width - || ctx->Viewport.Y < 0 - || ctx->Viewport.Y + ctx->Viewport.Height > (GLfloat) ctx->DrawBuffer->Height) { + if ( ctx->ViewportArray[0].X < 0 + || ctx->ViewportArray[0].X + ctx->ViewportArray[0].Width > (GLfloat) ctx->DrawBuffer->Width + || ctx->ViewportArray[0].Y < 0 + || ctx->ViewportArray[0].Y + ctx->ViewportArray[0].Height > (GLfloat) ctx->DrawBuffer->Height) { rasterMask |= CLIP_BIT; } diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index 0f4fb950602..7f3c76de40a 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -171,12 +171,12 @@ _swrast_depth_clamp_span( struct gl_context *ctx, SWspan *span ) GLfloat min_f, max_f; GLuint i; - if (ctx->Viewport.Near < ctx->Viewport.Far) { - min_f = ctx->Viewport.Near; - max_f = ctx->Viewport.Far; + if (ctx->ViewportArray[0].Near < ctx->ViewportArray[0].Far) { + min_f = ctx->ViewportArray[0].Near; + max_f = ctx->ViewportArray[0].Far; } else { - min_f = ctx->Viewport.Far; - max_f = ctx->Viewport.Near; + min_f = ctx->ViewportArray[0].Far; + max_f = ctx->ViewportArray[0].Near; } /* Convert floating point values in [0,1] to device Z coordinates in |