summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-03-08 08:31:12 -0700
committerBrian Paul <[email protected]>2011-03-08 08:31:43 -0700
commit4a802738b08b1dbddef6c59d0a1324f864b987b0 (patch)
tree5830aa96aca59f24a2519817709b1db7af00c84c /src
parentd9f584e663c7447e638acca2c164b16626a5271a (diff)
swrast: flip the conditionals in shadow_compare4() for readability
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_texfilter.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 4b0a4bcec18..42785400c0e 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -2918,40 +2918,40 @@ shadow_compare4(GLenum function, GLfloat coord,
switch (function) {
case GL_LEQUAL:
- if (depth00 < coord) luminance -= d;
- if (depth01 < coord) luminance -= d;
- if (depth10 < coord) luminance -= d;
- if (depth11 < coord) luminance -= d;
+ if (coord > depth00) luminance -= d;
+ if (coord > depth01) luminance -= d;
+ if (coord > depth10) luminance -= d;
+ if (coord > depth11) luminance -= d;
return luminance;
case GL_GEQUAL:
- if (depth00 > coord) luminance -= d;
- if (depth01 > coord) luminance -= d;
- if (depth10 > coord) luminance -= d;
- if (depth11 > coord) luminance -= d;
+ if (coord < depth00) luminance -= d;
+ if (coord < depth01) luminance -= d;
+ if (coord < depth10) luminance -= d;
+ if (coord < depth11) luminance -= d;
return luminance;
case GL_LESS:
- if (depth00 <= coord) luminance -= d;
- if (depth01 <= coord) luminance -= d;
- if (depth10 <= coord) luminance -= d;
- if (depth11 <= coord) luminance -= d;
+ if (coord >= depth00) luminance -= d;
+ if (coord >= depth01) luminance -= d;
+ if (coord >= depth10) luminance -= d;
+ if (coord >= depth11) luminance -= d;
return luminance;
case GL_GREATER:
- if (depth00 >= coord) luminance -= d;
- if (depth01 >= coord) luminance -= d;
- if (depth10 >= coord) luminance -= d;
- if (depth11 >= coord) luminance -= d;
+ if (coord <= depth00) luminance -= d;
+ if (coord <= depth01) luminance -= d;
+ if (coord <= depth10) luminance -= d;
+ if (coord <= depth11) luminance -= d;
return luminance;
case GL_EQUAL:
- if (depth00 != coord) luminance -= d;
- if (depth01 != coord) luminance -= d;
- if (depth10 != coord) luminance -= d;
- if (depth11 != coord) luminance -= d;
+ if (coord != depth00) luminance -= d;
+ if (coord != depth01) luminance -= d;
+ if (coord != depth10) luminance -= d;
+ if (coord != depth11) luminance -= d;
return luminance;
case GL_NOTEQUAL:
- if (depth00 == coord) luminance -= d;
- if (depth01 == coord) luminance -= d;
- if (depth10 == coord) luminance -= d;
- if (depth11 == coord) luminance -= d;
+ if (coord == depth00) luminance -= d;
+ if (coord == depth01) luminance -= d;
+ if (coord == depth10) luminance -= d;
+ if (coord == depth11) luminance -= d;
return luminance;
case GL_ALWAYS:
return 1.0F;