disable debug printf's, fix a crash
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 15 Dec 2001 02:13:32 +0000 (02:13 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 15 Dec 2001 02:13:32 +0000 (02:13 +0000)
src/mesa/tnl/t_imm_api.c
src/mesa/tnl/t_imm_exec.c
src/mesa/tnl/t_imm_fixup.c
src/mesa/tnl/t_pipeline.c
src/mesa/tnl/t_vb_program.c

index a4cb484..d79f962 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_imm_api.c,v 1.20 2001/12/14 02:51:44 brianp Exp $ */
+/* $Id: t_imm_api.c,v 1.21 2001/12/15 02:13:32 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -38,6 +38,7 @@
 #include "state.h"
 #include "colormac.h"
 #include "macros.h"
+#include "vtxfmt.h"
 
 #include "t_context.h"
 #include "t_imm_api.h"
@@ -104,7 +105,8 @@ _tnl_begin( GLcontext *ctx, GLenum p )
       _tnl_vprog_vtxfmt_init(ctx);
    else
       _tnl_imm_vtxfmt_init(ctx);
-   _mesa_init_exec_vtxfmt(ctx);
+   /* XXX this should not be done here - inefficient */
+   _mesa_install_exec_vtxfmt(ctx, &(TNL_CONTEXT(ctx)->vtxfmt));
 
    /* if only a very few slots left, might as well flush now
     */
@@ -1241,8 +1243,6 @@ void _tnl_imm_vtxfmt_init( GLcontext *ctx )
 {
    GLvertexformat *vfmt = &(TNL_CONTEXT(ctx)->vtxfmt);
 
-   printf("%s()\n", __FUNCTION__);
-
    /* All begin/end operations are handled by this vertex format:
     */
    vfmt->ArrayElement = _tnl_ArrayElement;
index 58c46c4..4eceb79 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_imm_exec.c,v 1.31 2001/12/14 02:51:45 brianp Exp $ */
+/* $Id: t_imm_exec.c,v 1.32 2001/12/15 02:13:32 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -463,7 +463,6 @@ void _tnl_execute_cassette( GLcontext *ctx, struct immediate *IM )
 {
    TNLcontext *tnl = TNL_CONTEXT(ctx);
 
-   printf("enter %s()\n", __FUNCTION__);
    _tnl_compute_orflag( IM, IM->Start );
    _tnl_copy_immediate_vertices( ctx, IM ); 
    _tnl_get_exec_copy_verts( ctx, IM );
@@ -471,7 +470,6 @@ void _tnl_execute_cassette( GLcontext *ctx, struct immediate *IM )
    if (tnl->pipeline.build_state_changes)
       _tnl_validate_pipeline( ctx );
 
-   printf("  CopyStart %d == Count %d ?\n", IM->CopyStart, IM->Count);
    if (IM->CopyStart == IM->Count) {
       exec_empty_cassette( ctx, IM );
    }
@@ -504,7 +502,6 @@ void _tnl_execute_cassette( GLcontext *ctx, struct immediate *IM )
 
    if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1)
       ctx->Driver.NeedFlush &= ~FLUSH_STORED_VERTICES;
-   printf("leave %s()\n", __FUNCTION__);
 }
 
 
index 8da694a..83b3178 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_imm_fixup.c,v 1.29 2001/12/14 02:51:45 brianp Exp $ */
+/* $Id: t_imm_fixup.c,v 1.30 2001/12/15 02:13:32 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -421,7 +421,6 @@ void _tnl_copy_immediate_vertices( GLcontext *ctx, struct immediate *next )
    }
 
    next->CopyStart = next->Start - count;
-   printf("%s() CopyStart = %d\n", __FUNCTION__, next->CopyStart);
 
    if ((prev->CopyOrFlag & VERT_DATA) == VERT_ELT &&
        ctx->Array.LockCount &&
index 6e39788..f92e21f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_pipeline.c,v 1.20 2001/12/14 02:51:45 brianp Exp $ */
+/* $Id: t_pipeline.c,v 1.21 2001/12/15 02:13:32 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -131,8 +131,6 @@ void _tnl_run_pipeline( GLcontext *ctx )
    pipe->run_state_changes = 0;
    pipe->run_input_changes = 0;
 
-   printf("%s()\n", __FUNCTION__);
-
    /* Done elsewhere.
     */
    ASSERT(pipe->build_state_changes == 0);
index 29a6ca5..19cf7d6 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_vb_program.c,v 1.1 2001/12/14 02:51:45 brianp Exp $ */
+/* $Id: t_vb_program.c,v 1.2 2001/12/15 02:13:32 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -764,6 +764,12 @@ static GLboolean run_vp( GLcontext *ctx, struct gl_pipeline_stage *stage )
              VB->AttribPtr[3]->data[i][1],
              VB->AttribPtr[3]->data[i][2],
              VB->AttribPtr[3]->data[i][3]);
+      printf("  normal: %f, %f, %f, %f\n",
+             VB->AttribPtr[2]->data[i][0],
+             VB->AttribPtr[2]->data[i][1],
+             VB->AttribPtr[2]->data[i][2],
+             VB->AttribPtr[2]->data[i][3]);
+
 
       /* load the input attribute registers */
       for (attr = 0; attr < 16; attr++) {
@@ -969,7 +975,7 @@ static GLboolean run_init_vp( GLcontext *ctx,
 static void check_vp( GLcontext *ctx, struct gl_pipeline_stage *stage )
 {
    stage->active = ctx->VertexProgram.Enabled;
-   printf("check_vp() active = %d\n", stage->active);
+
    if (stage->active) {
 #if 000
       if (stage->privatePtr)