nir: Optimize mask+downcast to just downcast
[mesa.git] / src / compiler / nir / nir_lower_drawpixels.c
index f2e64722be8e491d030023f4e0c761bc0e490b4c..b4b2cfd6b83a0f751861973a006b7010d36ae9ce 100644 (file)
@@ -45,7 +45,7 @@ get_texcoord(lower_drawpixels_state *state)
       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;
@@ -267,7 +267,7 @@ lower_drawpixels_block(lower_drawpixels_state *state, nir_block *block)
             /* 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) <