From 1e2770e2e6244a0decbf077dfd34a3763428a2c0 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 13 Oct 2007 12:27:10 -0600 Subject: [PATCH] inequality tests were backward --- src/mesa/pipe/softpipe/sp_quad_stencil.c | 12 ++++++------ 1 file 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 56cc6907b2f..bf72bb23cd0 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); } } -- 2.30.2