From 127a493fe2a2f7fd8515b278185322dfacdad357 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 7 Dec 2007 20:13:10 -0700 Subject: Tile clearing optimizations. Clear using int values rather than floats when possible. Better performance now. --- src/mesa/pipe/softpipe/sp_tile_cache.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/pipe/softpipe/sp_tile_cache.h') diff --git a/src/mesa/pipe/softpipe/sp_tile_cache.h b/src/mesa/pipe/softpipe/sp_tile_cache.h index c4f2e0f184..91fb2795a2 100644 --- a/src/mesa/pipe/softpipe/sp_tile_cache.h +++ b/src/mesa/pipe/softpipe/sp_tile_cache.h @@ -51,9 +51,11 @@ struct softpipe_cached_tile int z, face, level; /**< Extra texture indexes */ union { float color[TILE_SIZE][TILE_SIZE][4]; + uint color32[TILE_SIZE][TILE_SIZE]; uint depth32[TILE_SIZE][TILE_SIZE]; ushort depth16[TILE_SIZE][TILE_SIZE]; ubyte stencil8[TILE_SIZE][TILE_SIZE]; + ubyte any[1]; } data; }; @@ -80,7 +82,7 @@ sp_flush_tile_cache(struct softpipe_context *softpipe, struct softpipe_tile_cache *tc); extern void -sp_tile_cache_clear(struct softpipe_tile_cache *tc, const float value[4]); +sp_tile_cache_clear(struct softpipe_tile_cache *tc, uint clearValue); extern struct softpipe_cached_tile * sp_get_cached_tile(struct softpipe_context *softpipe, -- cgit v1.2.3