nir: make use of does_varying_match() helper
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 2 Jan 2019 05:00:11 +0000 (16:00 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 3 Jan 2019 00:47:56 +0000 (11:47 +1100)
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/nir/nir_linking_helpers.c

index ecd15998f4941a7364885acb9dbf03639069faaa..fa3ccaaa2da4a9d2707510110ad0092509d86abf 100644 (file)
@@ -633,8 +633,7 @@ replace_constant_input(nir_shader *shader, nir_intrinsic_instr *store_intr)
 
          nir_variable *in_var = nir_deref_instr_get_variable(in_deref);
 
-         if (in_var->data.location != out_var->data.location ||
-             in_var->data.location_frac != out_var->data.location_frac)
+         if (!does_varying_match(out_var, in_var))
             continue;
 
          b.cursor = nir_before_instr(instr);