From d53074d3f10dbeffb5b991dffd19b2c17f2711fb Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 18 Oct 2018 09:05:52 -0400 Subject: [PATCH] freedreno: add useful assert Would have been useful to catch the problem fixed in 8e798e28f736e22e9e1e4534ab42a36cde14b142 Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_batch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index 6c05fbaa74d..ff42d6c138c 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch.c +++ b/src/gallium/drivers/freedreno/freedreno_batch.c @@ -468,8 +468,10 @@ fd_batch_resource_used(struct fd_batch *batch, struct fd_resource *rsc, bool wri flush_write_batch(rsc); } - if (rsc->batch_mask & (1 << batch->idx)) + if (rsc->batch_mask & (1 << batch->idx)) { + debug_assert(_mesa_set_search(batch->resources, rsc)); return; + } debug_assert(!_mesa_set_search(batch->resources, rsc)); -- 2.30.2