freedreno: Fix autotune regression since batch-cache rework.

I freed the key that autotune needed a little early.

Fixes: b2349a4671 ("freedreno: Move the batch cache to the context.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12942>
This commit is contained in:
Emma Anholt 2021-09-20 11:11:30 -07:00 committed by Marge Bot
parent 27dd22cb62
commit b8c4ad378d

View file

@ -341,7 +341,6 @@ batch_flush(struct fd_batch *batch) assert_dt
batch_flush_dependencies(batch);
batch_reset_resources(batch);
fd_bc_free_key(batch);
batch->flushed = true;
if (batch == batch->ctx->batch)
@ -354,6 +353,9 @@ batch_flush(struct fd_batch *batch) assert_dt
debug_assert(batch->reference.count > 0);
/* Must come after fd_gmem_render_tiles, since that uses the key. */
fd_bc_free_key(batch);
cleanup_submit(batch);
fd_batch_unlock_submit(batch);
}