diff options
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_context.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c index 6478e0e7a9c..5e708a2be40 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.c +++ b/src/gallium/drivers/freedreno/freedreno_context.c @@ -45,6 +45,12 @@ fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, { struct fd_context *ctx = fd_context(pctx); + if (!ctx->batch) { + if (fence) + *fence = NULL; + return; + } + if (flags & PIPE_FLUSH_FENCE_FD) ctx->batch->needs_out_fence_fd = true; |