summaryrefslogtreecommitdiff
path: root/xc/extras/Mesa/src/tnl_dd/t_dd_triemit.h
diff options
context:
space:
mode:
Diffstat (limited to 'xc/extras/Mesa/src/tnl_dd/t_dd_triemit.h')
-rw-r--r--xc/extras/Mesa/src/tnl_dd/t_dd_triemit.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/xc/extras/Mesa/src/tnl_dd/t_dd_triemit.h b/xc/extras/Mesa/src/tnl_dd/t_dd_triemit.h
index 39c4a20c4..2f5bcee7e 100644
--- a/xc/extras/Mesa/src/tnl_dd/t_dd_triemit.h
+++ b/xc/extras/Mesa/src/tnl_dd/t_dd_triemit.h
@@ -1,3 +1,10 @@
+#ifndef DO_DEBUG_VERTS
+#define DO_DEBUG_VERTS 0
+#endif
+
+#ifndef PRINT_VERTEX
+#define PRINT_VERTEX(x)
+#endif
#if defined(USE_X86_ASM)
#define COPY_DWORDS( j, vb, vertsize, v ) \
@@ -31,6 +38,14 @@ static __inline void TAG(quad)( CTX_ARG,
GLuint *vb = (GLuint *)ALLOC_VERTS( 4, vertsize);
GLuint j;
+ if (DO_DEBUG_VERTS) {
+ fprintf(stderr, "%s\n", __FUNCTION__);
+ PRINT_VERTEX(v0);
+ PRINT_VERTEX(v1);
+ PRINT_VERTEX(v2);
+ PRINT_VERTEX(v3);
+ }
+
COPY_DWORDS( j, vb, vertsize, v0 );
COPY_DWORDS( j, vb, vertsize, v1 );
COPY_DWORDS( j, vb, vertsize, v2 );
@@ -47,6 +62,14 @@ static __inline void TAG(quad)( CTX_ARG,
GLuint *vb = (GLuint *)ALLOC_VERTS( 6, vertsize);
GLuint j;
+ if (DO_DEBUG_VERTS) {
+ fprintf(stderr, "%s\n", __FUNCTION__);
+ PRINT_VERTEX(v0);
+ PRINT_VERTEX(v1);
+ PRINT_VERTEX(v2);
+ PRINT_VERTEX(v3);
+ }
+
COPY_DWORDS( j, vb, vertsize, v0 );
COPY_DWORDS( j, vb, vertsize, v1 );
COPY_DWORDS( j, vb, vertsize, v3 );
@@ -66,6 +89,13 @@ static __inline void TAG(triangle)( CTX_ARG,
GLuint *vb = (GLuint *)ALLOC_VERTS( 3, vertsize);
GLuint j;
+ if (DO_DEBUG_VERTS) {
+ fprintf(stderr, "%s\n", __FUNCTION__);
+ PRINT_VERTEX(v0);
+ PRINT_VERTEX(v1);
+ PRINT_VERTEX(v2);
+ }
+
COPY_DWORDS( j, vb, vertsize, v0 );
COPY_DWORDS( j, vb, vertsize, v1 );
COPY_DWORDS( j, vb, vertsize, v2 );
@@ -108,7 +138,17 @@ static void TAG(fast_clipped_poly)( GLcontext *ctx, const GLuint *elts,
const GLuint *start = (const GLuint *)VERT(elts[0]);
int i,j;
+ if (DO_DEBUG_VERTS) {
+ fprintf(stderr, "%s\n", __FUNCTION__);
+ PRINT_VERTEX(VERT(elts[0]));
+ PRINT_VERTEX(VERT(elts[1]));
+ }
+
for (i = 2 ; i < n ; i++) {
+ if (DO_DEBUG_VERTS) {
+ PRINT_VERTEX(VERT(elts[i]));
+ }
+
COPY_DWORDS( j, vb, vertsize, VERT(elts[i-1]) );
COPY_DWORDS( j, vb, vertsize, VERT(elts[i]) );
COPY_DWORDS( j, vb, vertsize, start );