aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-04-26 21:36:59 -0400
committerMarge Bot <[email protected]>2020-04-30 22:27:31 +0000
commit93d5c860812a2565348d07cc1a00bb973f37f034 (patch)
tree9a6bf742c67b605ed948920f7701b1a7359de393
parent44d27fd6fba92a3b11c10d06f1b3babeffbcd4bb (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4761>
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c6
1 files 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;