r300g: fix the CS size when emitting invariant state
authorMarek Olšák <maraeo@gmail.com>
Fri, 15 Jan 2010 23:56:33 +0000 (00:56 +0100)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sun, 17 Jan 2010 09:00:35 +0000 (01:00 -0800)
src/gallium/drivers/r300/r300_state_invariant.c

index b0f309695c9aa0723e8dc2182292830528457cdb..47d7e60a40d98c310be3465174d68c01b4f80836 100644 (file)
@@ -79,7 +79,8 @@ void r300_emit_invariant_state(struct r300_context* r300)
     END_CS;
 
     /* XXX unsorted stuff from surface_fill */
-    BEGIN_CS(44 + (caps->has_tcl ? 7 : 0) + (caps->is_r500 ? 4 : 0));
+    BEGIN_CS(44 + (caps->has_tcl ? 7 : 0) +
+             (caps->family >= CHIP_FAMILY_RV350 ? 4 : 0));
 
     if (caps->has_tcl) {
         /*Flushing PVS is required before the VAP_GB registers can be changed*/