diff options
author | Corbin Simpson <[email protected]> | 2009-06-05 13:46:59 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-06-05 13:46:59 -0700 |
commit | b7aa5b1d10cbe2fd0b796538426f1f2910a4832c (patch) | |
tree | 40d99b26a9dadb74416246458b439db14b05f577 /src/gallium | |
parent | 1a359d983512b39783ce9f4eb842d3ea4ec012a6 (diff) |
r300-gallium: Use VAP_CLIP_CNTL.
Makes tri-userclip work with HW TCL.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state_invariant.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 4c7370eee71..d81abe4d0b2 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -63,7 +63,7 @@ void r300_emit_clip_state(struct r300_context* r300, struct r300_screen* r300screen = r300_screen(r300->context.screen); CS_LOCALS(r300); - BEGIN_CS(3 + (6 * 4)); + BEGIN_CS(5 + (6 * 4)); OUT_CS_REG(R300_VAP_PVS_VECTOR_INDX_REG, (r300screen->caps->is_r500 ? R500_PVS_UCP_START : R300_PVS_UCP_START)); @@ -74,6 +74,9 @@ void r300_emit_clip_state(struct r300_context* r300, OUT_CS_32F(clip->ucp[i][2]); OUT_CS_32F(clip->ucp[i][3]); } + + OUT_CS_REG(R300_VAP_CLIP_CNTL, ((1 << clip->nr) - 1) | + R300_PS_UCP_MODE_CLIP_AS_TRIFAN); END_CS; } diff --git a/src/gallium/drivers/r300/r300_state_invariant.c b/src/gallium/drivers/r300/r300_state_invariant.c index 9dde662802b..60eff08f2e9 100644 --- a/src/gallium/drivers/r300/r300_state_invariant.c +++ b/src/gallium/drivers/r300/r300_state_invariant.c @@ -69,7 +69,7 @@ void r300_emit_invariant_state(struct r300_context* r300) END_CS; /* XXX unsorted stuff from surface_fill */ - BEGIN_CS(77 + (caps->has_tcl ? 7 : 0)); + BEGIN_CS(75 + (caps->has_tcl ? 7 : 0)); /* Flush PVS. */ OUT_CS_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0x0); @@ -80,8 +80,6 @@ void r300_emit_invariant_state(struct r300_context* r300) /* XXX endian */ if (caps->has_tcl) { OUT_CS_REG(R300_VAP_CNTL_STATUS, R300_VC_NO_SWAP); - OUT_CS_REG(R300_VAP_CLIP_CNTL, R300_CLIP_DISABLE | - R300_PS_UCP_MODE_CLIP_AS_TRIFAN); OUT_CS_REG_SEQ(R300_VAP_GB_VERT_CLIP_ADJ, 4); OUT_CS_32F(1.0); OUT_CS_32F(1.0); |