From: Brian Paul Date: Tue, 29 Sep 2009 14:50:56 +0000 (-0600) Subject: softpipe: initialize the clear_flags bitvector in sp_create_tile_cache() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=564df9dc5f6335eb8dc68f3c69cf054d2142663c;p=mesa.git 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. --- diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 461cbb9f953..5f7864e6714 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; }