X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_glsl_to_nir.cpp;h=8b8a108b3dd419a3f131b834f8d5cbdd1bf2aa22;hp=bdd9cddf98c3c6f03c1e5c11e594de60d7712589;hb=2f6c263cc376977dd8ac9adbcf37b43c46ca33f4;hpb=4c3a30393d945d37d0acc457f129705ba89b4cf6 diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index bdd9cddf98c..8b8a108b3dd 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -63,12 +63,13 @@ type_size(const struct glsl_type *type) * with the anything->tgsi->nir path. */ static void -st_nir_fixup_varying_slots(struct st_context *st, struct exec_list *var_list) +st_nir_fixup_varying_slots(struct st_context *st, nir_shader *shader, + nir_variable_mode mode) { if (st->needs_texcoord_semantic) return; - nir_foreach_variable(var, var_list) { + nir_foreach_variable_with_modes(var, shader, mode) { if (var->data.location >= VARYING_SLOT_VAR0) { var->data.location += 9; } else if (var->data.location == VARYING_SLOT_PNTC) { @@ -856,24 +857,24 @@ st_nir_assign_varying_locations(struct st_context *st, nir_shader *nir) nir_assign_io_var_locations(nir, nir_var_shader_out, &nir->num_outputs, nir->info.stage); - st_nir_fixup_varying_slots(st, &nir->outputs); + st_nir_fixup_varying_slots(st, nir, nir_var_shader_out); } else if (nir->info.stage == MESA_SHADER_GEOMETRY || nir->info.stage == MESA_SHADER_TESS_CTRL || nir->info.stage == MESA_SHADER_TESS_EVAL) { nir_assign_io_var_locations(nir, nir_var_shader_in, &nir->num_inputs, nir->info.stage); - st_nir_fixup_varying_slots(st, &nir->inputs); + st_nir_fixup_varying_slots(st, nir, nir_var_shader_in); nir_assign_io_var_locations(nir, nir_var_shader_out, &nir->num_outputs, nir->info.stage); - st_nir_fixup_varying_slots(st, &nir->outputs); + st_nir_fixup_varying_slots(st, nir, nir_var_shader_out); } else if (nir->info.stage == MESA_SHADER_FRAGMENT) { nir_assign_io_var_locations(nir, nir_var_shader_in, &nir->num_inputs, nir->info.stage); - st_nir_fixup_varying_slots(st, &nir->inputs); + st_nir_fixup_varying_slots(st, nir, nir_var_shader_in); nir_assign_io_var_locations(nir, nir_var_shader_out, &nir->num_outputs, nir->info.stage);