Mesa (master): r300g: increment num_z_clears only if we have Hyper-Z

Marek Olšák mareko at kemper.freedesktop.org
Sun Dec 2 21:24:18 UTC 2012


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Dec  2 22:22:39 2012 +0100

r300g: increment num_z_clears only if we have Hyper-Z

---

 src/gallium/drivers/r300/r300_blit.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 4f9d7c9..b4df3f2 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -245,8 +245,6 @@ static void r300_clear(struct pipe_context* pipe,
 
         /* If we need Hyper-Z. */
         if (zmask_clear || hiz_clear) {
-            r300->num_z_clears++;
-
             /* Try to obtain the access to Hyper-Z buffers if we don't have one. */
             if (!r300->hyperz_enabled &&
                 (r300->screen->caps.is_r500 || debug_get_option_hyperz())) {
@@ -277,6 +275,7 @@ static void r300_clear(struct pipe_context* pipe,
                     r300->hiz_clear_value = r300_hiz_clear_value(depth);
                     r300_mark_atom_dirty(r300, &r300->hiz_clear);
                 }
+                r300->num_z_clears++;
             }
         }
     }




More information about the mesa-commit mailing list