summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelasota <ejlasota@gmail.com>2018-08-21 22:21:56 -0400
committerelasota <ejlasota@gmail.com>2018-08-21 22:21:56 -0400
commit04410346bb15c49619f54ed439eff10c31b8c70d (patch)
tree775702584f2716a12b46c991dd22249039c8502f
parent0e6551d8e2c080149bedcefd6c9dd0061261ea3f (diff)
Fix Squish SSE misconfiguration
-rw-r--r--modules/squish/image_compress_squish.cpp6
-rw-r--r--thirdparty/squish/config.h20
2 files changed, 20 insertions, 6 deletions
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index f6be537413..6aaabb9d9b 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -32,12 +32,6 @@
#include "print_string.h"
-#if defined(__SSE2__)
-#define SQUISH_USE_SSE 2
-#elif defined(__SSE__)
-#define SQUISH_USE_SSE 1
-#endif
-
#include <squish.h>
void image_decompress_squish(Image *p_image) {
diff --git a/thirdparty/squish/config.h b/thirdparty/squish/config.h
index 92edefe966..05f8d72598 100644
--- a/thirdparty/squish/config.h
+++ b/thirdparty/squish/config.h
@@ -32,6 +32,26 @@
#endif
// Set to 1 or 2 when building squish to use SSE or SSE2 instructions.
+// -- GODOT start --
+#ifdef _MSC_VER
+ #if defined(_M_IX86_FP)
+ #if _M_IX86_FP >= 2
+ #define SQUISH_USE_SSE 2
+ #elif _M_IX86_FP >= 1
+ #define SQUISH_USE_SSE 1
+ #endif
+ #elif defined(_M_X64)
+ #define SQUISH_USE_SSE 2
+ #endif
+#else
+ #if defined(__SSE2__)
+ #define SQUISH_USE_SSE 2
+ #elif defined(__SSE__)
+ #define SQUISH_USE_SSE 1
+ #endif
+#endif
+// -- GODOT end --
+
#ifndef SQUISH_USE_SSE
#define SQUISH_USE_SSE 0
#endif