From db9514394996065d44c6b8c870085727849999d2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 3 Nov 2007 19:35:39 +1100 Subject: r300: move more vap registers out of non tcl paths --- src/mesa/drivers/dri/r300/r300_cmdbuf.c | 8 ++++---- src/mesa/drivers/dri/r300/r300_ioctl.c | 8 +++++--- src/mesa/drivers/dri/r300/r300_state.c | 14 +++++++------- 3 files changed, 16 insertions(+), 14 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index 9eca41fa38c..4e6e3e73d84 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -317,12 +317,12 @@ void r300InitCmdBuf(r300ContextPtr r300) r300->hw.vic.cmd[R300_VIC_CMD_0] = cmdpacket0(R300_VAP_INPUT_CNTL_0, 2); ALLOC_STATE(unk21DC, always, 2, 0); r300->hw.unk21DC.cmd[0] = cmdpacket0(0x21DC, 1); - ALLOC_STATE(unk221C, always, 2, 0); - r300->hw.unk221C.cmd[0] = cmdpacket0(R300_VAP_UNKNOWN_221C, 1); - ALLOC_STATE(vap_clip, always, 5, 0); - r300->hw.vap_clip.cmd[0] = cmdpacket0(R300_VAP_CLIP_X_0, 4); if (has_tcl) { + ALLOC_STATE(unk221C, always, 2, 0); + r300->hw.unk221C.cmd[0] = cmdpacket0(R300_VAP_UNKNOWN_221C, 1); + ALLOC_STATE(vap_clip, always, 5, 0); + r300->hw.vap_clip.cmd[0] = cmdpacket0(R300_VAP_CLIP_X_0, 4); ALLOC_STATE(unk2288, always, 2, 0); r300->hw.unk2288.cmd[0] = cmdpacket0(R300_VAP_UNKNOWN_2288, 1); } diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index 90f5027c9ad..ceb2e2d4328 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -260,9 +260,11 @@ static void r300EmitClearState(GLcontext * ctx) e32(0x0); e32(0x0); - R300_STATECHANGE(r300, unk221C); - reg_start(R300_VAP_UNKNOWN_221C, 0); - e32(R300_221C_CLEAR); + if (has_tcl) { + R300_STATECHANGE(r300, unk221C); + reg_start(R300_VAP_UNKNOWN_221C, 0); + e32(R300_221C_CLEAR); + } R300_STATECHANGE(r300, ps); reg_start(R300_RE_POINTSIZE, 0); diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 088216c76ee..8a2ebbf959b 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1816,15 +1816,15 @@ static void r300ResetHwState(r300ContextPtr r300) r300->hw.unk21DC.cmd[1] = 0xAAAAAAAA; - r300->hw.unk221C.cmd[1] = R300_221C_NORMAL; - - r300->hw.vap_clip.cmd[1] = r300PackFloat32(1.0); /* X */ - r300->hw.vap_clip.cmd[2] = r300PackFloat32(1.0); /* X */ - r300->hw.vap_clip.cmd[3] = r300PackFloat32(1.0); /* Y */ - r300->hw.vap_clip.cmd[4] = r300PackFloat32(1.0); /* Y */ - /* XXX: Other families? */ if (has_tcl) { + r300->hw.unk221C.cmd[1] = R300_221C_NORMAL; + + r300->hw.vap_clip.cmd[1] = r300PackFloat32(1.0); /* X */ + r300->hw.vap_clip.cmd[2] = r300PackFloat32(1.0); /* X */ + r300->hw.vap_clip.cmd[3] = r300PackFloat32(1.0); /* Y */ + r300->hw.vap_clip.cmd[4] = r300PackFloat32(1.0); /* Y */ + switch (r300->radeon.radeonScreen->chip_family) { case CHIP_FAMILY_R300: r300->hw.unk2288.cmd[1] = R300_2288_R300; -- cgit v1.2.3