mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-29 04:10:53 +02:00
radeonsi: Fix u_log_ctx for aux_context recreation
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:
parent
be7afedba9
commit
430b85adbb
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue