Module: Mesa Branch: master Commit: f8424d3b9993d555115a82c7cea4931b89a94fea URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8424d3b9993d555115a82c7cea4931b89a94fea
Author: Rob Clark <[email protected]> Date: Thu Apr 30 16:00:21 2020 -0700 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4842> --- src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 2 -- src/gallium/drivers/freedreno/freedreno_context.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c index 5ce0f860511..78bd62051f6 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -137,8 +137,6 @@ fixup_draw_state(struct fd_context *ctx, struct fd6_emit *emit) ctx->dirty |= FD_DIRTY_RASTERIZER; ctx->last.primitive_restart = emit->primitive_restart; } - - ctx->last.dirty = false; } static bool diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index b3a0f212dd0..e756411d183 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -450,6 +450,7 @@ fd_context_all_dirty(struct fd_context *ctx) 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 _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
