summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-10-10 09:18:14 -0600
committerBrian Paul <brianp@vmware.com>2009-10-10 09:18:14 -0600
commit768481ed40cb7530fdbadbf4d6dc00b74209adf1 (patch)
treef4d4a2f41bc2efc2ad07e266b2e2d090886a2c5f /src/gallium/drivers/softpipe
parent194ede4bf97547ce8a61587ede0b0a5054955783 (diff)
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
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c7
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 5f7864e6714..b2195ec6b59 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