Browse Source

mesa: only update _MaxElement when we actually need it

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
tags/i965-primitive-restart-v2
Marek Olšák 13 years ago
parent
commit
0de5a21470
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/mesa/main/state.c

+ 3
- 1
src/mesa/main/state.c View File

@@ -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);

Loading…
Cancel
Save