summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-04-18 10:47:10 -0600
committerBrian Paul <[email protected]>2012-04-20 07:32:33 -0600
commitb0e048f0b955ef79e2de794172de053d27d7d8fa (patch)
treea34dbcb7643b89f8a2686c135d04f6d5eb12bf1b /src/mesa/main/varray.c
parent0615eb8fc3e516f56c27cddb6206f4e53142506c (diff)
mesa: move gl_array_attrib::NewState to gl_array_object::NewArrays
The field wasn't actually used before and it's not used now either. But this is a more logical place for it and will hopefully allow doing smarter draw/array validation (per array object) in the future. Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 1c1484323bb..efa63b07c13 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -221,7 +221,7 @@ update_array(struct gl_context *ctx,
ctx->Array.ArrayBufferObj);
ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= VERT_BIT(attrib);
+ ctx->Array.ArrayObj->NewArrays |= VERT_BIT(attrib);
}
@@ -502,7 +502,7 @@ _mesa_EnableVertexAttribArrayARB(GLuint index)
FLUSH_VERTICES(ctx, _NEW_ARRAY);
arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_TRUE;
arrayObj->_Enabled |= VERT_BIT_GENERIC(index);
- ctx->Array.NewState |= VERT_BIT_GENERIC(index);
+ arrayObj->NewArrays |= VERT_BIT_GENERIC(index);
}
}
@@ -529,7 +529,7 @@ _mesa_DisableVertexAttribArrayARB(GLuint index)
FLUSH_VERTICES(ctx, _NEW_ARRAY);
arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_FALSE;
arrayObj->_Enabled &= ~VERT_BIT_GENERIC(index);
- ctx->Array.NewState |= VERT_BIT_GENERIC(index);
+ arrayObj->NewArrays |= VERT_BIT_GENERIC(index);
}
}
@@ -1001,7 +1001,6 @@ _mesa_LockArraysEXT(GLint first, GLsizei count)
ctx->Array.LockCount = count;
ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= VERT_BIT_ALL;
}
@@ -1022,7 +1021,6 @@ _mesa_UnlockArraysEXT( void )
ctx->Array.LockFirst = 0;
ctx->Array.LockCount = 0;
ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= VERT_BIT_ALL;
}
@@ -1138,7 +1136,7 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor)
if (array->InstanceDivisor != divisor) {
FLUSH_VERTICES(ctx, _NEW_ARRAY);
array->InstanceDivisor = divisor;
- ctx->Array.NewState |= VERT_BIT(VERT_ATTRIB_GENERIC(index));
+ ctx->Array.ArrayObj->NewArrays |= VERT_BIT(VERT_ATTRIB_GENERIC(index));
}
}