r300: fix for SW TCL path
authorMaciej Cencora <m.cencora@gmail.com>
Wed, 10 Jun 2009 14:58:15 +0000 (16:58 +0200)
committerMaciej Cencora <m.cencora@gmail.com>
Thu, 11 Jun 2009 21:25:54 +0000 (23:25 +0200)
We shouldn't use i variable for SWTCL_OVM_TEX because textures doesn't have to be enabled in "packed" order.
We could have tex1,tex3 and fog which would receive 7,9,8 OVM locations instead of 6,7,8.

src/mesa/drivers/dri/r300/r300_swtcl.c

index f3171c081eb3ab5472424b131c78a889ac7d9117..ce4179208ebba26579c219b74147c76242a67fa0 100644 (file)
@@ -186,7 +186,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead,  GLuint *_
                                InputsRead |= 1 << (VERT_ATTRIB_TEX0 + i);
                                OutputsWritten |= 1 << (VERT_RESULT_TEX0 + i);
                                EMIT_ATTR(_TNL_ATTRIB_TEX(i), format);
-                               ADD_ATTR(VERT_ATTRIB_TEX0 + i, hw_format, SWTCL_OVM_TEX(i), swiz, MASK_XYZW, 0);
+                               ADD_ATTR(VERT_ATTRIB_TEX0 + i, hw_format, SWTCL_OVM_TEX(first_free_tex), swiz, MASK_XYZW, 0);
                                ++first_free_tex;
                        }
                }