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@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9361>
This commit is contained in:
Marek Olšák 2021-03-02 02:33:36 -05:00 committed by Marge Bot
parent f9e6c7a220
commit db67d9c0d1

View file

@ -850,7 +850,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);