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>2016-10-27 13:51:03 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-10-27 13:51:03 +0300
commitf11298692b93c79132b77d0795e6bd6080c62480 (patch)
tree84bf77b02c62d00a1d63c22bcf230dffbb3fe751
parent7e380ad4c0236e6e572023e85694acec3da28e6e (diff)
Cycles: More workarounds for weird crashes on AVX2
Oh man, is it a compiler bug? Is it something we do stupid? For now more crap to prevent crashes. During the conference will talk to Maxyn about how can we troubleshoot such weird issues.
-rw-r--r--intern/cycles/util/util_math.h9
-rw-r--r--intern/cycles/util/util_transform.h5
2 files changed, 9 insertions, 5 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index f0c7492d88a..bd376e80c64 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -591,7 +591,8 @@ ccl_device_inline float len_squared(const float4& a)
ccl_device_inline float3 normalize(const float3& a)
{
-#if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
+ /* TODO(sergey): Disabled for now, causes crashes in certain cases. */
+#if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__) && 0
__m128 norm = _mm_sqrt_ps(_mm_dp_ps(a.m128, a.m128, 0x7F));
return _mm_div_ps(a.m128, norm);
#else
@@ -792,7 +793,8 @@ ccl_device_inline float4 operator-(const float4& a)
ccl_device_inline float4 operator*(const float4& a, const float4& b)
{
-#ifdef __KERNEL_SSE__
+ /* TODO(sergey): Disabled for now, causes crashes in certain cases. */
+#if defined(__KERNEL_SSE__) && 0
return _mm_mul_ps(a.m128, b.m128);
#else
return make_float4(a.x*b.x, a.y*b.y, a.z*b.z, a.w*b.w);
@@ -840,7 +842,8 @@ ccl_device_inline float4 operator/(const float4& a, const float4& b)
ccl_device_inline float4 operator+(const float4& a, const float4& b)
{
-#ifdef __KERNEL_SSE__
+ /* TODO(sergey): Disabled for now, causes crashes in certain cases. */
+#if defined(__KERNEL_SSE__) && 0
return _mm_add_ps(a.m128, b.m128);
#else
return make_float4(a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w);
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h
index a0695f20488..ea5eb3b25b0 100644
--- a/intern/cycles/util/util_transform.h
+++ b/intern/cycles/util/util_transform.h
@@ -74,7 +74,7 @@ ccl_device_inline float3 transform_perspective(const Transform *t, const float3
ccl_device_inline float3 transform_point(const Transform *t, const float3 a)
{
/* TODO(sergey): Disabled for now, causes crashes in certain cases. */
-#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE2__)
+#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE2__) && 0
ssef x, y, z, w, aa;
aa = a.m128;
@@ -103,7 +103,8 @@ ccl_device_inline float3 transform_point(const Transform *t, const float3 a)
ccl_device_inline float3 transform_direction(const Transform *t, const float3 a)
{
-#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE2__)
+ /* TODO(sergey): Disabled for now, causes crashes in certain cases. */
+#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE2__) && 0
ssef x, y, z, w, aa;
aa = a.m128;
x = _mm_loadu_ps(&t->x.x);