time.
void _vbo_InvalidateState( GLcontext *ctx, GLuint new_state )
{
_ae_invalidate_state(ctx, new_state);
+ vbo_exec_invalidate_state(ctx, new_state);
}
#include "vbo_context.h"
-
-
void vbo_exec_init( GLcontext *ctx )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
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 );
}
}
-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 );
-}
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:
+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;
save->ctx = ctx;
vbo_save_api_init( save );
- vbo_save_wakeup(ctx);
+ vbo_save_callback_init(ctx);
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
}
}
-/* 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 );
-}
-
-
-
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: