[Bf-blender-cvs] [0ac2be7] master: Cycles: Disable AVX2 crash workarounds

Sergey Sharybin noreply at git.blender.org
Fri Dec 2 10:17:10 CET 2016


Commit: 0ac2be7030ee114e43407743c85ca72aade62e7e
Author: Sergey Sharybin
Date:   Fri Dec 2 10:15:24 2016 +0100
Branches: master
https://developer.blender.org/rB0ac2be7030ee114e43407743c85ca72aade62e7e

Cycles: Disable AVX2 crash workarounds

I can no longer reproduce crash with neither of the files where
the crash was originally visible. This is something where other
changes (light threshold, sampling) had an effect and made code
to work as it is supposed to. Could have been optimizator issue
or something like that.

Let's see if we hit same issue again.

===================================================================

M	intern/cycles/util/util_math.h
M	intern/cycles/util/util_transform.h

===================================================================

diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index 3f4d3e0..6cb68b5 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -596,8 +596,7 @@ ccl_device_inline float len_squared(const float4& a)
 
 ccl_device_inline float3 normalize(const float3& a)
 {
-	/* TODO(sergey): Disabled for now, causes crashes in certain cases. */
-#if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__) && 0
+#if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__)
 	__m128 norm = _mm_sqrt_ps(_mm_dp_ps(a.m128, a.m128, 0x7F));
 	return _mm_div_ps(a.m128, norm);
 #else
@@ -798,8 +797,7 @@ ccl_device_inline float4 operator-(const float4& a)
 
 ccl_device_inline float4 operator*(const float4& a, const float4& b)
 {
-	/* TODO(sergey): Disabled for now, causes crashes in certain cases. */
-#if defined(__KERNEL_SSE__) && 0
+#ifdef __KERNEL_SSE__
 	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);
@@ -847,8 +845,7 @@ ccl_device_inline float4 operator/(const float4& a, const float4& b)
 
 ccl_device_inline float4 operator+(const float4& a, const float4& b)
 {
-	/* TODO(sergey): Disabled for now, causes crashes in certain cases. */
-#if defined(__KERNEL_SSE__) && 0
+#ifdef __KERNEL_SSE__
 	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 ea5eb3b..a0695f2 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__) && 0
+#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE2__)
 	ssef x, y, z, w, aa;
 	aa = a.m128;
 
@@ -103,8 +103,7 @@ ccl_device_inline float3 transform_point(const Transform *t, const float3 a)
 
 ccl_device_inline float3 transform_direction(const Transform *t, const float3 a)
 {
-	/* TODO(sergey): Disabled for now, causes crashes in certain cases. */
-#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE2__) && 0
+#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE2__)
 	ssef x, y, z, w, aa;
 	aa = a.m128;
 	x = _mm_loadu_ps(&t->x.x);




More information about the Bf-blender-cvs mailing list