radeonsi: clear the debug callback on ctx destroy
The debug callback depends on the context to operate properly, so we need to clear it on destroy to avoid a use-after-free. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12035 Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
This commit is contained in:
committed by
Marge Bot
parent
71cb394b02
commit
59a3f38ff6
@@ -194,6 +194,8 @@ static void si_destroy_context(struct pipe_context *context)
|
||||
{
|
||||
struct si_context *sctx = (struct si_context *)context;
|
||||
|
||||
context->set_debug_callback(context, NULL);
|
||||
|
||||
util_unreference_framebuffer_state(&sctx->framebuffer.state);
|
||||
si_release_all_descriptors(sctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user