r300: Use the defined values when writing to R300_RS_ROUTE_0.
authorOliver McFadden <z3ro.geek@gmail.com>
Sun, 13 May 2007 12:56:59 +0000 (12:56 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Sun, 13 May 2007 12:56:59 +0000 (12:56 +0000)
src/mesa/drivers/dri/r300/r300_ioctl.c
src/mesa/drivers/dri/r300/r300_reg.h

index 9d828286a6da9ad2b7bc6b0d69a8efe8ece99c03..09968bf239b58c3cc9e30ce6fb02eacb6c95da18 100644 (file)
@@ -289,7 +289,7 @@ static void r300EmitClearState(GLcontext * ctx)
 
        R300_STATECHANGE(r300, rr);
        reg_start(R300_RS_ROUTE_0, 0);
-       e32(0x00004000);
+       e32(R300_RS_ROUTE_0_COLOR);
 
        R300_STATECHANGE(r300, fp);
        reg_start(R300_PFS_CNTL_0, 2);
index 8ff362b9d2173271840cee210d705b80cb52ca38..0a31f0b978532d6fadab7bfcc616f55bc8e9ddbe 100644 (file)
@@ -673,6 +673,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 /* Special handling for color: When the fragment program uses color,
  * the ROUTE_0_COLOR bit is set and ROUTE_0_COLOR_DEST contains the
  * color register index.
+ *
+ * Apperently you may set the R300_RS_ROUTE_0_COLOR bit, but not provide any
+ * R300_RS_ROUTE_0_COLOR_DEST value; this setup is used for clearing the state.
+ * See r300_ioctl.c:r300EmitClearState. I'm not sure if this setup is strictly
+ * correct or not. - Oliver.
  */
 #       define R300_RS_ROUTE_0_COLOR             (1 << 14)
 #       define R300_RS_ROUTE_0_COLOR_DEST_SHIFT  17