if (tc) {
tc->screen = screen;
for (pos = 0; pos < NUM_ENTRIES; pos++) {
- tc->entries[pos].x =
- tc->entries[pos].y = -1;
+ tc->entries[pos].addr.bits.invalid = 1;
}
+ tc->last_tile = &tc->entries[0]; /* any tile */
- #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