diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2006-10-30 17:12:05 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-10-30 17:12:05 +0000 |
commit | e8abd098b36c30d76b4c396970fd793ae58e0702 (patch) | |
tree | 6771c25a9268c3e6379bedc0d334bc0c65619afa | |
parent | 48f5deab94be832a782a440f55a7bc742d50a62f (diff) |
Remove wakeup functions. This code is intended to be active all the
time.
-rw-r--r-- | src/mesa/vbo/vbo_context.c | 1 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec.c | 23 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec.h | 1 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_save.c | 38 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_save.h | 2 |
5 files changed, 19 insertions, 46 deletions
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index 5279b2e13c..291eb0bed3 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 270e5201d3..7d95873247 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 72855d267e..ef158de825 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 0a5b705400..3a97ea66a4 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 dbe5cafb99..5a64429411 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: |