[r300] Replace more magic number by register definitions from AMD
authorChristoph Brill <egore911@egore911.de>
Mon, 25 Feb 2008 19:11:46 +0000 (20:11 +0100)
committerChristoph Brill <egore911@egore911.de>
Mon, 25 Feb 2008 19:11:46 +0000 (20:11 +0100)
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_reg.h

index 97463a80fbaa0387e1a72b3686631c614c5cccde..ea199115d5110d2c3677a1fa61a3e4f25d3a5dd0 100644 (file)
@@ -419,9 +419,9 @@ void r300InitCmdBuf(r300ContextPtr r300)
        r300->hw.cb.cmd[R300_CB_CMD_0] = cmdpacket0(R300_RB3D_COLOROFFSET0, 1);
        r300->hw.cb.cmd[R300_CB_CMD_1] = cmdpacket0(R300_RB3D_COLORPITCH0, 1);
        ALLOC_STATE(unk4E50, always, 10, 0);
-       r300->hw.unk4E50.cmd[0] = cmdpacket0(0x4E50, 9);
+       r300->hw.unk4E50.cmd[0] = cmdpacket0(R300_RB3D_DITHER_CTL, R300_RB3D_DITHER_CTL_DITHER_MODE_ROUND | R300_RB3D_DITHER_CTL_ALPHA_DITHER_MODE_LUT);
        ALLOC_STATE(unk4E88, always, 2, 0);
-       r300->hw.unk4E88.cmd[0] = cmdpacket0(0x4E88, 1);
+       r300->hw.unk4E88.cmd[0] = cmdpacket0(R300_RB3D_AARESOLVE_CTL, R300_RB3D_AARESOLVE_CTL_AARESOLVE_MODE_RESOLVE);
        ALLOC_STATE(unk4EA0, always, 3, 0);
        r300->hw.unk4EA0.cmd[0] = cmdpacket0(0x4EA0, 2);
        ALLOC_STATE(zs, always, R300_ZS_CMDSIZE, 0);
index fd5304ca4e016e470f044b7961decee1c95348d4..45bd709deb6e0fcb1d7721456ef4c9cde5658d30 100644 (file)
@@ -1611,6 +1611,24 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #       define R300_RB3D_DSTCACHE_UNKNOWN_02             0x00000002
 #       define R300_RB3D_DSTCACHE_UNKNOWN_0A             0x0000000A
 
+#define R300_RB3D_DITHER_CTL 0x4E50
+#      define R300_RB3D_DITHER_CTL_DITHER_MODE_TRUNCATE         (0 << 0)
+#      define R300_RB3D_DITHER_CTL_DITHER_MODE_ROUND            (1 << 0)
+#      define R300_RB3D_DITHER_CTL_DITHER_MODE_LUT              (2 << 0)
+/* reserved */
+#      define R300_RB3D_DITHER_CTL_ALPHA_DITHER_MODE_TRUNCATE   (0 << 2)
+#      define R300_RB3D_DITHER_CTL_ALPHA_DITHER_MODE_ROUND      (1 << 2)
+#      define R300_RB3D_DITHER_CTL_ALPHA_DITHER_MODE_LUT        (2 << 2)
+/* reserved */
+
+#define R300_RB3D_AARESOLVE_CTL           0x4e88
+#      define R300_RB3D_AARESOLVE_CTL_AARESOLVE_MODE_NORMAL   (0 << 0)
+#      define R300_RB3D_AARESOLVE_CTL_AARESOLVE_MODE_RESOLVE  (1 << 0)
+#      define R300_RB3D_AARESOLVE_CTL_AARESOLVE_GAMMA_10      (0 << 1)
+#      define R300_RB3D_AARESOLVE_CTL_AARESOLVE_GAMMA_22      (1 << 1)
+#      define R300_RB3D_AARESOLVE_CTL_AARESOLVE_ALPHA_SAMPLE0 (0 << 2)
+#      define R300_RB3D_AARESOLVE_CTL_AARESOLVE_ALPHA_AVERAGE (1 << 2)
+
 /* gap */
 /* There seems to be no "write only" setting, so use Z-test = ALWAYS
  * for this.