Mesa (staging/21.0): radeonsi: don't crash on NULL images in si_check_needs_implicit_sync

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 11 21:28:49 UTC 2021


Module: Mesa
Branch: staging/21.0
Commit: 9e582933f7b9e19899ee2e7b28c86231cc5610cc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e582933f7b9e19899ee2e7b28c86231cc5610cc

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue Mar  2 02:33:36 2021 -0500

radeonsi: don't crash on NULL images in si_check_needs_implicit_sync

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 at amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9525>

---

 src/gallium/drivers/radeonsi/si_compute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index ff89d018ad7..1933daaa441 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -827,7 +827,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);



More information about the mesa-commit mailing list