From: Mike Blumenkrantz Date: Thu, 6 Apr 2023 18:49:31 +0000 (-0400) Subject: zink: don't access non_fs part of zink_shader from fs X-Git-Tag: upstream/23.3.3~10305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc18570c0aa43ef1f0d653a50f7db26b55cfc8b1;p=platform%2Fupstream%2Fmesa.git zink: don't access non_fs part of zink_shader from fs Fixes: a6de15eff56 ("zink: add flags to `zink_gfx_program` and `zink_context`") Part-of: --- diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index 19e42c1..e6a95c0 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -1039,7 +1039,8 @@ zink_create_gfx_program(struct zink_context *ctx, if (stages[i]) { prog->shaders[i] = stages[i]; prog->stages_present |= BITFIELD_BIT(i); - prog->optimal_keys &= !prog->shaders[i]->non_fs.is_generated; + if (i != MESA_SHADER_FRAGMENT) + prog->optimal_keys &= !prog->shaders[i]->non_fs.is_generated; prog->needs_inlining |= prog->shaders[i]->needs_inlining; nir[i] = zink_shader_deserialize(screen, stages[i]); } else {