summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_render.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_vb_render.c')
-rw-r--r--src/mesa/tnl/t_vb_render.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index 1c501689683..f8e41f5d9be 100644
--- a/src/mesa/tnl/t_vb_render.c
+++ b/src/mesa/tnl/t_vb_render.c
@@ -77,6 +77,9 @@
#define EDGEFLAG_SET(idx, val) VB->EdgeFlag[idx] = val
+#define CLIPMASK (CLIP_ALL_BITS|CLIP_CULL_BIT)
+
+
/* Vertices, with the possibility of clipping.
*/
#define RENDER_POINTS( start, count ) \
@@ -88,7 +91,7 @@ do { \
GLubyte ormask = c1|c2; \
if (!ormask) \
LineFunc( ctx, v1, v2 ); \
- else if (!(c1 & c2 & 0x3f)) \
+ else if (!(c1 & c2 & CLIPMASK)) \
clip_line_4( ctx, v1, v2, ormask ); \
} while (0)
@@ -98,7 +101,7 @@ do { \
GLubyte ormask = c1|c2|c3; \
if (!ormask) \
TriangleFunc( ctx, v1, v2, v3 ); \
- else if (!(c1 & c2 & c3 & 0x3f)) \
+ else if (!(c1 & c2 & c3 & CLIPMASK)) \
clip_tri_4( ctx, v1, v2, v3, ormask ); \
} while (0)
@@ -109,7 +112,7 @@ do { \
GLubyte ormask = c1|c2|c3|c4; \
if (!ormask) \
QuadFunc( ctx, v1, v2, v3, v4 ); \
- else if (!(c1 & c2 & c3 & c4 & 0x3f)) \
+ else if (!(c1 & c2 & c3 & c4 & CLIPMASK)) \
clip_quad_4( ctx, v1, v2, v3, v4, ormask ); \
} while (0)
@@ -170,7 +173,7 @@ static void clip_elt_triangles( GLcontext *ctx,
if (ormask) {
if (start < j)
render_tris( ctx, start, j, 0 );
- if (!(c1&c2&c3&0x3f))
+ if (!(c1&c2&c3&CLIPMASK))
clip_tri_4( ctx, elt[j], elt[j+1], elt[j+2], ormask );
start = j+3;
}