From: James Zhu Date: Mon, 6 Apr 2020 20:34:01 +0000 (+0000) Subject: radeonsi: fix Segmentation fault during vaapi enc test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98743f648a356f55c1b10a439efea15937d4af41;p=mesa.git radeonsi: fix Segmentation fault during vaapi enc test Fix Segmentation fault during vaapi enc test on Arcturus. Signed-off-by: James Zhu Reviewed-by Leo Liu Reviewed-by: Marek Olšák Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index 6e3b07cb7c8..0a81c6867e6 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -63,7 +63,8 @@ static void si_launch_grid_internal(struct si_context *sctx, struct pipe_grid_in sctx->flags |= SI_CONTEXT_STOP_PIPELINE_STATS; sctx->render_cond_force_off = true; /* Skip decompression to prevent infinite recursion. */ - sctx->blitter->running = true; + if (sctx->blitter) + sctx->blitter->running = true; /* Dispatch compute. */ sctx->b.launch_grid(&sctx->b, info); @@ -72,7 +73,8 @@ static void si_launch_grid_internal(struct si_context *sctx, struct pipe_grid_in sctx->flags &= ~SI_CONTEXT_STOP_PIPELINE_STATS; sctx->flags |= SI_CONTEXT_START_PIPELINE_STATS; sctx->render_cond_force_off = false; - sctx->blitter->running = false; + if (sctx->blitter) + sctx->blitter->running = false; } static void si_compute_clear_12bytes_buffer(struct si_context *sctx, struct pipe_resource *dst,