Mesa (master): r300g: fix crash with hyperz

Marek Olšák mareko at kemper.freedesktop.org
Fri Apr 8 04:28:21 PDT 2011


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Apr  8 13:27:14 2011 +0200

r300g: fix crash with hyperz

r300_update_hyperz_state is no longer required to be called here.

---

 src/gallium/drivers/r300/r300_blit.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 37b635f..056b52f 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -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)) {



More information about the mesa-commit mailing list