summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c8
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h21
2 files changed, 25 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index ea199115d51..657a00b0640 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -423,7 +423,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
ALLOC_STATE(unk4E88, always, 2, 0);
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);
+ r300->hw.unk4EA0.cmd[0] = cmdpacket0(RB3D_DISCARD_SRC_PIXEL_LTE_THRESHOLD, 2);
ALLOC_STATE(zs, always, R300_ZS_CMDSIZE, 0);
r300->hw.zs.cmd[R300_ZS_CMD_0] =
cmdpacket0(R300_RB3D_ZSTENCIL_CNTL_0, 3);
@@ -433,13 +433,13 @@ void r300InitCmdBuf(r300ContextPtr r300)
ALLOC_STATE(zb, always, R300_ZB_CMDSIZE, 0);
r300->hw.zb.cmd[R300_ZB_CMD_0] = cmdpacket0(R300_RB3D_DEPTHOFFSET, 2);
ALLOC_STATE(unk4F28, always, 2, 0);
- r300->hw.unk4F28.cmd[0] = cmdpacket0(0x4F28, 1);
+ r300->hw.unk4F28.cmd[0] = cmdpacket0(ZB_DEPTHCLEARVALUE, 1);
ALLOC_STATE(unk4F30, always, 3, 0);
r300->hw.unk4F30.cmd[0] = cmdpacket0(0x4F30, 2);
ALLOC_STATE(unk4F44, always, 2, 0);
- r300->hw.unk4F44.cmd[0] = cmdpacket0(0x4F44, 1);
+ r300->hw.unk4F44.cmd[0] = cmdpacket0(ZB_HIZ_OFFSET, 1);
ALLOC_STATE(unk4F54, always, 2, 0);
- r300->hw.unk4F54.cmd[0] = cmdpacket0(0x4F54, 1);
+ r300->hw.unk4F54.cmd[0] = cmdpacket0(ZB_HIZ_PITCH, 1);
/* VPU only on TCL */
if (has_tcl) {
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 45bd709deb6..80c2816d83d 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -1621,6 +1621,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_RB3D_DITHER_CTL_ALPHA_DITHER_MODE_LUT (2 << 2)
/* reserved */
+/* Resolve Buffer Control. Unpipelined */
#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)
@@ -1629,6 +1630,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_RB3D_AARESOLVE_CTL_AARESOLVE_ALPHA_SAMPLE0 (0 << 2)
# define R300_RB3D_AARESOLVE_CTL_AARESOLVE_ALPHA_AVERAGE (1 << 2)
+/* Discard src pixels less than or equal to threshold. */
+#define RB3D_DISCARD_SRC_PIXEL_LTE_THRESHOLD 0x4ea0
+/* TODO: add shift and mask for this one */
+
+
/* gap */
/* There seems to be no "write only" setting, so use Z-test = ALWAYS
* for this.
@@ -1755,6 +1761,21 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_DEPTH_ENDIAN_WORD_SWAP (1 << 18) /* GUESS */
# define R300_DEPTH_ENDIAN_DWORD_SWAP (2 << 18) /* GUESS */
+/* Z Buffer Clear Value */
+#define ZB_DEPTHCLEARVALUE 0x4f28
+
+/* Hierarchical Z Memory Offset */
+#define ZB_HIZ_OFFSET 0x4f44
+
+/* Hierarchical Z Read Index */
+#define ZB_HIZ_RDINDEX 0x4f48
+
+/* Hierarchical Z Write Index */
+#define ZB_HIZ_WRINDEX 0x4f50
+
+/* Hierarchical Z Pitch */
+#define ZB_HIZ_PITCH 0x4f54
+
/* BEGIN: Vertex program instruction set */
/* Every instruction is four dwords long: