r300g: initialize US_CODE_BANK on r4xx
authorMarek Olšák <maraeo@gmail.com>
Mon, 14 Jun 2010 21:38:48 +0000 (23:38 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 14 Jun 2010 21:39:56 +0000 (23:39 +0200)
src/gallium/drivers/r300/r300_state_invariant.c

index 34d3a169d574ea3fd150bc79af9c7eff984f4185..b3181a37ea14da1a11d784a3f8752c6a89d827ef 100644 (file)
@@ -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;
 }