[Mesa-dev] [PATCH 1/3] Revert "nir/opcodes: Use fpclassify() instead of isnormal() for ldexp"

Jason Ekstrand jason at jlekstrand.net
Wed Jan 28 12:46:37 PST 2015


This reverts commit d7d340fb2f68c46bd5a0008ecf53c6693e29c916.

We have an isnormal() implementation available, the only problem was that
we had the wrong return type (fixed in a later patch).
---
 src/glsl/nir/nir_opcodes.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py
index 3f21539..f54a017 100644
--- a/src/glsl/nir/nir_opcodes.py
+++ b/src/glsl/nir/nir_opcodes.py
@@ -480,7 +480,7 @@ else
 opcode("ldexp", 0, tunsigned, [0, 0], [tfloat, tint], "", """
 dst = ldexp(src0, src1);
 /* flush denormals to zero. */
-if (fpclassify(dst) != FP_NORMAL)
+if (!isnormal(dst))
    dst = copysign(0.0f, src0);
 """)
 
-- 
2.2.2



More information about the mesa-dev mailing list