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/vbo/vbo_exec_array.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/vbo') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 80085c17c5..6749541b77 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -502,8 +502,13 @@ recalculate_input_bindings(struct gl_context *ctx) static void bind_arrays(struct gl_context *ctx) { + if (!ctx->Array.RebindArrays) { + return; + } + bind_array_obj(ctx); recalculate_input_bindings(ctx); + ctx->Array.RebindArrays = GL_FALSE; } -- cgit v1.2.3