-}
-
-
-/**
- * Actually clear the tiles which were flagged as being in a clear state.
- */
-static void
-lp_tile_cache_flush_clear(struct llvmpipe_tile_cache *tc)
-{
- struct pipe_transfer *pt = tc->transfer;
- const uint w = tc->transfer->width;
- const uint h = tc->transfer->height;
- uint x, y;
- uint numCleared = 0;
-
- /* clear the scratch tile to the clear value */
- clear_tile(&tc->tile, pt->format, tc->clear_val);
-
- /* push the tile to all positions marked as clear */
- for (y = 0; y < h; y += TILE_SIZE) {
- for (x = 0; x < w; x += TILE_SIZE) {
- union tile_address addr = tile_address(x, y, 0, 0, 0);
-
- if (is_clear_flag_set(tc->clear_flags, addr)) {
- pipe_put_tile_raw(pt,
- x, y, TILE_SIZE, TILE_SIZE,
- tc->tile.data.color32, 0/*STRIDE*/);
-
- /* do this? */
- clear_clear_flag(tc->clear_flags, addr);
-
- numCleared++;
- }
- }
+ else {
+ uint x, y, chan;
+ for (y = 0; y < TILE_SIZE; y++)
+ for (x = 0; x < TILE_SIZE; x++)
+ for (chan = 0; chan < 4; ++chan)
+ TILE_PIXEL(tile->color, x, y, chan) = clear_color[chan];