From 564df9dc5f6335eb8dc68f3c69cf054d2142663c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Sep 2009 08:50:56 -0600 Subject: softpipe: initialize the clear_flags bitvector in sp_create_tile_cache() This silences tons of valgrind warnings in programs that don't call glClear(), such as progs/demos/gamma. --- src/gallium/drivers/softpipe/sp_tile_cache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 461cbb9f95..5f7864e671 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -130,6 +130,11 @@ sp_create_tile_cache( struct pipe_screen *screen ) tc->entries[pos].x = tc->entries[pos].y = -1; } + +#if TILE_CLEAR_OPTIMIZATION + /* set flags to indicate all the tiles are cleared */ + memset(tc->clear_flags, 255, sizeof(tc->clear_flags)); +#endif } return tc; } -- cgit v1.2.3