summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_tritemp.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-10-17 15:26:38 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-10-17 15:26:38 +0000
commit10d343f407bddf011be3d2b79a6541815759785a (patch)
tree9953198b654f697621d2f6d5a8eff9ea0da0419d /src/mesa/swrast/s_tritemp.h
parent673077c613319218be6e9dcee55035d471f87977 (diff)
patches from Gerk Huisma for float-channel rendering
Diffstat (limited to 'src/mesa/swrast/s_tritemp.h')
-rw-r--r--src/mesa/swrast/s_tritemp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index ef5e00eb5b..dcd1f4a8d8 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_tritemp.h,v 1.39 2002/10/02 23:24:04 brianp Exp $ */
+/* $Id: s_tritemp.h,v 1.40 2002/10/17 15:26:39 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -115,7 +115,7 @@
GLfloat oneOverArea;
const SWvertex *vMin, *vMid, *vMax; /* Y(vMin)<=Y(vMid)<=Y(vMax) */
float bf = SWRAST_CONTEXT(ctx)->_backface_sign;
- const GLint snapMask = ~((FIXED_ONE / 16) - 1); /* for x/y coord snapping */
+ const GLint snapMask = ~((FIXED_ONE / (1 << SUB_PIXEL_BITS)) - 1); /* for x/y coord snapping */
GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy;
struct sw_span span;
@@ -206,7 +206,7 @@
if (area * bf < 0.0)
return;
- if (area == 0.0F || IS_INF_OR_NAN(area))
+ if (IS_INF_OR_NAN(area) || area == 0.0F)
return;
oneOverArea = 1.0F / area;