summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2006-12-16 11:17:41 -0700
committerBrian <brian@yutani.localnet.net>2006-12-16 11:17:41 -0700
commitb497a0cb7c607bfad3389c6831de0dfdc37ee5af (patch)
tree57494176fb5c0ce0a009d79ca3f62dc0200a3f0e
parent6ec4a03b9fef4903b30bd0c9bfb43c2f32c98191 (diff)
Don't update span->array->z[] values from SLANG_FRAGMENT_FIXED_FRAGDEPTH.
This restores the behaviour of Mesa 6.5.1, fixing a regression in 6.5.2. See bug 9345. Revisit someday...
-rw-r--r--src/mesa/swrast/s_arbshader.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/mesa/swrast/s_arbshader.c b/src/mesa/swrast/s_arbshader.c
index ee971a36ec..356e43c819 100644
--- a/src/mesa/swrast/s_arbshader.c
+++ b/src/mesa/swrast/s_arbshader.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.6
+ * Version: 6.5.3
*
* Copyright (C) 2006 Brian Paul All Rights Reserved.
*
@@ -103,18 +103,20 @@ _swrast_exec_arbshader(GLcontext *ctx, SWspan *span)
span->writeAll = GL_FALSE;
}
else {
+ GLboolean zWritten = GL_FALSE; /* temp hack (bug 9345) */
(**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGCOLOR,
vec, 0, 4 * sizeof(GLfloat), GL_FALSE);
COPY_4V(span->array->color.sz4.rgba[i], vec);
-
- (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGDEPTH, vec, 0,
- sizeof (GLfloat), GL_FALSE);
- if (vec[0] <= 0.0f)
- span->array->z[i] = 0;
- else if (vec[0] >= 1.0f)
- span->array->z[i] = ctx->DrawBuffer->_DepthMax;
- else
- span->array->z[i] = IROUND(vec[0] * ctx->DrawBuffer->_DepthMaxF);
+ if (zWritten) {
+ (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGDEPTH,
+ vec, 0, sizeof (GLfloat), GL_FALSE);
+ if (vec[0] <= 0.0f)
+ span->array->z[i] = 0;
+ else if (vec[0] >= 1.0f)
+ span->array->z[i] = ctx->DrawBuffer->_DepthMax;
+ else
+ span->array->z[i] = IROUND(vec[0] * ctx->DrawBuffer->_DepthMaxF);
+ }
}
}
}