From: Brian Paul Date: Fri, 31 Jul 2009 19:57:03 +0000 (-0600) Subject: swrast: fix incorrect texcoord attribute test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7618f4f37d42461b1a6feaa392935d1ae703873;p=mesa.git swrast: fix incorrect texcoord attribute test --- diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 64c9cda5165..50ec2063a55 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -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;