diff options
author | Brian Paul <[email protected]> | 2017-12-15 14:25:20 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-12-20 11:23:16 -0700 |
commit | 47b4183c92dbfcbeae120117310e1a60ca96b343 (patch) | |
tree | 90f59a30cc2f934bc8b706cf975e2170f4251373 /src/compiler/glsl/link_varyings.cpp | |
parent | a0430bb62c9eed196aead655165145e0a1a1ff32 (diff) |
glsl: minor simplification in assign_varying_locations()
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/link_varyings.cpp')
-rw-r--r-- | src/compiler/glsl/link_varyings.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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); + } } } |