[Bf-blender-cvs] [8f8b9b5] master: Fix T41066: MSVC + AVX2 kernel causes artifacts in hair render.
Thomas Dinges
noreply at git.blender.org
Wed Nov 12 11:52:07 CET 2014
Commit: 8f8b9b58f6650e104a04670f43d2ef81f861efcd
Author: Thomas Dinges
Date: Wed Nov 12 11:51:49 2014 +0100
Branches: master
https://developer.blender.org/rB8f8b9b58f6650e104a04670f43d2ef81f861efcd
Fix T41066: MSVC + AVX2 kernel causes artifacts in hair render.
The issue lies in the FMA functions, so disable them on Windows for now.
===================================================================
M intern/cycles/kernel/kernel_types.h
M intern/cycles/util/util_ssef.h
===================================================================
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 7d9bebf..25b13f7 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -543,7 +543,7 @@ typedef enum AttributeStandard {
* could be simply a compilers bug for which we can't find a generic
* platform independent workaround. Also even if it's a compiler
* issue, it's not so simple to upgrade the compiler in the release
- * environment for linux and doing it so closer to the release is
+ * environment for Linux and doing it so closer to the release is
* rather a risky business.
*
* For this release it's probably safer to stick with such a rather
@@ -997,7 +997,7 @@ typedef struct KernelData {
#ifdef __KERNEL_DEBUG__
typedef struct DebugData {
- // Total number of BVH node travesal steps and primitives intersections
+ // Total number of BVH node traversal steps and primitives intersections
// for the camera rays.
int num_bvh_traversal_steps;
} DebugData;
diff --git a/intern/cycles/util/util_ssef.h b/intern/cycles/util/util_ssef.h
index f4236cc..5e452ea 100644
--- a/intern/cycles/util/util_ssef.h
+++ b/intern/cycles/util/util_ssef.h
@@ -151,7 +151,7 @@ __forceinline ssef maxi(const ssef& a, const ssef& b) {
/// Ternary Operators
////////////////////////////////////////////////////////////////////////////////
-#if defined(__KERNEL_AVX2__)
+#if defined(__KERNEL_AVX2__) && !defined(_MSC_VER) // see T41066
__forceinline const ssef madd (const ssef& a, const ssef& b, const ssef& c) { return _mm_fmadd_ps(a,b,c); }
__forceinline const ssef msub (const ssef& a, const ssef& b, const ssef& c) { return _mm_fmsub_ps(a,b,c); }
__forceinline const ssef nmadd(const ssef& a, const ssef& b, const ssef& c) { return _mm_fnmadd_ps(a,b,c); }
More information about the Bf-blender-cvs
mailing list