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>
ctx->dirty |= FD_DIRTY_RASTERIZER;
ctx->last.primitive_restart = emit->primitive_restart;
}
-
- ctx->last.dirty = false;
}
static bool
static inline void
fd_context_all_clean(struct fd_context *ctx)
{
+ ctx->last.dirty = false;
ctx->dirty = 0;
for (unsigned i = 0; i < PIPE_SHADER_TYPES; i++) {
/* don't mark compute state as clean, since it is not emitted