r300: send only RS_IP_* regs that we are going to use
authorMaciej Cencora <m.cencora@gmail.com>
Wed, 10 Jun 2009 14:04:35 +0000 (16:04 +0200)
committerMaciej Cencora <m.cencora@gmail.com>
Thu, 11 Jun 2009 21:25:53 +0000 (23:25 +0200)
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_state.c

index b949c3b5b217e1764ecf088961580af78b50b2ee..0261a5b1d8ace091057e26854649de7de488a37c 100644 (file)
@@ -479,7 +479,6 @@ void r300InitCmdBuf(r300ContextPtr r300)
        int mtu;
        int has_tcl;
        int is_r500 = 0;
-       int i;
 
        has_tcl = r300->options.hw_tcl_enabled;
 
@@ -589,19 +588,12 @@ void r300InitCmdBuf(r300ContextPtr r300)
        ALLOC_STATE(rc, always, R300_RC_CMDSIZE, 0);
        r300->hw.rc.cmd[R300_RC_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R300_RS_COUNT, 2);
        if (is_r500) {
-               ALLOC_STATE(ri, always, R500_RI_CMDSIZE, 0);
+               ALLOC_STATE(ri, variable, R500_RI_CMDSIZE, 0);
                r300->hw.ri.cmd[R300_RI_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R500_RS_IP_0, 16);
-               for (i = 0; i < 8; i++) {
-                       r300->hw.ri.cmd[R300_RI_CMD_0 + i +1] =
-                         (R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_S_SHIFT) |
-                          (R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_T_SHIFT) |
-                          (R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_R_SHIFT) |
-                          (R500_RS_IP_PTR_K1 << R500_RS_IP_TEX_PTR_Q_SHIFT);
-               }
                ALLOC_STATE(rr, variable, R300_RR_CMDSIZE, 0);
                r300->hw.rr.cmd[R300_RR_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R500_RS_INST_0, 1);
        } else {
-               ALLOC_STATE(ri, always, R300_RI_CMDSIZE, 0);
+               ALLOC_STATE(ri, variable, R300_RI_CMDSIZE, 0);
                r300->hw.ri.cmd[R300_RI_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R300_RS_IP_0, 8);
                ALLOC_STATE(rr, variable, R300_RR_CMDSIZE, 0);
                r300->hw.rr.cmd[R300_RR_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R300_RS_INST_0, 1);
index 06dba2a65087211144fbadb4400c19442990d135..c0eda977db83d4848d21017a7bba23c776e1489c 100644 (file)
@@ -1556,6 +1556,7 @@ static void r300SetupRSUnit(GLcontext * ctx)
        r300->hw.rc.cmd[2] |= high_rr - 1;
 
        r300->hw.rr.cmd[R300_RR_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R300_RS_INST_0, high_rr);
+       r300->hw.ri.cmd[R300_RI_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R300_RS_IP_0, high_rr);
 
        if (InputsRead)
                WARN_ONCE("Don't know how to satisfy InputsRead=0x%08x\n", InputsRead);
@@ -1683,6 +1684,7 @@ static void r500SetupRSUnit(GLcontext * ctx)
        r300->hw.rc.cmd[2] = 0xC0 | (high_rr - 1);
 
        r300->hw.rr.cmd[R300_RR_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R500_RS_INST_0, high_rr);
+       r300->hw.ri.cmd[R300_RI_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R500_RS_IP_0, high_rr);
 
        if (InputsRead)
                WARN_ONCE("Don't know how to satisfy InputsRead=0x%08x\n", InputsRead);