From 4c62d39214e6ee54bdb15507e9197956867a71fa Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Fri, 26 Jan 2024 16:41:13 +0100 Subject: [PATCH] radeonsi: Destroy queues before the aux contexts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise the queue might access the already destroyed aux contexts Signed-off-by: Sebastian Wick Reviewed-by: Marek Olšák Reviewed-by: Pierre-Eric Pelloux-Prayer Cc: mesa-stable Part-of: (cherry picked from commit c467a87e06e21ad9e8bcc9e3556b6fc6f19a1bf1) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_pipe.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 98d267285f6..4bede5f3542 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -344,7 +344,7 @@ "description": "radeonsi: Destroy queues before the aux contexts", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index a2712aadd3a..f922435a159 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -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();