From: Brian Date: Sat, 13 Oct 2007 18:27:10 +0000 (-0600) Subject: inequality tests were backward X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e2770e2e6244a0decbf077dfd34a3763428a2c0;p=mesa.git inequality tests were backward --- 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); } }