zink: flag rp layout change if zsbuf usedness changes on dsa/fs state bind
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 23 Mar 2023 12:06:05 +0000 (08:06 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 24 Mar 2023 00:32:56 +0000 (00:32 +0000)
this should (correctly) trigger the expected zsbuf elimination and
avoid hitting asserts

fixes #8679

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22086>

src/gallium/drivers/zink/zink_context.c

index 1ff012e..6a752c8 100644 (file)
@@ -5444,6 +5444,8 @@ zink_parse_tc_info(struct zink_context *ctx)
       zink_tc_parse_fs(ctx->gfx_stages[MESA_SHADER_FRAGMENT], info);
    if (ctx->dsa_state)
       zink_tc_parse_dsa(ctx->dsa_state, info);
+   if (ctx->zsbuf_unused == zink_is_zsbuf_used(ctx))
+      ctx->rp_layout_changed = true;
 }
 
 struct pipe_context *