diff options
author | Rob Clark <[email protected]> | 2017-11-19 16:45:04 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-12-03 14:17:41 -0500 |
commit | 91730fb0ffc77682cfd5cebbefdad2f8f92f2431 (patch) | |
tree | ce9c2dac47f23fc634cb5e2a7be0db2b06fd4af0 /src/gallium | |
parent | 4ab6ab80365578cc9366b6d2d4a626694e0604a7 (diff) |
freedreno: avoid unneccessary batch flush
In some cases we can end up trying to add a write dependency on ourself,
which shouldn't trigger a flush.
Avoids an extra couple flushes per from in stk.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_batch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index eff5e8dc359..9c66dc98bc7 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch.c +++ b/src/gallium/drivers/freedreno/freedreno_batch.c @@ -393,6 +393,8 @@ fd_batch_resource_used(struct fd_batch *batch, struct fd_resource *rsc, bool wri struct fd_batch *dep; foreach_batch(dep, cache, rsc->batch_mask) { struct fd_batch *b = NULL; + if (dep == batch) + continue; /* note that batch_add_dep could flush and unref dep, so * we need to hold a reference to keep it live for the * fd_bc_invalidate_batch() |