softpipe: revert 564df9dc5f

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
This commit is contained in:
Brian Paul
2009-10-10 09:18:14 -06:00
parent 194ede4bf9
commit 768481ed40
+6 -1
View File
@@ -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