diff options
author | Nicolai Hähnle <[email protected]> | 2016-04-22 12:59:47 -0500 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-04-27 11:16:40 -0500 |
commit | 0ff05b55c62d0a809f3beb46ac587d4952ded59a (patch) | |
tree | 1e2cc162adacf5b72730e068b4b55f2e46ff6d8b /src/gallium/drivers | |
parent | 0b70fc2db4555fb572fcb3695bf570f4720dbb81 (diff) |
radeonsi: si_blit_decompress_depth is only used for staging
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 39ef98e8aea..09f32071365 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -108,18 +108,13 @@ static void si_blit_decompress_depth(struct pipe_context *ctx, unsigned first_sample, unsigned last_sample) { struct si_context *sctx = (struct si_context *)ctx; - unsigned layer, level, sample, checked_last_layer, max_layer, max_sample; + unsigned layer, level, sample, checked_last_layer, max_layer; float depth = 1.0f; const struct util_format_description *desc; - struct r600_texture *flushed_depth_texture = staging ? - staging : texture->flushed_depth_texture; - if (!staging && !texture->dirty_level_mask) - return; - - max_sample = u_max_sample(&texture->resource.b.b); + assert(staging != NULL && "use si_blit_decompress_zs_in_place instead"); - desc = util_format_description(flushed_depth_texture->resource.b.b.format); + desc = util_format_description(staging->resource.b.b.format); if (util_format_has_depth(desc)) sctx->dbcb_depth_copy_enabled = true; @@ -129,9 +124,6 @@ static void si_blit_decompress_depth(struct pipe_context *ctx, assert(sctx->dbcb_depth_copy_enabled || sctx->dbcb_stencil_copy_enabled); for (level = first_level; level <= last_level; level++) { - if (!staging && !(texture->dirty_level_mask & (1 << level))) - continue; - /* The smaller the mipmap level, the less layers there are * as far as 3D textures are concerned. */ max_layer = util_max_layer(&texture->resource.b.b, level); @@ -151,9 +143,9 @@ static void si_blit_decompress_depth(struct pipe_context *ctx, zsurf = ctx->create_surface(ctx, &texture->resource.b.b, &surf_tmpl); - surf_tmpl.format = flushed_depth_texture->resource.b.b.format; + surf_tmpl.format = staging->resource.b.b.format; cbsurf = ctx->create_surface(ctx, - (struct pipe_resource*)flushed_depth_texture, &surf_tmpl); + (struct pipe_resource*)staging, &surf_tmpl); si_blitter_begin(ctx, SI_DECOMPRESS); util_blitter_custom_depth_stencil(sctx->blitter, zsurf, cbsurf, 1 << sample, @@ -164,14 +156,6 @@ static void si_blit_decompress_depth(struct pipe_context *ctx, pipe_surface_reference(&cbsurf, NULL); } } - - /* The texture will always be dirty if some layers aren't flushed. - * I don't think this case can occur though. */ - if (!staging && - first_layer == 0 && last_layer == max_layer && - first_sample == 0 && last_sample == max_sample) { - texture->dirty_level_mask &= ~(1 << level); - } } sctx->dbcb_depth_copy_enabled = false; |