Page MenuHome
Paste P1315

Remove single argument make_float3
ActivePublic

Authored by Charlie Jolly (charlie) on Mar 27 2020, 3:07 PM.
diff --git a/intern/cycles/util/util_math_float3.h b/intern/cycles/util/util_math_float3.h
index dd2010715bab..137a23f1ed15 100644
--- a/intern/cycles/util/util_math_float3.h
+++ b/intern/cycles/util/util_math_float3.h
@@ -426,7 +426,7 @@ ccl_device_inline float3 sqr3(float3 a)
ccl_device_inline bool is_zero(const float3 a)
{
#ifdef __KERNEL_SSE__
- return a == make_float3(0.0f);
+ return a == make_float3(0.0f, 0.0f, 0.0f);
#else
return (a.x == 0.0f && a.y == 0.0f && a.z == 0.0f);
#endif
diff --git a/intern/cycles/util/util_types_float3.h b/intern/cycles/util/util_types_float3.h
index 694a600bf5c2..00e30039bf4b 100644
--- a/intern/cycles/util/util_types_float3.h
+++ b/intern/cycles/util/util_types_float3.h
@@ -50,7 +50,6 @@ struct ccl_try_align(16) float3
__forceinline float &operator[](int i);
};
-ccl_device_inline float3 make_float3(float f);
ccl_device_inline float3 make_float3(float x, float y, float z);
ccl_device_inline void print_float3(const char *label, const float3 &a);
#endif /* __KERNEL_GPU__ */
diff --git a/intern/cycles/util/util_types_float3_impl.h b/intern/cycles/util/util_types_float3_impl.h
index ab25fb4c9752..63687733bab9 100644
--- a/intern/cycles/util/util_types_float3_impl.h
+++ b/intern/cycles/util/util_types_float3_impl.h
@@ -72,16 +72,6 @@ __forceinline float &float3::operator[](int i)
return *(&x + i);
}
-ccl_device_inline float3 make_float3(float f)
-{
-# ifdef __KERNEL_SSE__
- float3 a(_mm_set1_ps(f));
-# else
- float3 a = {f, f, f, f};
-# endif
- return a;
-}
-
ccl_device_inline float3 make_float3(float x, float y, float z)
{
# ifdef __KERNEL_SSE__