From 53efaeca180f42e7c8f4d36f1bf1fe683913cd6b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 2 May 2023 12:10:27 -0400 Subject: [PATCH] zink: only unset a generated tcs if the bound tcs is the generated one this could otherwise unbind a non-generated tcs if the tes had at some point generated a tcs cc: mesa-stable Part-of: (cherry picked from commit 27d6a98638a5d3914c84ced7b4177bbc5adddedb) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_program.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 446e109b2ae..7db889d9c9f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -211,7 +211,7 @@ "description": "zink: only unset a generated tcs if the bound tcs is the generated one", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index b631d150f79..dba686d91b6 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -1820,7 +1820,7 @@ zink_bind_tes_state(struct pipe_context *pctx, if (!!ctx->gfx_stages[MESA_SHADER_TESS_EVAL] != !!cso) { if (!cso) { /* if unsetting a TESS that uses a generated TCS, ensure the TCS is unset */ - if (ctx->gfx_stages[MESA_SHADER_TESS_EVAL]->non_fs.generated_tcs) + if (ctx->gfx_stages[MESA_SHADER_TESS_CTRL] == ctx->gfx_stages[MESA_SHADER_TESS_EVAL]->non_fs.generated_tcs) ctx->gfx_stages[MESA_SHADER_TESS_CTRL] = NULL; } }