nir: properly identify texcoords for lowered IO in nir_lower_drawpixels
Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>
This commit is contained in:
parent
2b1ef5df4e
commit
844167d100
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue