fix memory access error in vbo_bind_vertex_list
[mesa.git] / src / mesa / vbo / vbo_exec.c
index 270e5201d352b7f836f3390a453096e2c1387240..1efa74945dd73afd9f5bcc8072cfd83773fb6c51 100644 (file)
  */
 
 
-#include "api_arrayelt.h"
-#include "glheader.h"
-#include "imports.h"
-#include "context.h"
-#include "macros.h"
-#include "mtypes.h"
-#include "dlist.h"
-#include "vtxfmt.h"
+#include "main/api_arrayelt.h"
+#include "main/glheader.h"
+#include "main/imports.h"
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/mtypes.h"
+#include "main/dlist.h"
+#include "main/vtxfmt.h"
 
 #include "vbo_context.h"
 
-
-
 void vbo_exec_init( GLcontext *ctx )
 {
    struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
@@ -54,11 +52,15 @@ void vbo_exec_init( GLcontext *ctx )
    vbo_exec_vtx_init( exec );
    vbo_exec_array_init( exec );
 
+   /* Hook our functions into exec and compile dispatch tables.
+    */
+   _mesa_install_exec_vtxfmt( ctx, &exec->vtxfmt );
+
    ctx->Driver.NeedFlush = 0;
    ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
    ctx->Driver.FlushVertices = vbo_exec_FlushVertices;
 
-   exec->eval.recalculate_maps = 1;
+   vbo_exec_invalidate_state( ctx, ~0 );
 }
 
 
@@ -90,21 +92,6 @@ void vbo_exec_invalidate_state( GLcontext *ctx, GLuint new_state )
 }
 
 
-void vbo_exec_wakeup( GLcontext *ctx )
-{
-   struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
-
-   ctx->Driver.FlushVertices = vbo_exec_FlushVertices;
-   ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
-
-   /* Hook our functions into exec and compile dispatch tables.
-    */
-   _mesa_install_exec_vtxfmt( ctx, &exec->vtxfmt );
-
-   /* Assume we haven't been getting state updates either:
-    */
-   vbo_exec_invalidate_state( ctx, ~0 );
-}