summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_depth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_depth.c')
-rw-r--r--src/mesa/swrast/s_depth.c10
1 files changed, 5 insertions, 5 deletions
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