summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-10-03 13:55:40 +0100
committerKeith Whitwell <[email protected]>2008-10-03 16:49:52 +0100
commitfa1b533012030cd67148b5bf1e018fd5e30c96f8 (patch)
tree4f22a4d0a4a8a57f0a5cccbd47a6386fd362bc71 /src/mesa/main
parent0e008d37979e4e5ede25056221583e02c08a5df7 (diff)
mesa: add new internal state for tracking current vertex attribs
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/state.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index a5e1cf6a276..bc099dabeb0 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2744,6 +2744,7 @@ struct gl_matrix_stack
#define _NEW_MULTISAMPLE 0x2000000 /**< __GLcontextRec::Multisample */
#define _NEW_TRACK_MATRIX 0x4000000 /**< __GLcontextRec::VertexProgram */
#define _NEW_PROGRAM 0x8000000 /**< __GLcontextRec::VertexProgram */
+#define _NEW_CURRENT_ATTRIB 0x10000000 /**< __GLcontextRec::Current */
#define _NEW_ALL ~0
/*@}*/
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index d355f78a0ef..eb8dc2a3398 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -407,6 +407,9 @@ _mesa_update_state_locked( GLcontext *ctx )
GLbitfield new_state = ctx->NewState;
GLbitfield prog_flags = _NEW_PROGRAM;
+ if (new_state == _NEW_CURRENT_ATTRIB)
+ goto out;
+
if (MESA_VERBOSE & VERBOSE_STATE)
_mesa_print_state("_mesa_update_state", new_state);
@@ -484,6 +487,7 @@ _mesa_update_state_locked( GLcontext *ctx )
* Set ctx->NewState to zero to avoid recursion if
* Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?)
*/
+ out:
new_state = ctx->NewState;
ctx->NewState = 0;
ctx->Driver.UpdateState(ctx, new_state);