Mesa (master): r300g: fix fastfill when color and Z clear are invoked separately

Marek Olšák mareko at kemper.freedesktop.org
Fri Aug 13 02:48:44 UTC 2010


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Aug 13 04:34:38 2010 +0200

r300g: fix fastfill when color and Z clear are invoked separately

This always restores the previous depth clear value after CBZB clear.

---

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

diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index ff52286..5fe9b90 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -176,7 +176,7 @@ static void r300_clear(struct pipe_context* pipe,
     uint32_t width = fb->width;
     uint32_t height = fb->height;
     boolean has_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
-    uint32_t hyperz_dcv = 0;
+    uint32_t hyperz_dcv = hyperz->zb_depthclearvalue;
 
     /* Enable fast Z clear.
      * The zbuffer must be in micro-tiled mode, otherwise it locks up. */
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index e62a33d..8abc65a 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -796,7 +796,7 @@ static void
                 r300->z_compression, r300->z_fastfill,
                 tex->zmask_mem[level] ? tex->zmask_mem[level]->ofs : 0xdeadbeef);
         }
-            
+
         /* Polygon offset depends on the zbuffer bit depth. */
         if (r300->zbuffer_bpp != zbuffer_bpp) {
             r300->zbuffer_bpp = zbuffer_bpp;




More information about the mesa-commit mailing list