diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-08-18 11:41:01 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-08-29 09:21:34 +0100 |
commit | efab431684bb17459073f6a2e96044cb2ebd2524 (patch) | |
tree | 7800a9ccaefaf6dd1937cfa8ceecf565125c0c1f /src/gallium/drivers/llvmpipe/lp_tile_cache.c | |
parent | ee066eaf6d0dd3c771dc3e37390f3665e747af2a (diff) |
llvmpipe: Tile in SoA format identical to the blender function output.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_tile_cache.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_tile_cache.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_tile_cache.c b/src/gallium/drivers/llvmpipe/lp_tile_cache.c index 213896ec10..94908f601c 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_cache.c +++ b/src/gallium/drivers/llvmpipe/lp_tile_cache.c @@ -218,11 +218,14 @@ clear_tile_rgba(struct llvmpipe_cached_tile *tile, memset(tile->data.color, 0, sizeof(tile->data.color)); } else { - uint i, x, y; + uint8_t c[4]; + uint x, y, i; for (i = 0; i < 4; ++i) - for (y = 0; y < TILE_SIZE; y++) - for (x = 0; x < TILE_SIZE; x++) - tile->data.color[i][y][x] = float_to_ubyte(clear_value[i]); + c[i] = float_to_ubyte(clear_value[i]); + for (y = 0; y < TILE_SIZE; y++) + for (x = 0; x < TILE_SIZE; x++) + for (i = 0; i < 4; ++i) + TILE_PIXEL(tile->data.color, x, y, i) = c[i]; } } |