From cfaf217135d8a8e903b3fbf380f18170df018f0c Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 12 Feb 2011 03:57:19 +0100 Subject: 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. --- src/mesa/main/state.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/main/state.c') 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; } -- cgit v1.2.3