[r300] Update some magic registers to real names
authorChristoph Brill <egore911@egore911.de>
Mon, 25 Feb 2008 19:03:35 +0000 (20:03 +0100)
committerChristoph Brill <egore911@egore911.de>
Mon, 25 Feb 2008 19:03:35 +0000 (20:03 +0100)
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_ioctl.c
src/mesa/drivers/dri/r300/r300_reg.h

index a049e39505b719d9719a3b368b4aea140125f1e6..4b7e542d76ad0b082a3735a5daaab237a53585f6 100644 (file)
@@ -304,7 +304,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
        ALLOC_STATE(vte, always, 3, 0);
        r300->hw.vte.cmd[0] = cmdpacket0(R300_SE_VTE_CNTL, 2);
        ALLOC_STATE(unk2134, always, 3, 0);
-       r300->hw.unk2134.cmd[0] = cmdpacket0(0x2134, 2);
+       r300->hw.unk2134.cmd[0] = cmdpacket0(R300_VAP_VF_MAX_VTX_INDX, 2);
        ALLOC_STATE(vap_cntl_status, always, 2, 0);
        r300->hw.vap_cntl_status.cmd[0] = cmdpacket0(R300_VAP_CNTL_STATUS, 1);
        ALLOC_STATE(vir[0], variable, R300_VIR_CMDSIZE, 0);
@@ -316,7 +316,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
        ALLOC_STATE(vic, always, R300_VIC_CMDSIZE, 0);
        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);
+       r300->hw.unk21DC.cmd[0] = cmdpacket0(R300_VAP_PSC_SGN_NORM_CNTL, SGN_NORM_ZERO_CLAMP_MINUS_ONE);
 
        if (has_tcl) {
                ALLOC_STATE(vap_clip_cntl, always, 2, 0);
index 27c273c6df718450deab4c10cb8e19e20083e668..85952cb6d01b1a6fade9851c8889320861fc4a16 100644 (file)
@@ -229,7 +229,7 @@ static void r300EmitClearState(GLcontext * ctx)
            R300_VPORT_Z_OFFSET_ENA);
        e32(0x8);
 
-       reg_start(0x21dc, 0);
+       reg_start(R300_VAP_PSC_SGN_NORM_CNTL, SGN_NORM_ZERO);
        e32(0xaaaaaaaa);
 
        R300_STATECHANGE(r300, vof);
index 8a07e89a123ff2e19704898dae83169572f7ec9b..443021f13ecc7da94d48115a14f27a66289fb7bf 100644 (file)
@@ -148,6 +148,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 /* gap */
 
+/* Maximum Vertex Indx Clamp */
+#define R300_VAP_VF_MAX_VTX_INDX         0x2134
+/* Minimum Vertex Indx Clamp */
+#define R300_VAP_VF_MIN_VTX_INDX         0x2138
+
 /** Vertex assembler/processor control status */
 #define R300_VAP_CNTL_STATUS              0x2140
 /* No swap at all (default) */
@@ -249,6 +254,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #       define R300_INPUT_CNTL_TC6               0x00010000 /* GUESS */
 #       define R300_INPUT_CNTL_TC7               0x00020000 /* GUESS */
 
+
+#define R300_VAP_PSC_SGN_NORM_CNTL         0x21dc
+#      define SGN_NORM_ZERO                 0
+#      define SGN_NORM_ZERO_CLAMP_MINUS_ONE 1
+#      define SGN_NORM_NO_ZERO              2
+
 /* gap */
 
 /* Words parallel to INPUT_ROUTE_0; All words that are active in INPUT_ROUTE_0