aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorJames Zhu <[email protected]>2020-04-06 20:34:01 +0000
committerMarge Bot <[email protected]>2020-04-08 18:11:45 +0000
commit98743f648a356f55c1b10a439efea15937d4af41 (patch)
treeb9835ed431f88079642a5e4a7f5d7e21c0933348 /src/gallium/drivers
parenta7e2efa7c95b78373d8a4b7b88ceb7b3769e6eaa (diff)
radeonsi: fix Segmentation fault during vaapi enc test
Fix Segmentation fault during vaapi enc test on Arcturus. Signed-off-by: James Zhu <[email protected]> Reviewed-by Leo Liu <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4472>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute_blit.c6
1 files changed, 4 insertions, 2 deletions
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,