summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-09-29 08:50:56 -0600
committerBrian Paul <[email protected]>2009-09-29 08:51:00 -0600
commit564df9dc5f6335eb8dc68f3c69cf054d2142663c (patch)
treea9e08b80e2f481e0c41ca0e82d8fd6c137bbf88f
parentfbddc75aa2f6542117783b8024f9ebd2f0309e1f (diff)
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.
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c5
1 files changed, 5 insertions, 0 deletions
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;
}