From 0de5a21470b3bff9b7c8714e5d960d5ed9d01b9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 16 Apr 2012 02:14:18 +0200 Subject: [PATCH] mesa: only update _MaxElement when we actually need it MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Paul Reviewed-by: Mathias Fröhlich --- src/mesa/main/state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index b01926622ad..2e9f021619f 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -561,8 +561,10 @@ _mesa_update_state_locked( struct gl_context *ctx ) new_prog_state |= update_program( ctx ); } - if (new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) + if (ctx->Const.CheckArrayBounds && + (new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT))) { _mesa_update_array_object_max_element(ctx, ctx->Array.ArrayObj); + } out: new_prog_state |= update_program_constants(ctx); -- 2.30.2