summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2021-03-02 02:33:36 -0500
committerMarge Bot <eric+marge@anholt.net>2021-03-23 23:53:34 +0000
commit143157eeffdb2dfd4b10c288ea21f6cd3f6eb84d (patch)
tree4b1ea5a892d99c8fcb6eb6855547a6c9e8b7394f
parentbbd06c587566309b1bc21a61b646084cbc62e6dc (diff)
radeonsi: don't crash on NULL images in si_check_needs_implicit_syncstaging/20.3
This fixes CTS test: KHR-GL46.arrays_of_arrays_gl.AtomicUsage Fixes: bddc0e023c "radeonsi: fix read from compute / write from draw sync" Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9677>
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index e58958ab211..224aa6f4319 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -822,7 +822,7 @@ static bool si_check_needs_implicit_sync(struct si_context *sctx)
}
struct si_images *images = &sctx->images[PIPE_SHADER_COMPUTE];
- mask = u_bit_consecutive(0, info->base.num_images);
+ mask = u_bit_consecutive(0, info->base.num_images) & images->enabled_mask;
while (mask) {
int i = u_bit_scan(&mask);