[Bf-blender-cvs] [4776d80] master: Disable msvc runtime fma3 use in an attempt to fix msvc 2013 + windows 7 issues. MS report: https://connect.microsoft.com/VisualStudio/feedback/details/811093

Martijn Berger noreply at git.blender.org
Fri Sep 5 11:11:56 CEST 2014


Commit: 4776d80aaae49bef921149bf1ab7d60f87fff7fc
Author: Martijn Berger
Date:   Fri Sep 5 11:09:54 2014 +0200
Branches: master
https://developer.blender.org/rB4776d80aaae49bef921149bf1ab7d60f87fff7fc

Disable msvc runtime fma3 use in an attempt to fix msvc 2013 + windows 7 issues.
MS report:
https://connect.microsoft.com/VisualStudio/feedback/details/811093

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

M	source/creator/creator.c

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

diff --git a/source/creator/creator.c b/source/creator/creator.c
index 70e6aba..412ff37 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -41,6 +41,9 @@
 #endif
 
 #ifdef WIN32
+#  if defined(_MSC_VER) && _MSC_VER >= 1800 && defined(_M_X64)
+#    include <math.h> /* needed for _set_FMA3_enable */
+#  endif
 #  include <windows.h>
 #  include "utfconv.h"
 #endif
@@ -1501,7 +1504,13 @@ int main(
 	bArgs *ba;
 #endif
 
-#ifdef WIN32 /* Win32 Unicode Args */
+#ifdef WIN32
+    /* FMA3 support in the 2013 CRT is broken on Vista and Windows 7 RTM (fixed in SP1). Just disable it. */
+#  if defined(_MSC_VER) && _MSC_VER >= 1800 && defined(_M_X64)
+    _set_FMA3_enable(0);
+#  endif
+
+	/* Win32 Unicode Args */
 	/* NOTE: cannot use guardedalloc malloc here, as it's not yet initialized
 	 *       (it depends on the args passed in, which is what we're getting here!)
 	 */




More information about the Bf-blender-cvs mailing list