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>2017-04-10 15:42:17 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-10 15:44:07 +0300
commit3b4cc5dfed03d5e1d79c756349f25b6c63103991 (patch)
treeb555b8cd1671fefc61c13ab5614dc3a950604209
parent90d85c7975189f93042abddf2fdbd148ecf28b42 (diff)
Cycles: Workaround cubic volume filtering crashing on Linux
The issue was caused by recent change in inline policy. There is some sort of memory corruption happening here, ASAN suggests it's stack overflow issue. Not quite sure why it is happening tho and was not able to solve anything here yet in the past hours. Committing fix which works with a big TODO note. The issue is visible on AVX2 machine when rendering cycles_reports_test.
-rw-r--r--intern/cycles/kernel/kernel_compat_cpu.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h
index 459f1a28f63..21da180bb8e 100644
--- a/intern/cycles/kernel/kernel_compat_cpu.h
+++ b/intern/cycles/kernel/kernel_compat_cpu.h
@@ -404,7 +404,18 @@ template<typename T> struct texture_image {
return r;
}
- ccl_never_inline float4 interp_3d_ex_tricubic(float x, float y, float z)
+ /* TODO(sergey): For some unspeakable reason both GCC-6 and Clang-3.9 are
+ * causing stack overflow issue in this function unless it is inlined.
+ *
+ * Only happens for AVX2 kernel and global __KERNEL_SSE__ vectorization
+ * enabled.
+ */
+#ifdef __GNUC__
+ ccl_always_inline
+#else
+ ccl_never_inline
+#endif
+ float4 interp_3d_ex_tricubic(float x, float y, float z)
{
int ix, iy, iz;
int nix, niy, niz;