From: Brian Paul Date: Fri, 15 Dec 2017 21:25:20 +0000 (-0700) Subject: glsl: minor simplification in assign_varying_locations() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47b4183c92dbfcbeae120117310e1a60ca96b343;p=mesa.git glsl: minor simplification in assign_varying_locations() Reviewed-by: Timothy Arceri --- diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index 9039c3b8b83..6d74f9a4637 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -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); + } } }