freedreno: add useful assert
authorRob Clark <robdclark@gmail.com>
Thu, 18 Oct 2018 13:05:52 +0000 (09:05 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 25 Oct 2018 22:38:53 +0000 (18:38 -0400)
Would have been useful to catch the problem fixed in
8e798e28f736e22e9e1e4534ab42a36cde14b142

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_batch.c

index 6c05fbaa74de97f2bbab23946bb95381bdd33889..ff42d6c138cc3f75830b54b9e99a90398187ea31 100644 (file)
@@ -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));