From 425514e62e78188105ad97a0647db93acb274176 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 22 Aug 2022 14:40:48 -0700 Subject: [PATCH] freedreno: Simplify add_dep logic These two cases never happen, guaranteed by the logic above that adds to the batches[] table. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_batch_cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_batch_cache.c b/src/gallium/drivers/freedreno/freedreno_batch_cache.c index 8de5022d0e4..a5231c643aa 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch_cache.c +++ b/src/gallium/drivers/freedreno/freedreno_batch_cache.c @@ -172,8 +172,7 @@ fd_bc_flush(struct fd_context *ctx, bool deferred) assert_dt struct fd_batch *current_batch = fd_context_batch(ctx); for (unsigned i = 0; i < n; i++) { - if (batches[i] && (batches[i]->ctx == ctx) && - (batches[i] != current_batch)) { + if (batches[i] != current_batch) { fd_batch_add_dep(current_batch, batches[i]); } }