summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/vbo/vbo_context.c1
-rw-r--r--src/mesa/vbo/vbo_exec.c23
-rw-r--r--src/mesa/vbo/vbo_exec.h1
-rw-r--r--src/mesa/vbo/vbo_save.c38
-rw-r--r--src/mesa/vbo/vbo_save.h2
5 files changed, 19 insertions, 46 deletions
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index 5279b2e13c2..291eb0bed3b 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -214,6 +214,7 @@ GLboolean _vbo_CreateContext( GLcontext *ctx )
void _vbo_InvalidateState( GLcontext *ctx, GLuint new_state )
{
_ae_invalidate_state(ctx, new_state);
+ vbo_exec_invalidate_state(ctx, new_state);
}
diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index 270e5201d35..7d958732479 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -37,8 +37,6 @@
#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 );
-}
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index 72855d267ed..ef158de825a 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -146,7 +146,6 @@ void vbo_exec_init( GLcontext *ctx );
void vbo_exec_destroy( GLcontext *ctx );
void vbo_exec_invalidate_state( GLcontext *ctx, GLuint new_state );
void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags );
-void vbo_exec_wakeup( GLcontext *ctx );
/* Internal functions:
diff --git a/src/mesa/vbo/vbo_save.c b/src/mesa/vbo/vbo_save.c
index 0a5b7054005..3a97ea66a4f 100644
--- a/src/mesa/vbo/vbo_save.c
+++ b/src/mesa/vbo/vbo_save.c
@@ -35,6 +35,18 @@
+static void vbo_save_callback_init( GLcontext *ctx )
+{
+ ctx->Driver.NewList = vbo_save_NewList;
+ ctx->Driver.EndList = vbo_save_EndList;
+ ctx->Driver.SaveFlushVertices = vbo_save_SaveFlushVertices;
+ ctx->Driver.BeginCallList = vbo_save_BeginCallList;
+ ctx->Driver.EndCallList = vbo_save_EndCallList;
+ ctx->Driver.NotifySaveBegin = vbo_save_NotifyBegin;
+}
+
+
+
void vbo_save_init( GLcontext *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -42,7 +54,7 @@ void vbo_save_init( GLcontext *ctx )
save->ctx = ctx;
vbo_save_api_init( save );
- vbo_save_wakeup(ctx);
+ vbo_save_callback_init(ctx);
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
}
@@ -68,27 +80,3 @@ void vbo_save_fallback( GLcontext *ctx, GLboolean fallback )
}
-/* I don't see any reason to swap this code out on fallbacks. It
- * wouldn't really mean anything to do so anyway as the old lists are
- * still around from pre-fallback. Instead, the above code ensures
- * that vertices are routed back through immediate mode dispatch on
- * fallback.
- *
- * The below can be moved into init or removed:
- */
-void vbo_save_wakeup( GLcontext *ctx )
-{
- ctx->Driver.NewList = vbo_save_NewList;
- ctx->Driver.EndList = vbo_save_EndList;
- ctx->Driver.SaveFlushVertices = vbo_save_SaveFlushVertices;
- ctx->Driver.BeginCallList = vbo_save_BeginCallList;
- ctx->Driver.EndCallList = vbo_save_EndCallList;
- ctx->Driver.NotifySaveBegin = vbo_save_NotifyBegin;
-
- /* Assume we haven't been getting state updates either:
- */
- vbo_save_invalidate_state( ctx, ~0 );
-}
-
-
-
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index dbe5cafb999..5a644294112 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -150,8 +150,6 @@ struct vbo_save_context {
void vbo_save_init( GLcontext *ctx );
void vbo_save_destroy( GLcontext *ctx );
-void vbo_save_wakeup( GLcontext *ctx );
-void vbo_save_invalidate_state( GLcontext *ctx, GLuint new_state );
void vbo_save_fallback( GLcontext *ctx, GLboolean fallback );
/* save_loopback.c: