From 06ce243a73dbec3a1ae80dace839d7ef65aca509 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Thu, 11 Apr 2024 16:52:50 +0200 Subject: [PATCH] etnaviv: trigger TS derivation after slow clear Now that we switch dynamically between fast (TS) and slow (regular) clears on TS enabled surfaces, we must trigger reevaluation of the current TS state also after a slow clear, as otherwise the PE might continue to use the invalidated TS state. Fixes: df63f188e83a ("etnaviv: fix separate depth/stencil clears") Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_rs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_rs.c b/src/gallium/drivers/etnaviv/etnaviv_rs.c index 66effcd8857..c5501fb86cb 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rs.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rs.c @@ -409,7 +409,7 @@ etna_blit_clear_zs_rs(struct pipe_context *pctx, struct pipe_surface *dst, } etna_resource_level_ts_mark_valid(surf->level); - ctx->dirty |= ETNA_DIRTY_TS | ETNA_DIRTY_DERIVE_TS; + ctx->dirty |= ETNA_DIRTY_TS; } else { /* If the level has valid TS state we need to flush it, as the regular * clear will not update the state and we must therefore invalidate it. */ @@ -431,6 +431,7 @@ etna_blit_clear_zs_rs(struct pipe_context *pctx, struct pipe_surface *dst, surf->level->clear_value = new_clear_value; resource_written(ctx, surf->base.texture); etna_resource_level_mark_changed(surf->level); + ctx->dirty |= ETNA_DIRTY_DERIVE_TS; } static void