r300: Corrected some progs/fp/* regressions from the BFC patch.
authorOliver McFadden <z3ro.geek@gmail.com>
Mon, 16 Jul 2007 21:43:39 +0000 (21:43 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Mon, 16 Jul 2007 21:43:39 +0000 (21:43 +0000)
I'm not completely sure this is correct; it restores the old behaviour.

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

index 9184ee7abf7efa6bd73818a8ab7abb5c417d79d5..0fb6110494be23f1351db7a12b9bcab4cc25870d 100644 (file)
@@ -1497,6 +1497,24 @@ void r300SelectVertexShader(r300ContextPtr r300)
        }
        wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead;
        wanted_key.OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
+
+       wanted_key.OutputsWritten |= 1 << VERT_RESULT_HPOS;
+
+       if (InputsRead & FRAG_BIT_COL0) {
+               wanted_key.OutputsWritten |= 1 << VERT_RESULT_COL0;
+       }
+
+       if ((InputsRead & FRAG_BIT_COL1)) {
+               wanted_key.OutputsWritten |= 1 << VERT_RESULT_COL1;
+       }
+
+       for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+               if (InputsRead & (FRAG_BIT_TEX0 << i)) {
+                       wanted_key.OutputsWritten |=
+                           1 << (VERT_RESULT_TEX0 + i);
+               }
+       }
+
        if (vpc->mesa_program.IsPositionInvariant) {
                /* we wan't position don't we ? */
                wanted_key.InputsRead |= (1 << VERT_ATTRIB_POS);