diff options
author | Brian Paul <[email protected]> | 2008-05-30 15:07:58 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-30 15:07:58 -0600 |
commit | 12bb9075221da6bf8121f3d705888f29ca11cc0f (patch) | |
tree | eb8f8be311ae5be7617f71f2bae89ab72b6ac8f7 /src/gallium | |
parent | 3c4162ed2afe4da252d2a32c14e486515935ba39 (diff) |
gallium: fix some PIPE_FORMAT_Z24S8_UNORM bugs in softpipe driver
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_quad_depth_test.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tile_cache.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c index a1859f98832..33888abcc5e 100644 --- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c +++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c @@ -230,7 +230,7 @@ sp_depth_test_quad(struct quad_stage *qs, struct quad_header *quad) int x = quad->x0 % TILE_SIZE + (j & 1); int y = quad->y0 % TILE_SIZE + (j >> 1); uint z24s8 = tile->data.depth32[y][x]; - z24s8 = (z24s8 & 0xff) | (bzzzz[j] << 24); + z24s8 = (z24s8 & 0xff) | (bzzzz[j] << 8); tile->data.depth32[y][x] = z24s8; } break; diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 28c29da87c9..0e4c8c41eea 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -169,6 +169,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc, PIPE_BUFFER_USAGE_CPU_WRITE); tc->depth_stencil = (ps->format == PIPE_FORMAT_S8Z24_UNORM || + ps->format == PIPE_FORMAT_Z24S8_UNORM || ps->format == PIPE_FORMAT_Z16_UNORM || ps->format == PIPE_FORMAT_Z32_UNORM || ps->format == PIPE_FORMAT_S8_UNORM); |