swrast: fix incorrect texcoord attribute test
authorBrian Paul <brianp@vmware.com>
Fri, 31 Jul 2009 19:57:03 +0000 (13:57 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 31 Jul 2009 19:57:03 +0000 (13:57 -0600)
src/mesa/swrast/s_points.c

index 64c9cda5165430a20696be2586fb5c711f64f4bf..50ec2063a55af317f04519d4c98e26312d9eaa59 100644 (file)
@@ -139,10 +139,10 @@ sprite_point(GLcontext *ctx, const SWvertex *vert)
       }
 
       ATTRIB_LOOP_BEGIN
-         if ((attr >= FRAG_ATTRIB_TEX0 && attr <= FRAG_ATTRIB_TEX7) ||
-            attr >= FRAG_ATTRIB_VAR0) {
+         if (attr >= FRAG_ATTRIB_TEX0 && attr <= FRAG_ATTRIB_TEX7) {
+            /* a texcoord attribute */
             const GLuint u = attr - FRAG_ATTRIB_TEX0;
-            /* a texcoord */
+            ASSERT(u < Elements(ctx->Point.CoordReplace));
             if (ctx->Point.CoordReplace[u]) {
                tCoords[numTcoords++] = attr;