summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_tile_cache.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-12-16 10:00:51 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-12-16 10:00:51 -0700
commit41b1aa51096e844c0b06f950b1891dc7e5256db7 (patch)
tree283e5e576cc0e75b9c0f8192f53152617c8ca2fd /src/mesa/pipe/softpipe/sp_tile_cache.c
parent47b5138d2d6533ac1cd818713fd0678ec3c7aa1b (diff)
switch on cpp instead of format
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_tile_cache.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_tile_cache.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/pipe/softpipe/sp_tile_cache.c b/src/mesa/pipe/softpipe/sp_tile_cache.c
index a7be3812fe..ba1f71b01e 100644
--- a/src/mesa/pipe/softpipe/sp_tile_cache.c
+++ b/src/mesa/pipe/softpipe/sp_tile_cache.c
@@ -236,13 +236,11 @@ clear_tile(struct softpipe_cached_tile *tile,
{
uint i, j;
- switch (format) {
- case PIPE_FORMAT_U_S8:
- /* 8 bpp */
+ switch (pf_get_size(format)) {
+ case 1:
memset(tile->data.any, 0, TILE_SIZE * TILE_SIZE);
break;
- case PIPE_FORMAT_Z16_UNORM:
- /* 16 bpp */
+ case 2:
if (clear_value == 0) {
memset(tile->data.any, 0, 2 * TILE_SIZE * TILE_SIZE);
}
@@ -254,8 +252,7 @@ clear_tile(struct softpipe_cached_tile *tile,
}
}
break;
- default:
- /* 32 bpp */
+ case 4:
if (clear_value == 0) {
memset(tile->data.any, 0, 4 * TILE_SIZE * TILE_SIZE);
}
@@ -266,6 +263,9 @@ clear_tile(struct softpipe_cached_tile *tile,
}
}
}
+ break;
+ default:
+ assert(0);
}
}