Mesa (i965g-restart): i965g: nasty hack for clearing y-tiled surfaces

Keith Whitwell keithw at kemper.freedesktop.org
Mon Dec 21 08:59:45 PST 2009


Module: Mesa
Branch: i965g-restart
Commit: ba4cb8b2caac69c6d2b210a5c3c634d8c1c20940
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba4cb8b2caac69c6d2b210a5c3c634d8c1c20940

Author: Keith Whitwell <keithw at vmware.com>
Date:   Tue Dec  1 17:04:46 2009 +0000

i965g: nasty hack for clearing y-tiled surfaces

---

 src/gallium/drivers/i965/brw_pipe_clear.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/i965/brw_pipe_clear.c b/src/gallium/drivers/i965/brw_pipe_clear.c
index f846b43..211be88 100644
--- a/src/gallium/drivers/i965/brw_pipe_clear.c
+++ b/src/gallium/drivers/i965/brw_pipe_clear.c
@@ -79,7 +79,11 @@ try_clear( struct brw_context *brw,
       BR13 |= BR13_565;
    }
 
-   assert(surface->tiling != BRW_TILING_Y);
+   /* XXX: nasty hack for clearing depth buffers
+    */
+   if (surface->tiling == BRW_TILING_Y) {
+      x2 = pitch;
+   }
 
    if (surface->tiling == BRW_TILING_X) {
       CMD |= XY_DST_TILED;



More information about the mesa-commit mailing list