Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-08-24 15:32:56 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-09-04 15:04:22 +0300
commit95d871c1a2a32cc4c1d7afe0cffc777fc45b9421 (patch)
treef8c2dea85e5991c90ddaa98e9f7d025a9e2611ab
parent4b90830cac85761587e5cc596f653c97c1ada64c (diff)
Cycles: FIx issue with -0 being considered a non-finite value
-rw-r--r--intern/cycles/util/util_math.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index b719640b19c..d28f2ba436b 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -223,7 +223,7 @@ ccl_device_inline bool isfinite_safe(float f)
{
/* By IEEE 754 rule, 2*Inf equals Inf */
unsigned int x = __float_as_uint(f);
- return (f == f) && (x == 0 || (f != 2.0f*f)) && !((x << 1) > 0xff000000u);
+ return (f == f) && (x == 0 || x == (1 << 31) || (f != 2.0f*f)) && !((x << 1) > 0xff000000u);
}
ccl_device_inline float ensure_finite(float v)