summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@nx6125b.(none)>2007-04-14 17:44:33 +1000
committerDave Airlie <airlied@nx6125b.(none)>2007-04-14 17:44:33 +1000
commit8d8a3cc39816168e5f04a668ae184cafe64d4fd2 (patch)
treee3993e4ed7462379c5d8bbf7e0b9b211e77925b7
parentfb1d22d23d0f2db518f10e6e1aeaea357de61cd9 (diff)
r300: emit different clear paths for non-TCL, this gets the clear color correct
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index 41774155213..90ac9881e8f 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -186,7 +186,10 @@ static void r300EmitClearState(GLcontext * ctx)
R300_STATECHANGE(r300, vir[0]);
reg_start(R300_VAP_INPUT_ROUTE_0_0, 0);
- e32(0x21030003);
+ if (!has_tcl)
+ e32(0x22030003);
+ else
+ e32(0x21030003);
/* disable fog */
R300_STATECHANGE(r300, fogs);
@@ -201,7 +204,17 @@ static void r300EmitClearState(GLcontext * ctx)
reg_start(R300_VAP_INPUT_CNTL_0, 1);
e32(0x00000001);
e32(0x00000405);
-
+
+ if (!has_tcl) {
+ /* comes from fglrx startup of clear */
+ reg_start(R300_SE_VTE_CNTL, 1);
+ e32(0x043f);
+ e32(0x8);
+
+ reg_start(0x21dc, 0);
+ e32(0xaaaaaaaa);
+ }
+
R300_STATECHANGE(r300, vof);
reg_start(R300_VAP_OUTPUT_VTX_FMT_0, 1);
e32(R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT | R300_VAP_OUTPUT_VTX_FMT_0__COLOR_PRESENT);