diff options
author | Rob Clark <robdclark@gmail.com> | 2018-09-03 16:07:17 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-09-05 13:38:43 -0400 |
commit | a122118c14a3cc9da22b94174cae7ee8d8445dfa (patch) | |
tree | 13255fbc5fba72aeb524abdde8bf12dde6963829 /src/gallium/drivers/freedreno/freedreno_batch_cache.c | |
parent | a45e1802db528a5d2e622daccc5ca29a3d3d88b3 (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 <robdclark@gmail.com>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_batch_cache.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_batch_cache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch_cache.c b/src/gallium/drivers/freedreno/freedreno_batch_cache.c index 1bf656cf208..9d046f205bc 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch_cache.c +++ b/src/gallium/drivers/freedreno/freedreno_batch_cache.c @@ -144,10 +144,11 @@ bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx, bool deferred) } if (deferred) { - struct fd_batch *current_batch = ctx->batch; + struct fd_batch *current_batch = fd_context_batch(ctx); for (unsigned i = 0; i < n; i++) { - if (batches[i] != current_batch) { + if (batches[i] && (batches[i]->ctx == ctx) && + (batches[i] != current_batch)) { fd_batch_add_dep(current_batch, batches[i]); } } |