radeonsi: Destroy queues before the aux contexts

Otherwise the queue might access the already destroyed aux contexts

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27300>
This commit is contained in:
Sebastian Wick 2024-01-26 16:41:13 +01:00 committed by Marge Bot
parent a0a453e43f
commit c467a87e06

View file

@ -980,6 +980,9 @@ static void si_destroy_screen(struct pipe_screen *pscreen)
si_resource_reference(&sscreen->attribute_ring, NULL);
util_queue_destroy(&sscreen->shader_compiler_queue);
util_queue_destroy(&sscreen->shader_compiler_queue_opt_variants);
for (unsigned i = 0; i < ARRAY_SIZE(sscreen->aux_contexts); i++) {
if (!sscreen->aux_contexts[i].ctx)
continue;
@ -1002,9 +1005,6 @@ static void si_destroy_screen(struct pipe_screen *pscreen)
sscreen->async_compute_context->destroy(sscreen->async_compute_context);
}
util_queue_destroy(&sscreen->shader_compiler_queue);
util_queue_destroy(&sscreen->shader_compiler_queue_opt_variants);
/* Release the reference on glsl types of the compiler threads. */
glsl_type_singleton_decref();