summaryrefslogtreecommitdiff
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-12 03:57:19 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-14 21:50:07 +0100
commitcfaf217135d8a8e903b3fbf380f18170df018f0c (patch)
tree1447b05de44ae5a0b47b595be041bf3b7f0475cb /src/mesa/main/state.c
parent5a01361ceaf29614ba008278e31cf2ffe85f251b (diff)
vbo: bind arrays only when necessary
We don't need to call bind_arrays in the vbo module if the states which the function depends on are not dirty.
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index cce1b464f0..502c429294 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -662,6 +662,8 @@ _mesa_update_state_locked( struct gl_context *ctx )
ctx->NewState = 0;
ctx->Driver.UpdateState(ctx, new_state);
ctx->Array.NewState = 0;
+ if (!ctx->Array.RebindArrays)
+ ctx->Array.RebindArrays = (new_state & (_NEW_ARRAY | _NEW_PROGRAM)) != 0;
}