diff options
author | marha <marha@users.sourceforge.net> | 2012-03-05 09:59:38 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-05 09:59:38 +0100 |
commit | ffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a (patch) | |
tree | 233b818e67de2073647e46e91ac688c6b43d5917 /mesalib/src/mesa/main/varray.c | |
parent | 15a500d3edb03668b43cc6898fafcda024d0f006 (diff) | |
download | vcxsrv-ffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a.tar.gz vcxsrv-ffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a.tar.bz2 vcxsrv-ffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a.zip |
libfontenc xserver pixman mesa git update 5 Mar 2012
font-util-1.3.0
xclock-1.0.6
libXfont-1.4.5
inputproto-2.2
Diffstat (limited to 'mesalib/src/mesa/main/varray.c')
-rw-r--r-- | mesalib/src/mesa/main/varray.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c index 39d3a27e0..a402c7b22 100644 --- a/mesalib/src/mesa/main/varray.c +++ b/mesalib/src/mesa/main/varray.c @@ -1117,8 +1117,9 @@ _mesa_PrimitiveRestartIndex(GLuint index) void GLAPIENTRY _mesa_VertexAttribDivisor(GLuint index, GLuint divisor) { + struct gl_client_array *array; GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); if (!ctx->Extensions.ARB_instanced_arrays) { _mesa_error(ctx, GL_INVALID_OPERATION, "glVertexAttribDivisor()"); @@ -1133,7 +1134,12 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor) ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); - ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].InstanceDivisor = divisor; + array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)]; + if (array->InstanceDivisor != divisor) { + FLUSH_VERTICES(ctx, _NEW_ARRAY); + array->InstanceDivisor = divisor; + ctx->Array.NewState |= VERT_BIT(VERT_ATTRIB_GENERIC(index)); + } } |