nir_variable *texcoord = NULL;
/* find gl_TexCoord, if it exists: */
- nir_foreach_variable(var, &state->shader->inputs) {
+ nir_foreach_shader_in_variable(var, state->shader) {
if (var->data.location == VARYING_SLOT_TEX0) {
texcoord = var;
break;
/* The intrinsic doesn't carry the variable. We need to find it
* manually.
*/
- nir_foreach_variable(var, &state->b.shader->inputs) {
+ nir_foreach_shader_in_variable(var, state->b.shader) {
if ((var->data.driver_location == nir_intrinsic_base(intr)) &&
(nir_intrinsic_component(intr) >= var->data.location_frac &&
nir_intrinsic_component(intr) <