diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-08-21 08:55:50 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-08-29 09:21:38 +0100 |
commit | e3baeb3f14bd8b393baa142e6cd9cfe0931a2f3d (patch) | |
tree | 86dab0e8ea79add252a69062f68e0a6f03b77997 /src/gallium/drivers/llvmpipe/lp_tile_cache.h | |
parent | d94fbb4a488986185836464ea28629f8d519f6f5 (diff) |
llvmpipe: Simplify tile clears. Use pipe_fill_rect instead of scratch tile.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_tile_cache.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_tile_cache.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_tile_cache.h b/src/gallium/drivers/llvmpipe/lp_tile_cache.h index f0c3feef9c..f1869b0d2b 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_cache.h +++ b/src/gallium/drivers/llvmpipe/lp_tile_cache.h @@ -58,14 +58,8 @@ union tile_address { struct llvmpipe_cached_tile { union tile_address addr; - union { - - /** color in SOA format */ - uint8_t ALIGN16_ATTRIB color[TILE_SIZE*TILE_SIZE*NUM_CHANNELS]; - - uint color32[TILE_SIZE][TILE_SIZE]; - ubyte any[1]; - } data; + /** color in SOA format */ + uint8_t ALIGN16_ATTRIB color[TILE_SIZE*TILE_SIZE*NUM_CHANNELS]; }; #define NUM_ENTRIES 50 @@ -88,15 +82,13 @@ struct llvmpipe_tile_cache struct llvmpipe_cached_tile entries[NUM_ENTRIES]; uint clear_flags[(MAX_WIDTH / TILE_SIZE) * (MAX_HEIGHT / TILE_SIZE) / 32]; - float clear_color[4]; /**< for color bufs */ + uint8_t clear_color[4]; /**< for color bufs */ uint clear_val; /**< for z+stencil, or packed color clear value */ struct pipe_transfer *tex_trans; void *tex_trans_map; int tex_face, tex_level, tex_z; - struct llvmpipe_cached_tile tile; /**< scratch tile for clears */ - struct llvmpipe_cached_tile *last_tile; /**< most recently retrieved tile */ }; @@ -159,7 +151,7 @@ lp_get_cached_tile(struct llvmpipe_tile_cache *tc, union tile_address addr = tile_address( x, y, 0, 0, 0 ); if (tc->last_tile->addr.value == addr.value) - return &tc->last_tile->data.color; + return &tc->last_tile->color; return lp_find_cached_tile( tc, addr ); } |