radeonsi: Set PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET for auxiliary contexts

This fixes a regression with context loss hardened compositors such as
wlroots or kwin where instead of continuing execution in a reset
situation, the process would be aborted. Although these applications set
their notification strategy to lose context on reset, radeonsi also
creates auxiliary contexts for its own use observed when
`egl_init_display` and `gbm_create_device` are called from these
compositors. Fix this by allowing a context loss on reset for these
auxiliary contexts.

Note: It seems this has been attempted before for another call site
creating auxiliary contexts, but this location was missed, hence the
fixed commit hash below.

Fixes: #9672
Fixes: 591aaea648

Signed-off-by: Alexander Orzechowski <alex@ozal.ski>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25023>
This commit is contained in:
Alexander Orzechowski 2023-09-03 16:28:11 -04:00 committed by Marge Bot
parent 07ef39ddc6
commit 6b4d213a6f

View file

@ -1435,7 +1435,7 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
/* Create the auxiliary context. This must be done last. */
sscreen->aux_context = si_create_context(
&sscreen->b,
SI_CONTEXT_FLAG_AUX |
SI_CONTEXT_FLAG_AUX | PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET |
(sscreen->options.aux_debug ? PIPE_CONTEXT_DEBUG : 0) |
(sscreen->info.has_graphics ? 0 : PIPE_CONTEXT_COMPUTE_ONLY));