summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_exec_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo/vbo_exec_api.c')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 5070b35c11..80ca1d866e 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -358,10 +358,12 @@ static void vbo_exec_fixup_vertex( struct gl_context *ctx,
#define ATTR( A, N, V0, V1, V2, V3 ) \
do { \
struct vbo_exec_context *exec = &vbo_context(ctx)->exec; \
- \
- if (exec->vtx.active_sz[A] != N) \
- vbo_exec_fixup_vertex(ctx, A, N); \
- \
+ \
+ if (unlikely(!(exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT))) \
+ ctx->Driver.BeginVertices( ctx ); \
+ if (unlikely(exec->vtx.active_sz[A] != N)) \
+ vbo_exec_fixup_vertex(ctx, A, N); \
+ \
{ \
GLfloat *dest = exec->vtx.attrptr[A]; \
if (N>0) dest[0] = V0; \
@@ -911,10 +913,8 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
/* Need to do this to ensure BeginVertices gets called again:
*/
- if (exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) {
- _mesa_restore_exec_vtxfmt( ctx );
+ if (exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT)
exec->ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT;
- }
exec->ctx->Driver.NeedFlush &= ~flags;