From: Mike Blumenkrantz Date: Thu, 8 Jun 2023 17:54:26 +0000 (-0400) Subject: zink: clean up rp update tracking on dsa bind X-Git-Tag: upstream/23.3.3~6689 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2543fc15a1968e83aa44c90494bbc1d047409494;p=platform%2Fupstream%2Fmesa.git zink: clean up rp update tracking on dsa bind Part-of: --- diff --git a/src/gallium/drivers/zink/zink_state.c b/src/gallium/drivers/zink/zink_state.c index 404d266..ebccd79 100644 --- a/src/gallium/drivers/zink/zink_state.c +++ b/src/gallium/drivers/zink/zink_state.c @@ -514,6 +514,7 @@ zink_bind_depth_stencil_alpha_state(struct pipe_context *pctx, void *cso) { struct zink_context *ctx = zink_context(pctx); + bool prev_zsread = ctx->dsa_state ? ctx->dsa_state->hw_state.depth_test || ctx->dsa_state->hw_state.stencil_test : false; bool prev_zswrite = ctx->dsa_state ? ctx->dsa_state->hw_state.depth_write || ctx->dsa_state->hw_state.stencil_test : false; zink_flush_dgc_if_enabled(ctx); ctx->dsa_state = cso; @@ -525,15 +526,12 @@ zink_bind_depth_stencil_alpha_state(struct pipe_context *pctx, void *cso) state->dirty |= !zink_screen(pctx->screen)->info.have_EXT_extended_dynamic_state; ctx->dsa_state_changed = true; } - if (!ctx->track_renderpasses && !ctx->blitting) - zink_parse_tc_info(ctx); } if (!ctx->track_renderpasses && !ctx->blitting) { bool zs_write = ctx->dsa_state ? ctx->dsa_state->hw_state.depth_write || ctx->dsa_state->hw_state.stencil_test : false; - if (prev_zswrite != zs_write) { - /* flag renderpass for re-check on next draw */ - ctx->rp_layout_changed = true; - } + bool zs_read = ctx->dsa_state ? ctx->dsa_state->hw_state.depth_test || ctx->dsa_state->hw_state.stencil_test : false; + if (prev_zswrite != zs_write || prev_zsread != zs_read) + zink_parse_tc_info(ctx); } }