summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-13 12:27:10 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-13 12:27:10 -0600
commit1e2770e2e6244a0decbf077dfd34a3763428a2c0 (patch)
treed1ba3a9713623918a60fbf5b8eb26676870f5454 /src/mesa/pipe
parenta2c8b0e861e7c84d927b636663ac39f8cdc504a3 (diff)
inequality tests were backward
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_stencil.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_stencil.c b/src/mesa/pipe/softpipe/sp_quad_stencil.c
index 56cc6907b2..bf72bb23cd 100644
--- a/src/mesa/pipe/softpipe/sp_quad_stencil.c
+++ b/src/mesa/pipe/softpipe/sp_quad_stencil.c
@@ -42,42 +42,42 @@ do_stencil_test(const ubyte stencilVals[QUAD_SIZE], unsigned func,
break;
case PIPE_FUNC_LESS:
for (j = 0; j < QUAD_SIZE; j++) {
- if ((stencilVals[j] & valMask) < ref) {
+ if (ref < (stencilVals[j] & valMask)) {
passMask |= (1 << j);
}
}
break;
case PIPE_FUNC_EQUAL:
for (j = 0; j < QUAD_SIZE; j++) {
- if ((stencilVals[j] & valMask) == ref) {
+ if (ref == (stencilVals[j] & valMask)) {
passMask |= (1 << j);
}
}
break;
case PIPE_FUNC_LEQUAL:
for (j = 0; j < QUAD_SIZE; j++) {
- if ((stencilVals[j] & valMask) <= ref) {
+ if (ref <= (stencilVals[j] & valMask)) {
passMask |= (1 << j);
}
}
break;
case PIPE_FUNC_GREATER:
for (j = 0; j < QUAD_SIZE; j++) {
- if ((stencilVals[j] & valMask) > ref) {
+ if (ref > (stencilVals[j] & valMask)) {
passMask |= (1 << j);
}
}
break;
case PIPE_FUNC_NOTEQUAL:
for (j = 0; j < QUAD_SIZE; j++) {
- if ((stencilVals[j] & valMask) != ref) {
+ if (ref != (stencilVals[j] & valMask)) {
passMask |= (1 << j);
}
}
break;
case PIPE_FUNC_GEQUAL:
for (j = 0; j < QUAD_SIZE; j++) {
- if ((stencilVals[j] & valMask) >= ref) {
+ if (ref >= (stencilVals[j] & valMask)) {
passMask |= (1 << j);
}
}