diff options
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_tile_cache.c')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_tile_cache.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_tile_cache.c b/src/mesa/pipe/softpipe/sp_tile_cache.c index 19c06323e1..ea0c8b8f91 100644 --- a/src/mesa/pipe/softpipe/sp_tile_cache.c +++ b/src/mesa/pipe/softpipe/sp_tile_cache.c @@ -166,6 +166,7 @@ sp_flush_tile_cache(struct softpipe_context *softpipe, return; is_depth_stencil = (ps->format == PIPE_FORMAT_S8_Z24 || + ps->format == PIPE_FORMAT_Z24_S8 || ps->format == PIPE_FORMAT_U_Z16 || ps->format == PIPE_FORMAT_U_Z32 || ps->format == PIPE_FORMAT_U_S8); @@ -203,6 +204,7 @@ sp_get_cached_tile(struct softpipe_context *softpipe, struct pipe_surface *ps = tc->surface; boolean is_depth_stencil = (ps->format == PIPE_FORMAT_S8_Z24 || + ps->format == PIPE_FORMAT_Z24_S8 || ps->format == PIPE_FORMAT_U_Z16 || ps->format == PIPE_FORMAT_U_Z32 || ps->format == PIPE_FORMAT_U_S8); @@ -268,6 +270,17 @@ sp_get_cached_tile(struct softpipe_context *softpipe, } } break; + case PIPE_FORMAT_Z24_S8: + { + uint clear_val = ((uint) (tc->clear_value[0] * 0xffffff)) << 8; + clear_val |= ((uint) tc->clear_value[1]) & 0xff; + for (i = 0; i < TILE_SIZE; i++) { + for (j = 0; j < TILE_SIZE; j++) { + tile->data.depth32[i][j] = clear_val; + } + } + } + break; case PIPE_FORMAT_U_S8: { ubyte clear_val = (uint) tc->clear_value[0]; |