summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_tile_cache.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-08-21 08:55:50 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:38 +0100
commite3baeb3f14bd8b393baa142e6cd9cfe0931a2f3d (patch)
tree86dab0e8ea79add252a69062f68e0a6f03b77997 /src/gallium/drivers/llvmpipe/lp_tile_cache.h
parentd94fbb4a488986185836464ea28629f8d519f6f5 (diff)
downloadexternal_mesa3d-e3baeb3f14bd8b393baa142e6cd9cfe0931a2f3d.zip
external_mesa3d-e3baeb3f14bd8b393baa142e6cd9cfe0931a2f3d.tar.gz
external_mesa3d-e3baeb3f14bd8b393baa142e6cd9cfe0931a2f3d.tar.bz2
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.h16
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 f0c3fee..f1869b0 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 );
}