summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2020-03-02 18:31:01 -0800
committerMarge Bot <[email protected]>2020-03-18 20:36:29 +0000
commitf6992bf62440e847ca129ea9f79862fa5ff4c35f (patch)
treef59c934c74b83081ec6efc34b483b8c17a20f943 /src/compiler
parentde4acd8816cb02b65ade3ddafeffc194ff97f35e (diff)
soft-fp64/fneg: Don't treat NaN specially
__fabs64 doesn't do anything special, and the value is still NaN regardless of the value of the MSB. In a strict sense, it's possible that both functions should set the "signal" bit. lts on the 308 shaders extracted from the fp64 portion of the OpenGL CTS: Tiger Lake and Ice Lake had similar results. (Tiger Lake shown) total instructions in shared programs: 844558 -> 843005 (-0.18%) instructions in affected programs: 725975 -> 724422 (-0.21%) helped: 53 HURT: 4 helped stats (abs) min: 1 max: 313 x̄: 29.87 x̃: 21 helped stats (rel) min: 0.01% max: 0.94% x̄: 0.30% x̃: 0.22% HURT stats (abs) min: 4 max: 11 x̄: 7.50 x̃: 7 HURT stats (rel) min: 0.03% max: 0.09% x̄: 0.05% x̃: 0.04% 95% mean confidence interval for instructions value: -39.02 -15.47 95% mean confidence interval for instructions %-change: -0.34% -0.21% Instructions are helped. total cycles in shared programs: 6962024 -> 6944998 (-0.24%) cycles in affected programs: 6185470 -> 6168444 (-0.28%) helped: 59 HURT: 0 helped stats (abs) min: 64 max: 2863 x̄: 288.58 x̃: 208 helped stats (rel) min: 0.11% max: 0.87% x̄: 0.33% x̃: 0.27% 95% mean confidence interval for cycles value: -387.15 -190.00 95% mean confidence interval for cycles %-change: -0.38% -0.28% Cycles are helped. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4142>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/float64.glsl5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compiler/glsl/float64.glsl b/src/compiler/glsl/float64.glsl
index 7c6f18d962e..7f6d3a86e34 100644
--- a/src/compiler/glsl/float64.glsl
+++ b/src/compiler/glsl/float64.glsl
@@ -88,10 +88,7 @@ uint64_t
__fneg64(uint64_t __a)
{
uvec2 a = unpackUint2x32(__a);
- uint t = a.y;
-
- t ^= (1u << 31);
- a.y = mix(t, a.y, __is_nan(__a));
+ a.y ^= (1u << 31);
return packUint2x32(a);
}