[Bf-blender-cvs] [b797a5ff78] master: Cycles: Cleanup, move utility function to utility file
Sergey Sharybin
noreply at git.blender.org
Thu Mar 23 18:05:14 CET 2017
Commit: b797a5ff7849b6c32c7aefeccbf52445c9ccc597
Author: Sergey Sharybin
Date: Thu Mar 23 12:55:51 2017 +0100
Branches: master
https://developer.blender.org/rBb797a5ff7849b6c32c7aefeccbf52445c9ccc597
Cycles: Cleanup, move utility function to utility file
Was an old TODO, this function is handy for some math utilities as well.
===================================================================
M intern/cycles/kernel/geom/geom_triangle_intersect.h
M intern/cycles/util/util_math.h
===================================================================
diff --git a/intern/cycles/kernel/geom/geom_triangle_intersect.h b/intern/cycles/kernel/geom/geom_triangle_intersect.h
index 4f4ee93c07..ca6e54c6b3 100644
--- a/intern/cycles/kernel/geom/geom_triangle_intersect.h
+++ b/intern/cycles/kernel/geom/geom_triangle_intersect.h
@@ -96,12 +96,6 @@ void triangle_intersect_precalc(float3 dir,
isect_precalc->kz = kz;
}
-/* TODO(sergey): Make it general utility function. */
-ccl_device_inline float xor_signmask(float x, int y)
-{
- return __int_as_float(__float_as_int(x) ^ y);
-}
-
ccl_device_inline bool triangle_intersect(KernelGlobals *kg,
const IsectPrecalc *isect_precalc,
Intersection *isect,
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index 329b7f645c..a41beab628 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -1451,6 +1451,11 @@ ccl_device_inline float beta(float x, float y)
#endif
}
+ccl_device_inline float xor_signmask(float x, int y)
+{
+ return __int_as_float(__float_as_int(x) ^ y);
+}
+
/* projections */
ccl_device_inline float2 map_to_tube(const float3 co)
{
More information about the Bf-blender-cvs
mailing list