diff options
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 7e61f7b31fd..1bf3af47b8b 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -501,6 +501,7 @@ vbo_bind_arrays(struct gl_context *ctx) if (exec->array.recalculate_inputs) { recalculate_input_bindings(ctx); + exec->array.recalculate_inputs = GL_FALSE; /* Again... because we may have changed the bitmask of per-vertex varying * attributes. If we regenerate the fixed-function vertex program now @@ -508,10 +509,13 @@ vbo_bind_arrays(struct gl_context *ctx) * need in the shader. */ if (ctx->NewState) { + /* Setting "validating" to TRUE prevents _mesa_update_state from + * invalidating what we just did. + */ + exec->validating = GL_TRUE; _mesa_update_state(ctx); + exec->validating = GL_FALSE; } - - exec->array.recalculate_inputs = GL_FALSE; } } |