Mesa (master): r300g: initialize US_CODE_BANK on r4xx

Marek Olšák mareko at kemper.freedesktop.org
Mon Jun 14 14:42:27 PDT 2010


Module: Mesa
Branch: master
Commit: 0452d52ae353f3c6d6e216c7af00a0c369c05622
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0452d52ae353f3c6d6e216c7af00a0c369c05622

Author: Marek Olšák <maraeo at gmail.com>
Date:   Mon Jun 14 23:38:48 2010 +0200

r300g: initialize US_CODE_BANK on r4xx

---

 src/gallium/drivers/r300/r300_state_invariant.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_state_invariant.c b/src/gallium/drivers/r300/r300_state_invariant.c
index 34d3a16..b3181a3 100644
--- a/src/gallium/drivers/r300/r300_state_invariant.c
+++ b/src/gallium/drivers/r300/r300_state_invariant.c
@@ -71,7 +71,8 @@ void r300_emit_invariant_state(struct r300_context* r300,
 
     /* XXX unsorted stuff from surface_fill */
     BEGIN_CS(38 + (r300->screen->caps.has_tcl ? 7 : 0) +
-             (r300->screen->caps.is_rv350 ? 4 : 0));
+             (r300->screen->caps.is_rv350 ? 4 : 0) +
+             (r300->screen->caps.is_r400 ? 2 : 0));
 
     if (r300->screen->caps.has_tcl) {
         /*Flushing PVS is required before the VAP_GB registers can be changed*/
@@ -112,5 +113,7 @@ void r300_emit_invariant_state(struct r300_context* r300,
     OUT_CS_REG(R300_ZB_DEPTHCLEARVALUE, 0x00000000);
     OUT_CS_REG(R300_ZB_HIZ_OFFSET, 0x00000000);
     OUT_CS_REG(R300_ZB_HIZ_PITCH, 0x00000000);
+    if (r300->screen->caps.is_r400)
+        OUT_CS_REG(R400_US_CODE_BANK, 0);
     END_CS;
 }



More information about the mesa-commit mailing list