Mesa (master): softpipe: revert 564df9dc5f6335eb8dc68f3c69cf054d2142663c

Brian Paul brianp at kemper.freedesktop.org
Sat Oct 10 15:27:08 UTC 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Sat Oct 10 09:18:14 2009 -0600

softpipe: revert 564df9dc5f6335eb8dc68f3c69cf054d2142663c

This change silenced valgrind warnings but broke progs/tests/drawbuffers.
The problem is we don't know the surface's state when we start caching it
(it may or may not be initialized/cleared/etc).  So "clearing" it here was
presumptuous.  Leaving the code in place (but disabled) for reference and
when using valgrind.

Fixes bug 24401

---

 src/gallium/drivers/softpipe/sp_tile_cache.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 5f7864e..b2195ec 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -131,7 +131,12 @@ sp_create_tile_cache( struct pipe_screen *screen )
          tc->entries[pos].y = -1;
       }
 
-#if TILE_CLEAR_OPTIMIZATION
+      /* XXX this code prevents valgrind warnings about use of uninitialized
+       * memory in programs that don't clear the surface before rendering.
+       * However, it breaks clearing in other situations (such as in
+       * progs/tests/drawbuffers, see bug 24402).
+       */
+#if 0 && TILE_CLEAR_OPTIMIZATION
       /* set flags to indicate all the tiles are cleared */
       memset(tc->clear_flags, 255, sizeof(tc->clear_flags));
 #endif




More information about the mesa-commit mailing list