r300g: fix fastfill when color and Z clear are invoked separately
authorMarek Olšák <maraeo@gmail.com>
Fri, 13 Aug 2010 02:34:38 +0000 (04:34 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 13 Aug 2010 02:41:38 +0000 (04:41 +0200)
This always restores the previous depth clear value after CBZB clear.

src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r300/r300_state.c

index ff52286b5cd0d8fef043ca063acf2dbc8e013ef6..5fe9b9017d1f05701d4338fbe53c9e2bb7e57748 100644 (file)
@@ -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. */
index e62a33daebd47a3188713928e952924837854c0b..8abc65a2b8e3460ee88d7235f26c1f5f080a4805 100644 (file)
@@ -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;