r300: Setup the back facing color bits correctly.
authorOliver McFadden <z3ro.geek@gmail.com>
Thu, 12 Jul 2007 23:52:06 +0000 (23:52 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Fri, 13 Jul 2007 04:51:36 +0000 (04:51 +0000)
Apparently for back facing color to work you must set all 3 color bits; I guess
the hardware cannot handle them separately.

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

index 732dbcbc9d980b4800ac01237378450617dadd1c..424bf44e595159dbe48d59d733bc2f1ca087cc93 100644 (file)
@@ -299,11 +299,12 @@ GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint OutputsWritten)
        if (OutputsWritten & (1 << VERT_RESULT_COL1))
                ret |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_1_PRESENT;
 
-       if (OutputsWritten & (1 << VERT_RESULT_BFC0))
-               ret |= (7 << 2);
-
-       if (OutputsWritten & (1 << VERT_RESULT_BFC1))
-               ret |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_3_PRESENT;
+       if (OutputsWritten & (1 << VERT_RESULT_BFC0)
+           || OutputsWritten & (1 << VERT_RESULT_BFC1))
+               ret |=
+                   R300_VAP_OUTPUT_VTX_FMT_0__COLOR_1_PRESENT |
+                   R300_VAP_OUTPUT_VTX_FMT_0__COLOR_2_PRESENT |
+                   R300_VAP_OUTPUT_VTX_FMT_0__COLOR_3_PRESENT;
 
 #if 0
        if (OutputsWritten & (1 << VERT_RESULT_FOGC)) ;