From b8bf82133a29f1765e2625ed7572b19c6f6a47f2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 15 Mar 2024 12:12:01 -0400 Subject: [PATCH] zink: always sort io variables by location after re-creating them this otherwise breaks linking Part-of: --- src/gallium/drivers/zink/zink_compiler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index 3de4f9842eb..02b09de43f7 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -5516,6 +5516,8 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir) optimize_nir(nir, NULL, true); rework_io_vars(nir, nir_var_shader_in); rework_io_vars(nir, nir_var_shader_out); + nir_sort_variables_by_location(nir, nir_var_shader_in); + nir_sort_variables_by_location(nir, nir_var_shader_out); if (nir->info.stage < MESA_SHADER_COMPUTE) create_gfx_pushconst(nir);