summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/rastpos.c
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <[email protected]>2013-11-13 16:24:56 -0700
committerIan Romanick <[email protected]>2014-01-20 11:31:56 -0800
commitcbb271a48845c2d236f31327df316d42888a1907 (patch)
treea860c48f113d8171d31d77bacf1c341627e4c099 /src/mesa/main/rastpos.c
parent5b84226c31e941219422f6d60c31524081b7a188 (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/main/rastpos.c')
-rw-r--r--src/mesa/main/rastpos.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index 1acdb8b53eb..a9a6ceec0c1 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -227,8 +227,9 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z)
FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
- z2 = CLAMP(z, 0.0F, 1.0F) * (ctx->Viewport.Far - ctx->Viewport.Near)
- + ctx->Viewport.Near;
+ z2 = CLAMP(z, 0.0F, 1.0F)
+ * (ctx->ViewportArray[0].Far - ctx->ViewportArray[0].Near)
+ + ctx->ViewportArray[0].Near;
/* set raster position */
ctx->Current.RasterPos[0] = x;