Header file clean-up:
[mesa.git] / src / mesa / main / vtxfmt.c
index 599dce1bf2a23f3b0031b983142a40659e55ea51..54eef4a602873e8fc3bac94cdf8aba3ebfc2a81e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: vtxfmt.c,v 1.10 2001/12/15 02:14:43 brianp Exp $ */
+/* $Id: vtxfmt.c,v 1.13 2002/10/24 23:57:21 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -31,6 +31,7 @@
 #include "glheader.h"
 #include "api_loopback.h"
 #include "context.h"
+#include "imports.h"
 #include "mtypes.h"
 #include "state.h"
 #include "vtxfmt.h"
 {                                                                      \
    GET_CURRENT_CONTEXT(ctx);                                           \
    struct gl_tnl_module *tnl = &(ctx->TnlModule);                      \
-   const GLuint new_state = ctx->NewState;                             \
-                                                                       \
-   if ( new_state )                                                    \
-      _mesa_update_state( ctx );                                       \
-                                                                       \
-   /* Validate the current tnl module. */                              \
-   if ( new_state & ctx->Driver.NeedValidate )                         \
-      ctx->Driver.ValidateTnlModule( ctx, new_state );                 \
                                                                        \
    ASSERT( tnl->Current );                                             \
    ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES );               \
@@ -69,7 +62,7 @@
    tnl->SwapCount++;                                                   \
                                                                        \
    if ( 0 )                                                            \
-      fprintf( stderr, "   swapping gl" #FUNC"...\n" );                        \
+      _mesa_debug(ctx, "   swapping gl" #FUNC"...\n" );                        \
                                                                        \
    /* Install the tnl function pointer.        */                              \
    ctx->Exec->FUNC = tnl->Current->FUNC;                               \
@@ -149,6 +142,7 @@ static void install_vtxfmt( struct _glapi_table *tab, GLvertexformat *vfmt )
 void _mesa_init_exec_vtxfmt( GLcontext *ctx )
 {
    install_vtxfmt( ctx->Exec, &neutral_vtxfmt );
+   ctx->TnlModule.SwapCount = 0;
 }