From: Marek Olšák Date: Fri, 14 Aug 2020 05:54:19 +0000 (-0400) Subject: nir: properly identify texcoords for lowered IO in nir_lower_drawpixels X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=844167d10094099e2fdc1fa47ea22f800da305ad;p=mesa.git nir: properly identify texcoords for lowered IO in nir_lower_drawpixels Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/compiler/nir/nir_lower_drawpixels.c b/src/compiler/nir/nir_lower_drawpixels.c index b4b2cfd6b83..147f4a3828c 100644 --- a/src/compiler/nir/nir_lower_drawpixels.c +++ b/src/compiler/nir/nir_lower_drawpixels.c @@ -264,16 +264,8 @@ lower_drawpixels_block(lower_drawpixels_state *state, nir_block *block) 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: