freedreno: Move assert

The batch can be flushed immediately after unlocking, so this assert
needs to move.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11200>
This commit is contained in:
Rob Clark
2021-06-08 15:18:52 -07:00
parent 93b540c72e
commit 97222bcd36
2 changed files with 4 additions and 2 deletions
@@ -535,8 +535,6 @@ fd_batch_resource_read_slowpath(struct fd_batch *batch, struct fd_resource *rsc)
void
fd_batch_check_size(struct fd_batch *batch)
{
debug_assert(!batch->flushed);
if (FD_DBG(FLUSH)) {
fd_batch_flush(batch);
return;
@@ -378,6 +378,8 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
if (FD_DBG(DDRAW))
fd_context_all_dirty(ctx);
debug_assert(!batch->flushed);
fd_batch_unlock_submit(batch);
fd_batch_check_size(batch);
fd_batch_reference(&batch, NULL);
@@ -494,6 +496,8 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
}
}
debug_assert(!batch->flushed);
fd_batch_unlock_submit(batch);
fd_batch_check_size(batch);