Mesa (master): softpipe: fix sp_tile_cache_flush_clear() regression

Brian Paul brianp at kemper.freedesktop.org
Wed Jul 21 22:01:10 UTC 2010


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

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jul 21 16:00:42 2010 -0600

softpipe: fix sp_tile_cache_flush_clear() regression

---

 src/gallium/drivers/softpipe/sp_tile_cache.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 05a3294..d7bc356 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -297,11 +297,17 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc)
 
          if (is_clear_flag_set(tc->clear_flags, addr)) {
             /* write the scratch tile to the surface */
-            pipe_put_tile_raw(tc->pipe,
-                              pt,
-                              x, y, TILE_SIZE, TILE_SIZE,
-                              tc->tile.data.any, 0/*STRIDE*/);
-
+            if (tc->depth_stencil) {
+               pipe_put_tile_raw(tc->pipe,
+                                 pt,
+                                 x, y, TILE_SIZE, TILE_SIZE,
+                                 tc->tile.data.any, 0/*STRIDE*/);
+            }
+            else {
+               pipe_put_tile_rgba(tc->pipe, pt,
+                                  x, y, TILE_SIZE, TILE_SIZE,
+                                  (float *) tc->tile.data.color);
+            }
             numCleared++;
          }
       }




More information about the mesa-commit mailing list