r300g: fix crash with hyperz
authorMarek Olšák <maraeo@gmail.com>
Fri, 8 Apr 2011 11:27:14 +0000 (13:27 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 8 Apr 2011 11:27:14 +0000 (13:27 +0200)
r300_update_hyperz_state is no longer required to be called here.

src/gallium/drivers/r300/r300_blit.c

index 37b635fd120bcd6dd44237a119345dc7ff03460a..056b52f25dd502f726b7ef47712b7a4c94b6ce2f 100644 (file)
@@ -253,13 +253,11 @@ static void r300_clear(struct pipe_context* pipe,
     } else if (r300->zmask_clear.dirty || r300->hiz_clear.dirty) {
         /* Just clear zmask and hiz now, this does not use the standard draw
          * procedure. */
-        unsigned dwords;
-
         /* Calculate zmask_clear and hiz_clear atom sizes. */
-        r300_update_hyperz_state(r300);
-        dwords = (r300->zmask_clear.dirty ? r300->zmask_clear.size : 0) +
-                 (r300->hiz_clear.dirty ? r300->hiz_clear.size : 0) +
-                 r300_get_num_cs_end_dwords(r300);
+        unsigned dwords =
+            (r300->zmask_clear.dirty ? r300->zmask_clear.size : 0) +
+            (r300->hiz_clear.dirty ? r300->hiz_clear.size : 0) +
+            r300_get_num_cs_end_dwords(r300);
 
         /* Reserve CS space. */
         if (dwords > (R300_MAX_CMDBUF_DWORDS - r300->cs->cdw)) {