freedreno/a6xx: fix LRZ hang
authorRob Clark <robdclark@chromium.org>
Thu, 30 Apr 2020 23:00:21 +0000 (16:00 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 May 2020 00:02:28 +0000 (00:02 +0000)
commitf8424d3b9993d555115a82c7cea4931b89a94fea
treea5b6fa7e7985365d23c0c4640ec3b370abca56c3
parent0e51082cfa733b3b8255bbd77fc4af46f4108c1d
freedreno/a6xx: fix LRZ hang

In detecting the case where we actually do need to re-emit LRZ state
(due to new batch), we were checking `ctx->last.dirty` to detect when
we cannot trust previous state.  But this is cleared before we check
it.

Move where it is cleared to the end of the draw_vbo() path.

Fixes: dfa702e94b9 ("freedreno/a6xx: limit LRZ state emit")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4842>
src/gallium/drivers/freedreno/a6xx/fd6_draw.c
src/gallium/drivers/freedreno/freedreno_context.h