aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/float64.glsl
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2020-03-04 12:09:58 -0800
committerMarge Bot <[email protected]>2020-03-18 20:36:29 +0000
commit480565812c1472faf440b3a27864c8c34610a0f5 (patch)
treeb3111ab4d1c889b407606a41a7cb520b312f71f5 /src/compiler/glsl/float64.glsl
parent9496a67eece5717417b3b44ad1552c57b70b2897 (diff)
soft-fp64/fadd: Reformat after previous commit
Convert } else if (...) { ... } else { ... } to } else { if (...) { ... } else { ... } } Not doing this reformatting in the previous commit makes the previous commit easier to review, and doing it before the next commit makes the next commit easier to review. Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4142>
Diffstat (limited to 'src/compiler/glsl/float64.glsl')
-rw-r--r--src/compiler/glsl/float64.glsl40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/compiler/glsl/float64.glsl b/src/compiler/glsl/float64.glsl
index 68f79c4c563..b24a7812b92 100644
--- a/src/compiler/glsl/float64.glsl
+++ b/src/compiler/glsl/float64.glsl
@@ -697,27 +697,29 @@ __fadd64(uint64_t a, uint64_t b)
zExp = aExp;
__shift64ExtraRightJamming(
zFrac0, zFrac1, zFrac2, 1, zFrac0, zFrac1, zFrac2);
- } else if (0 < expDiff) {
- if (aExp == 0x7FF) {
- bool propagate = (aFracHi | aFracLo) != 0u;
- return mix(a, __propagateFloat64NaN(a, b), propagate);
- }
-
- expDiff = mix(expDiff, expDiff - 1, bExp == 0);
- bFracHi = mix(bFracHi | 0x00100000u, bFracHi, bExp == 0);
- __shift64ExtraRightJamming(
- bFracHi, bFracLo, 0u, expDiff, bFracHi, bFracLo, zFrac2);
- zExp = aExp;
} else {
- if (bExp == 0x7FF) {
- bool propagate = (bFracHi | bFracLo) != 0u;
- return mix(__packFloat64(aSign, 0x7ff, 0u, 0u), __propagateFloat64NaN(a, b), propagate);
+ if (0 < expDiff) {
+ if (aExp == 0x7FF) {
+ bool propagate = (aFracHi | aFracLo) != 0u;
+ return mix(a, __propagateFloat64NaN(a, b), propagate);
+ }
+
+ expDiff = mix(expDiff, expDiff - 1, bExp == 0);
+ bFracHi = mix(bFracHi | 0x00100000u, bFracHi, bExp == 0);
+ __shift64ExtraRightJamming(
+ bFracHi, bFracLo, 0u, expDiff, bFracHi, bFracLo, zFrac2);
+ zExp = aExp;
+ } else {
+ if (bExp == 0x7FF) {
+ bool propagate = (bFracHi | bFracLo) != 0u;
+ return mix(__packFloat64(aSign, 0x7ff, 0u, 0u), __propagateFloat64NaN(a, b), propagate);
+ }
+ expDiff = mix(expDiff, expDiff + 1, aExp == 0);
+ aFracHi = mix(aFracHi | 0x00100000u, aFracHi, aExp == 0);
+ __shift64ExtraRightJamming(
+ aFracHi, aFracLo, 0u, - expDiff, aFracHi, aFracLo, zFrac2);
+ zExp = bExp;
}
- expDiff = mix(expDiff, expDiff + 1, aExp == 0);
- aFracHi = mix(aFracHi | 0x00100000u, aFracHi, aExp == 0);
- __shift64ExtraRightJamming(
- aFracHi, aFracLo, 0u, - expDiff, aFracHi, aFracLo, zFrac2);
- zExp = bExp;
}
if (!orig_exp_diff_is_zero) {
aFracHi |= 0x00100000u;