Module: Mesa
Branch: master
Commit: 2f5f542460b7e3d2ac5bbb4482c10f23a4de2f35
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f5f542460b7e3d2ac5bbb4482c10f23a4de2f35

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Dec 30 09:55:58 2020 -0500

zink: avoid replacing valid tcs with injected one

need to check both arrays here since we only want to use an injected shader
if we don't have a real one, not just if the real one isn't being updated

Fixes: 334759d8509 ("zink: implement passthrough tcs shader injection")

Reviewed-by: Erik Faye-Lund <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8271>

---

 src/gallium/drivers/zink/zink_program.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_program.c 
b/src/gallium/drivers/zink/zink_program.c
index 40afc7093ad..cd58980f5db 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -319,7 +319,8 @@ update_shader_modules(struct zink_context *ctx, struct 
zink_shader *stages[ZINK_
       dirty[tgsi_processor_to_shader_stage(type)] = stages[type];
    }
    if (ctx->dirty_shader_stages & (1 << PIPE_SHADER_TESS_EVAL)) {
-      if (dirty[MESA_SHADER_TESS_EVAL] && !dirty[MESA_SHADER_TESS_CTRL]) {
+      if (dirty[MESA_SHADER_TESS_EVAL] && !dirty[MESA_SHADER_TESS_CTRL] &&
+          !stages[PIPE_SHADER_TESS_CTRL]) {
          dirty[MESA_SHADER_TESS_CTRL] = stages[PIPE_SHADER_TESS_CTRL] = 
zink_shader_tcs_create(ctx, stages[PIPE_SHADER_VERTEX]);
          dirty[MESA_SHADER_TESS_EVAL]->generated = 
stages[PIPE_SHADER_TESS_CTRL];
       }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to