[Mesa-dev] [PATCH 4/4] radeonsi: reduce overhead for resident textures which need color decompression
Marek Olšák
maraeo at gmail.com
Wed Jun 14 19:55:23 UTC 2017
On Wed, Jun 14, 2017 at 1:55 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> This is done by introducing a separate list.
>
> si_decompress_textures() is now 5x faster.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/gallium/drivers/radeonsi/si_blit.c | 21 +++------
> src/gallium/drivers/radeonsi/si_descriptors.c | 64 ++++++++++++++++++++-------
> src/gallium/drivers/radeonsi/si_pipe.c | 4 ++
> src/gallium/drivers/radeonsi/si_pipe.h | 4 +-
> 4 files changed, 59 insertions(+), 34 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
> index 06a99fbc8a2..b240c4d355e 100644
> --- a/src/gallium/drivers/radeonsi/si_blit.c
> +++ b/src/gallium/drivers/radeonsi/si_blit.c
> @@ -693,18 +693,13 @@ static void si_check_render_feedback(struct si_context *sctx)
>
> static void si_decompress_resident_textures(struct si_context *sctx)
> {
> - util_dynarray_foreach(&sctx->resident_tex_handles,
> + util_dynarray_foreach(&sctx->resident_tex_needs_color_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;
>
> - if (view->texture->target == PIPE_BUFFER)
> - continue;
> -
> - if ((*tex_handle)->needs_color_decompress)
> - si_decompress_color_texture(sctx, tex, view->u.tex.first_level,
> - view->u.tex.last_level);
> + si_decompress_color_texture(sctx, tex, view->u.tex.first_level,
> + view->u.tex.last_level);
> }
>
> util_dynarray_foreach(&sctx->resident_tex_needs_depth_decompress,
> @@ -722,17 +717,13 @@ static void si_decompress_resident_textures(struct si_context *sctx)
>
> static void si_decompress_resident_images(struct si_context *sctx)
> {
> - util_dynarray_foreach(&sctx->resident_img_handles,
> + util_dynarray_foreach(&sctx->resident_img_needs_color_decompress,
> struct si_image_handle *, img_handle) {
> struct pipe_image_view *view = &(*img_handle)->view;
> struct r600_texture *tex = (struct r600_texture *)view->resource;
>
> - if (view->resource->target == PIPE_BUFFER)
> - continue;
> -
> - if ((*img_handle)->needs_color_decompress)
> - si_decompress_color_texture(sctx, tex, view->u.tex.level,
> - view->u.tex.level);
> + si_decompress_color_texture(sctx, tex, view->u.tex.level,
> + view->u.tex.level);
> }
> }
>
> diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
> index a8f54e0714a..f9e87530330 100644
> --- a/src/gallium/drivers/radeonsi/si_descriptors.c
> +++ b/src/gallium/drivers/radeonsi/si_descriptors.c
> @@ -1617,29 +1617,41 @@ static void si_set_polygon_stipple(struct pipe_context *ctx,
> static void
> si_resident_handles_update_needs_color_decompress(struct si_context *sctx)
> {
> +
needless new line?
For the series:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
More information about the mesa-dev
mailing list