radeonsi: Fix u_log_ctx for aux_context recreation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

When recreating aux_context (typically following a GPU reset event),
the u_log_context must be properly initialized based on the aux_debug
enablement state, just like the logic in the function
radeonsi_screen_create_impl() during aux_context creation. Otherwise,
wrong u_log_context setting will lead to Mesa crashes. For example, in
si_blit_decompress_color(), it will check sctx->log to decide whether
to call u_log_printf(), which ultimately causes a crash.

Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37296>
This commit is contained in:
Trigger Huang 2025-09-11 19:44:55 +08:00 committed by Marge Bot
parent be7afedba9
commit 430b85adbb

View file

@ -861,7 +861,8 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
saux->b.destroy(&saux->b);
saux = (struct si_context *)si_create_context(&sscreen->b, context_flags);
saux->b.set_log_context(&saux->b, &sscreen->aux_contexts[i].log);
if (sscreen->options.aux_debug)
saux->b.set_log_context(&saux->b, &sscreen->aux_contexts[i].log);
sscreen->aux_contexts[i].ctx = &saux->b;
}