Mesa (master): swrast: fix incorrect texcoord attribute test

Brian Paul brianp at kemper.freedesktop.org
Thu Aug 13 02:38:05 UTC 2009


Module: Mesa
Branch: master
Commit: f7618f4f37d42461b1a6feaa392935d1ae703873
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7618f4f37d42461b1a6feaa392935d1ae703873

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Jul 31 13:57:03 2009 -0600

swrast: fix incorrect texcoord attribute test

---

 src/mesa/swrast/s_points.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index 64c9cda..50ec206 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;
 




More information about the mesa-commit mailing list