From 6051e68a64729208092ca233d5eaf709e494d3d1 Mon Sep 17 00:00:00 2001 From: Christoph Brill Date: Mon, 25 Feb 2008 20:03:35 +0100 Subject: [PATCH] [r300] Update some magic registers to real names --- src/mesa/drivers/dri/r300/r300_cmdbuf.c | 4 ++-- src/mesa/drivers/dri/r300/r300_ioctl.c | 2 +- src/mesa/drivers/dri/r300/r300_reg.h | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index a049e39505b..4b7e542d76a 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -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); diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index 27c273c6df7..85952cb6d01 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -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); diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h index 8a07e89a123..443021f13ec 100644 --- a/src/mesa/drivers/dri/r300/r300_reg.h +++ b/src/mesa/drivers/dri/r300/r300_reg.h @@ -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 -- 2.30.2