glsl: minor simplification in assign_varying_locations()
authorBrian Paul <brianp@vmware.com>
Fri, 15 Dec 2017 21:25:20 +0000 (14:25 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 20 Dec 2017 18:23:16 +0000 (11:23 -0700)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/link_varyings.cpp

index 9039c3b8b83ec1b58cadf672976bef5aab86a7aa..6d74f9a4637c39dd212d411be6acd49a529b6160 100644 (file)
@@ -2514,11 +2514,9 @@ assign_varying_locations(struct gl_context *ctx,
        */
       foreach_in_list(ir_instruction, node, consumer->ir) {
          ir_variable *const input_var = node->as_variable();
-
-         if (input_var == NULL || input_var->data.mode != ir_var_shader_in)
-            continue;
-
-         matches.record(NULL, input_var);
+         if (input_var && input_var->data.mode == ir_var_shader_in) {
+            matches.record(NULL, input_var);
+         }
       }
    }