summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtney@LunarG.com>2013-11-13 16:24:56 -0700
committerIan Romanick <ian.d.romanick@intel.com>2014-01-20 11:31:56 -0800
commitcbb271a48845c2d236f31327df316d42888a1907 (patch)
treea860c48f113d8171d31d77bacf1c341627e4c099 /src/mesa/swrast
parent5b84226c31e941219422f6d60c31524081b7a188 (diff)
downloadexternal_mesa3d-cbb271a48845c2d236f31327df316d42888a1907.zip
external_mesa3d-cbb271a48845c2d236f31327df316d42888a1907.tar.gz
external_mesa3d-cbb271a48845c2d236f31327df316d42888a1907.tar.bz2
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 <courtney@LunarG.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_context.c8
-rw-r--r--src/mesa/swrast/s_depth.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 8a5de47..0748500 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 0f4fb95..7f3c76d 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