From 93d5c860812a2565348d07cc1a00bb973f37f034 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 26 Apr 2020 21:36:59 -0400 Subject: [PATCH] radeonsi: bind shader images after DCC is disabled for image stores This prevents an infinite recursion with a compute-based DCC decompression when it restores shader images. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_descriptors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index bf3ede49b39..0ea9b1346cb 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -715,12 +715,12 @@ static void si_set_shader_image(struct si_context *ctx, unsigned shader, unsigne res = si_resource(view->resource); - if (&images->views[slot] != view) - util_copy_image_view(&images->views[slot], view); - si_set_shader_image_desc(ctx, view, skip_decompress, descs->list + si_get_image_slot(slot) * 8, descs->list + si_get_image_slot(slot + SI_NUM_IMAGES) * 8); + if (&images->views[slot] != view) + util_copy_image_view(&images->views[slot], view); + if (res->b.b.target == PIPE_BUFFER || view->shader_access & SI_IMAGE_ACCESS_AS_BUFFER) { images->needs_color_decompress_mask &= ~(1 << slot); res->bind_history |= PIPE_BIND_SHADER_IMAGE; -- 2.30.2