From c54295e99389a97de63752ce22b54a265351be93 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 23 May 2023 13:58:09 -0400 Subject: [PATCH] zink: use the per-context track_renderpasses flag in more places this should fix some erroneous zsbuf invalidation Fixes: 215beee16d9 ("zink: more explicitly track/check rp optimizing per-context") Part-of: (cherry picked from commit 32b7659fffb4d023d6564e1af44a8e9b94981870) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_context.c | 2 +- src/gallium/drivers/zink/zink_state.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d03ca86c31b..f0fc5fb40cb 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -814,7 +814,7 @@ "description": "zink: use the per-context track_renderpasses flag in more places", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "215beee16d9e075a63fd1afc62cc00b28aae1086" }, diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 97b7149d2be..8cf38be5dfb 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3659,7 +3659,7 @@ zink_flush(struct pipe_context *pctx, check_device_lost(ctx); } } - if (ctx->tc && !screen->driver_workarounds.track_renderpasses) + if (ctx->tc && !ctx->track_renderpasses) tc_driver_internal_flush_notify(ctx->tc); } else { fence = &batch->state->fence; diff --git a/src/gallium/drivers/zink/zink_state.c b/src/gallium/drivers/zink/zink_state.c index 18b14230220..8b9f51befe4 100644 --- a/src/gallium/drivers/zink/zink_state.c +++ b/src/gallium/drivers/zink/zink_state.c @@ -522,10 +522,10 @@ 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 (!zink_screen(ctx->base.screen)->driver_workarounds.track_renderpasses && !ctx->blitting) + if (!ctx->track_renderpasses && !ctx->blitting) zink_parse_tc_info(ctx); } - if (!zink_screen(ctx->base.screen)->driver_workarounds.track_renderpasses && !ctx->blitting) { + 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 */