zink: use the per-context track_renderpasses flag in more places
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 23 May 2023 17:58:09 +0000 (13:58 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 24 May 2023 18:02:11 +0000 (18:02 +0000)
this should fix some erroneous zsbuf invalidation

Fixes: 215beee16d9 ("zink: more explicitly track/check rp optimizing per-context")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23189>

src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_state.c

index c6520c1..5cd93fb 100644 (file)
@@ -3622,7 +3622,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;
index d702c08..5bffbd0 100644 (file)
@@ -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 */