Commit 2f5f5424 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot
Browse files

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: 334759d8

 ("zink: implement passthrough tcs shader injection")
Reviewed-by: Erik Faye-Lund's avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <mesa/mesa!8271>
parent 7c3140db
......@@ -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];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment