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:
authorJoseph Eagar <joeedh@gmail.com>2022-03-24 00:24:46 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-03-24 00:24:46 +0300
commit2f3ace40240797100161a659a12d995e1480b91b (patch)
tree89009e559a038b6788024076ed5e9743ed2b4c10 /intern/cycles/util/math_float4.h
parentf42d3caecdde37bdc873a66fbdc5685bf7050fb1 (diff)
parentd84b4becd3bce34b75385155535b17d77f68578a (diff)
Merge branch 'master' into temp-sculpt-colors
Diffstat (limited to 'intern/cycles/util/math_float4.h')
-rw-r--r--intern/cycles/util/math_float4.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/util/math_float4.h b/intern/cycles/util/math_float4.h
index 9f4a1a904b5..5d4da7dd30f 100644
--- a/intern/cycles/util/math_float4.h
+++ b/intern/cycles/util/math_float4.h
@@ -90,13 +90,13 @@ ccl_device_inline float4 zero_float4()
#ifdef __KERNEL_SSE__
return float4(_mm_setzero_ps());
#else
- return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
+ return make_float4(0.0f);
#endif
}
ccl_device_inline float4 one_float4()
{
- return make_float4(1.0f, 1.0f, 1.0f, 1.0f);
+ return make_float4(1.0f);
}
#if !defined(__KERNEL_METAL__)
@@ -149,7 +149,7 @@ ccl_device_inline float4 operator/(const float4 &a, const float4 &b)
ccl_device_inline float4 operator+(const float4 &a, const float f)
{
- return a + make_float4(f, f, f, f);
+ return a + make_float4(f);
}
ccl_device_inline float4 operator+(const float4 &a, const float4 &b)
@@ -163,7 +163,7 @@ ccl_device_inline float4 operator+(const float4 &a, const float4 &b)
ccl_device_inline float4 operator-(const float4 &a, const float f)
{
- return a - make_float4(f, f, f, f);
+ return a - make_float4(f);
}
ccl_device_inline float4 operator-(const float4 &a, const float4 &b)
@@ -297,7 +297,7 @@ ccl_device_inline float4 cross(const float4 &a, const float4 &b)
ccl_device_inline bool is_zero(const float4 &a)
{
# ifdef __KERNEL_SSE__
- return a == make_float4(0.0f);
+ return a == zero_float4();
# else
return (a.x == 0.0f && a.y == 0.0f && a.z == 0.0f && a.w == 0.0f);
# endif
@@ -317,7 +317,7 @@ ccl_device_inline float4 reduce_add(const float4 &a)
# endif
# else
float sum = (a.x + a.y) + (a.z + a.w);
- return make_float4(sum, sum, sum, sum);
+ return make_float4(sum);
# endif
}
@@ -458,7 +458,7 @@ ccl_device_inline float4 select(const int4 &mask, const float4 &a, const float4
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
{
/* Replace elements of x with zero where mask isn't set. */
- return select(mask, a, make_float4(0.0f));
+ return select(mask, a, zero_float4());
}
ccl_device_inline float4 reduce_min(const float4 &a)