diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index b989ad8c0b3..020d0d25322 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -69,6 +69,9 @@ st_nir_fixup_varying_slots(struct st_context *st, nir_shader *shader, if (st->needs_texcoord_semantic) return; + /* This is called from finalize, but we don't want to do this adjustment twice. */ + assert(!st->allow_st_finalize_nir_twice); + nir_foreach_variable_with_modes(var, shader, mode) { if (var->data.location >= VARYING_SLOT_VAR0) { var->data.location += 9;