diff options
author | Vladimir Dergachev <volodya@freedesktop.org> | 2004-12-30 07:50:15 +0000 |
---|---|---|
committer | Vladimir Dergachev <volodya@freedesktop.org> | 2004-12-30 07:50:15 +0000 |
commit | 51050efe0e1cc8fb690808e1258eea96a57a54c5 (patch) | |
tree | de813238677d07c7ed8bf6b1eca7035361b09ce4 /src | |
parent | 7d8c1fb03a738d63706eb07708a87712bd6fe102 (diff) |
Change default RS settings so that glxgears will display something..
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_cmdbuf.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 14 |
3 files changed, 15 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index e668e97da9..841ad4ff43 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -382,6 +382,8 @@ void r300InitCmdBuf(r300ContextPtr r300) r300->hw.unk4E50.cmd[0] = cmducs(0x4E50, 9); ALLOC_STATE( unk4E88, always, 2, "unk4E88", 0 ); r300->hw.unk4E88.cmd[0] = cmducs(0x4E88, 1); + ALLOC_STATE( unk4EA0, always, 3, "unk4EA0 R350 only", 0 ); + r300->hw.unk4EA0.cmd[0] = cmducs(0x4EA0, 2); ALLOC_STATE( zc, always, R300_ZC_CMDSIZE, "zc", 0 ); r300->hw.zc.cmd[R300_ZC_CMD_0] = cmducs(R300_RB3D_ZCNTL_0, 2); ALLOC_STATE( unk4F08, always, 2, "unk4F08", 0 ); @@ -461,6 +463,7 @@ void r300InitCmdBuf(r300ContextPtr r300) insert_at_tail(&r300->hw.atomlist, &r300->hw.cb); insert_at_tail(&r300->hw.atomlist, &r300->hw.unk4E50); insert_at_tail(&r300->hw.atomlist, &r300->hw.unk4E88); + insert_at_tail(&r300->hw.atomlist, &r300->hw.unk4EA0); insert_at_tail(&r300->hw.atomlist, &r300->hw.zc); insert_at_tail(&r300->hw.atomlist, &r300->hw.unk4F08); insert_at_tail(&r300->hw.atomlist, &r300->hw.unk4F10); diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index a548789fb2..6333f31a8c 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -290,6 +290,7 @@ struct r300_hw_state { struct r300_state_atom cb; /* colorbuffer (4E28) */ struct r300_state_atom unk4E50; /* (4E50) */ struct r300_state_atom unk4E88; /* (4E88) */ + struct r300_state_atom unk4EA0; /* (4E88) I saw it only written on RV350 hardware.. */ struct r300_state_atom zc; /* z control (4F00) */ struct r300_state_atom unk4F08; /* (4F08) */ struct r300_state_atom unk4F10; /* (4F10) */ diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index f76056d6cb..8724c9b9bf 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -421,15 +421,20 @@ void r300ResetHwState(r300ContextPtr r300) r300->hw.unk42C0.cmd[1] = 0x4B7FFFFF; r300->hw.unk42C0.cmd[2] = 0x00000000; - r300->hw.rc.cmd[1] = R300_RS_CNTL_0_UNKNOWN_7; + /* The second constant is needed to get glxgears display anything .. */ + r300->hw.rc.cmd[1] = R300_RS_CNTL_0_UNKNOWN_7 | R300_RS_CNTL_0_UNKNOWN_18; r300->hw.rc.cmd[2] = 0; for(i = 1; i <= 8; ++i) - r300->hw.ri.cmd[i] = 0; + r300->hw.ri.cmd[i] = 0x00d10000; + r300->hw.ri.cmd[R300_RI_INTERP_1] |= R300_RS_INTERP_1_UNKNOWN; + r300->hw.ri.cmd[R300_RI_INTERP_2] |= R300_RS_INTERP_2_UNKNOWN; + r300->hw.ri.cmd[R300_RI_INTERP_3] |= R300_RS_INTERP_3_UNKNOWN; ((drm_r300_cmd_header_t*)r300->hw.rr.cmd)->unchecked_state.count = 1; for(i = 1; i <= 8; ++i) - r300->hw.rr.cmd[1] = 0; + r300->hw.rr.cmd[i] = 0; + r300->hw.rr.cmd[R300_RR_ROUTE_0] = 0x4000; r300->hw.unk43A4.cmd[1] = 0x0000001C; r300->hw.unk43A4.cmd[2] = 0x2DA49525; @@ -495,6 +500,9 @@ void r300ResetHwState(r300ContextPtr r300) r300->hw.unk4E88.cmd[1] = 0; + r300->hw.unk4EA0.cmd[1] = 0x00000000; + r300->hw.unk4EA0.cmd[2] = 0xffffffff; + r300->hw.unk4F08.cmd[1] = 0x00FFFF00; r300->hw.unk4F10.cmd[1] = 0x00000002; // depthbuffer format? |