summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h11
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 a049e39505..4b7e542d76 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 27c273c6df..85952cb6d0 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 8a07e89a12..443021f13e 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