summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega/api_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vega/api_context.c')
-rw-r--r--src/gallium/state_trackers/vega/api_context.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/vega/api_context.c b/src/gallium/state_trackers/vega/api_context.c
index 0d04d8e871..d6bbda5e07 100644
--- a/src/gallium/state_trackers/vega/api_context.c
+++ b/src/gallium/state_trackers/vega/api_context.c
@@ -73,7 +73,8 @@ void vegaFinish(void)
pipe = ctx->pipe;
pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
-
- pipe->screen->fence_finish(pipe->screen, fence, 0);
- pipe->screen->fence_reference(pipe->screen, &fence, NULL);
+ if (fence) {
+ pipe->screen->fence_finish(pipe->screen, fence, 0);
+ pipe->screen->fence_reference(pipe->screen, &fence, NULL);
+ }
}