mesa: make _mesa_validate_sync() non-static
[mesa.git] / src / mesa / main / state.c
index 8036d77ff255b92cde0bfe784ef329f198c2e5a0..23926410b3491b9d84c030ecba3e986e532f33b8 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  7.3
  *
  * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
  *
@@ -411,8 +410,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);
@@ -429,7 +430,6 @@ _mesa_update_state_locked( struct gl_context *ctx )
    new_state = ctx->NewState | new_prog_state;
    ctx->NewState = 0;
    ctx->Driver.UpdateState(ctx, new_state);
-   ctx->Array.ArrayObj->NewArrays = 0x0;
 }