diff options
author | Jason Ekstrand <[email protected]> | 2015-09-22 17:16:59 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-09-22 20:37:35 -0700 |
commit | 0f9bf647705db48a88c700bfa7ca3d4a9f6b4f56 (patch) | |
tree | dd66a3057c75004b97f41aafe3406a671876648c | |
parent | 2b79db2c0216075f5047fe3723d100fd70fc59c7 (diff) |
nir/lower_alu_to_scalar: Return after lower_reduction
We don't use any of the code after the switch anyway. Since we check for
num_components == 1 and early-return, it doesn't get executed so
everything's ok. However, it makes it much clearer what's going on if we
simply do an early return.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/glsl/nir/nir_lower_alu_to_scalar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_lower_alu_to_scalar.c b/src/glsl/nir/nir_lower_alu_to_scalar.c index 5ef5ec2b316..84d4943befc 100644 --- a/src/glsl/nir/nir_lower_alu_to_scalar.c +++ b/src/glsl/nir/nir_lower_alu_to_scalar.c @@ -86,7 +86,7 @@ lower_alu_instr_scalar(nir_alu_instr *instr, nir_builder *b) case name##3: \ case name##4: \ lower_reduction(instr, chan, merge, b); \ - break; + return; switch (instr->op) { case nir_op_vec4: |