diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index 441141524dc..0a3451f69c4 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -5510,8 +5510,9 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir) break; } } - nir_gather_xfb_info_from_intrinsics(nir); NIR_PASS_V(nir, nir_lower_io_to_scalar, nir_var_shader_in | nir_var_shader_out, eliminate_io_wrmasks_instr, nir); + if (nir->info.stage < MESA_SHADER_FRAGMENT) + nir_gather_xfb_info_from_intrinsics(nir); /* clean up io to improve direct access */ optimize_nir(nir, NULL, true); rework_io_vars(nir, nir_var_shader_in);