case nir_intrinsic_load_interpolated_input:
case nir_intrinsic_load_input: {
- /* The intrinsic doesn't carry the variable. We need to find it
- * manually.
- */
- 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) <
- (var->data.location_frac + glsl_get_components(var->type))))
- lower_texcoord(state, intr);
- }
+ if (nir_intrinsic_io_semantics(intr).location == VARYING_SLOT_TEX0)
+ lower_texcoord(state, intr);
break;
}
default: