summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_blit.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-06-14 13:55:11 +0200
committerSamuel Pitoiset <[email protected]>2017-06-18 14:10:36 +0200
commit06ed251c328ebf5c635b972b14039165077d05df (patch)
tree85bac01068de35ada2d87d486a0d40936a3615cf /src/gallium/drivers/radeonsi/si_blit.c
parent705a6a560ee1d2433fa65078b2ae6616dee0c052 (diff)
radeonsi: reduce overhead for resident textures which need depth decompression
This is done by introducing a separate list. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_blit.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index bfce5a411f1..06a99fbc8a2 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -705,12 +705,18 @@ static void si_decompress_resident_textures(struct si_context *sctx)
if ((*tex_handle)->needs_color_decompress)
si_decompress_color_texture(sctx, tex, view->u.tex.first_level,
view->u.tex.last_level);
+ }
- if ((*tex_handle)->needs_depth_decompress)
- si_decompress_depth(sctx, tex,
- sview->is_stencil_sampler ? PIPE_MASK_S : PIPE_MASK_Z,
- view->u.tex.first_level, view->u.tex.last_level,
- 0, util_max_layer(&tex->resource.b.b, view->u.tex.first_level));
+ util_dynarray_foreach(&sctx->resident_tex_needs_depth_decompress,
+ struct si_texture_handle *, tex_handle) {
+ struct pipe_sampler_view *view = (*tex_handle)->view;
+ struct si_sampler_view *sview = (struct si_sampler_view *)view;
+ struct r600_texture *tex = (struct r600_texture *)view->texture;
+
+ si_decompress_depth(sctx, tex,
+ sview->is_stencil_sampler ? PIPE_MASK_S : PIPE_MASK_Z,
+ view->u.tex.first_level, view->u.tex.last_level,
+ 0, util_max_layer(&tex->resource.b.b, view->u.tex.first_level));
}
}