From 6b4d213a6f3991b3851816dff0c3c2f15294cece Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sun, 3 Sep 2023 16:28:11 -0400 Subject: [PATCH] radeonsi: Set PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET for auxiliary contexts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 591aaea6486fca44feb65e46ba09aaa708315b50 Signed-off-by: Alexander Orzechowski Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index e2c6a354e68..6afa0dde8b0 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -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));