summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-09-03 16:07:17 -0400
committerRob Clark <[email protected]>2018-09-05 13:38:43 -0400
commita122118c14a3cc9da22b94174cae7ee8d8445dfa (patch)
tree13255fbc5fba72aeb524abdde8bf12dde6963829 /src/gallium/drivers/freedreno/freedreno_context.c
parenta45e1802db528a5d2e622daccc5ca29a3d3d88b3 (diff)
freedreno: add fd_context_batch() accessor
For cases in which (after the following commit) ctx->batch may be null. Prep work for following commit. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index 2eeb85e315e..1d91b079f60 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -49,6 +49,9 @@ fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fencep,
DBG("%p: flush: flags=%x\n", ctx->batch, flags);
+ if (!ctx->batch)
+ return;
+
/* Take a ref to the batch's fence (batch can be unref'd when flushed: */
fd_fence_ref(pctx->screen, &fence, ctx->batch->fence);