r500: you can have a single texcoord
authorDave Airlie <airlied@redhat.com>
Sun, 18 May 2008 05:24:38 +0000 (15:24 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 18 May 2008 05:25:08 +0000 (15:25 +1000)
src/mesa/drivers/dri/r300/r300_state.c

index 063f39ab70738437030948f6da8a00fe285815db..383a6fbae8be768e2f3b4e43389d54abf95d701a 100644 (file)
@@ -1716,9 +1716,12 @@ static void r500SetupRSUnit(GLcontext * ctx)
                  else
                    count = VB->AttribPtr[_TNL_ATTRIB_TEX(i)]->size;
                  
-                 /* always have a least 2 tex coords */
+                 /* always have on texcoord */
                  swiz |= in_texcoords++ << R500_RS_IP_TEX_PTR_S_SHIFT;
-                 swiz |= in_texcoords++ << R500_RS_IP_TEX_PTR_T_SHIFT;
+                 if (count >= 2) 
+                   swiz |= in_texcoords++ << R500_RS_IP_TEX_PTR_T_SHIFT;
+                 else
+                   swiz |= R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_T_SHIFT;
 
                  if (count >= 3)
                    swiz |= in_texcoords++ << R500_RS_IP_TEX_PTR_R_SHIFT;