summaryrefslogtreecommitdiffstats
path: root/src/core/transforms
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2018-01-26 11:25:36 +0000
committerSean Harmer <sean.harmer@kdab.com>2018-01-26 11:52:26 +0000
commit6d56b53bb949caa3e592070794b3010e4801e0ca (patch)
tree7b68a96c5a43da03f9126a2d30d5c7d05fe7793b /src/core/transforms
parente1b0e10340cf0a9c233774647cf316a7519a2093 (diff)
parent1360f39aa811df96c2762cf081702f7a86a782cd (diff)
Merge branch '5.10' into dev
Diffstat (limited to 'src/core/transforms')
-rw-r--r--src/core/transforms/matrix4x4_p.h8
-rw-r--r--src/core/transforms/vector3d_p.h5
-rw-r--r--src/core/transforms/vector4d_p.h5
3 files changed, 14 insertions, 4 deletions
diff --git a/src/core/transforms/matrix4x4_p.h b/src/core/transforms/matrix4x4_p.h
index 1aded0f9c..18f5db4c3 100644
--- a/src/core/transforms/matrix4x4_p.h
+++ b/src/core/transforms/matrix4x4_p.h
@@ -52,8 +52,12 @@
//
#include <private/qsimd_p.h>
+#include <Qt3DCore/private/qt3dcore-config_p.h>
-#if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_AVX2)
+
+// We check if sse or avx config option was enabled as it could
+// be disabled even though a given platform supports SSE2 or AVX2 instructions
+#if QT_CONFIG(qt3d_simd_avx2) && defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_AVX2)
#include <Qt3DCore/private/matrix4x4_avx2_p.h>
@@ -61,7 +65,7 @@ QT_BEGIN_NAMESPACE
using Matrix4x4 = Qt3DCore::Matrix4x4_AVX2;
QT_END_NAMESPACE
-#elif defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSE2)
+#elif QT_CONFIG(qt3d_simd_sse2) && defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSE2)
#include <Qt3DCore/private/matrix4x4_sse_p.h>
diff --git a/src/core/transforms/vector3d_p.h b/src/core/transforms/vector3d_p.h
index fa72c9f2f..6467d7686 100644
--- a/src/core/transforms/vector3d_p.h
+++ b/src/core/transforms/vector3d_p.h
@@ -52,8 +52,11 @@
//
#include <private/qsimd_p.h>
+#include <Qt3DCore/private/qt3dcore-config_p.h>
-#if (defined(__AVX2__) || defined(__SSE2__)) && defined(QT_COMPILER_SUPPORTS_SSE2)
+// We check if sse config option was enabled as it could
+// be disabled even though a given platform supports SSE2 instructions
+#if QT_CONFIG(qt3d_simd_sse2) && (defined(__AVX2__) || defined(__SSE2__)) && defined(QT_COMPILER_SUPPORTS_SSE2)
#include <Qt3DCore/private/vector3d_sse_p.h>
diff --git a/src/core/transforms/vector4d_p.h b/src/core/transforms/vector4d_p.h
index 584eb470b..a03dc234f 100644
--- a/src/core/transforms/vector4d_p.h
+++ b/src/core/transforms/vector4d_p.h
@@ -52,8 +52,11 @@
//
#include <private/qsimd_p.h>
+#include <Qt3DCore/private/qt3dcore-config_p.h>
-#if (defined(__AVX2__) || defined(__SSE2__)) && defined(QT_COMPILER_SUPPORTS_SSE2)
+// We check if sse config option was enabled as it could
+// be disabled even though a given platform supports SSE2 instructions
+#if QT_CONFIG(qt3d_simd_sse2) && (defined(__AVX2__) || defined(__SSE2__)) && defined(QT_COMPILER_SUPPORTS_SSE2)
#include <Qt3DCore/private/vector4d_sse_p.h>