summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaurent Rineau <laurent.rineau@cgal.org>2020-06-11 12:55:17 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-08-31 15:39:13 +0000
commit8470b781f0c814435242f603ffe3394014b6bbcc (patch)
tree824b7236a4717512d2238232906a1e81785aa9db /src
parentaa13ce25a399f49d226a285e33506edda34d310b (diff)
Fix compilation error with -no-avx2
Change-Id: I1aa49328226d5e3f1da4bd86704c7fad44da6ad9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit d41b639cc46e5d76aa7f779e6ef37bfd4e6c2e72) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/core/transforms/vector3d_sse.cpp4
-rw-r--r--src/core/transforms/vector3d_sse_p.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/transforms/vector3d_sse.cpp b/src/core/transforms/vector3d_sse.cpp
index 151cbb959..3a369e29a 100644
--- a/src/core/transforms/vector3d_sse.cpp
+++ b/src/core/transforms/vector3d_sse.cpp
@@ -39,7 +39,7 @@
#include <private/qsimd_p.h>
-#ifdef __AVX2__
+#if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_AVX2)
#include "matrix4x4_avx2_p.h"
#else
#include "matrix4x4_sse_p.h"
@@ -66,7 +66,7 @@ Vector3D_SSE::Vector3D_SSE(const Vector4D_SSE &v)
m_xyzw = _mm_mul_ps(v.m_xyzw, _mm_set_ps(0.0f, 1.0f, 1.0f, 1.0f));
}
-#ifdef __AVX2__
+#if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_AVX2)
Vector3D_SSE Vector3D_SSE::unproject(const Matrix4x4_AVX2 &modelView, const Matrix4x4_AVX2 &projection, const QRect &viewport) const
{
diff --git a/src/core/transforms/vector3d_sse_p.h b/src/core/transforms/vector3d_sse_p.h
index 290cdfd3f..68e497652 100644
--- a/src/core/transforms/vector3d_sse_p.h
+++ b/src/core/transforms/vector3d_sse_p.h
@@ -178,7 +178,7 @@ public:
return ((_mm_movemask_ps(_mm_cmpeq_ps(m_xyzw, _mm_set_ps1(0.0f))) & 0x7) == 0x7);
}
-#ifdef __AVX2__
+#if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_AVX2)
Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE unproject(const Matrix4x4_AVX2 &modelView, const Matrix4x4_AVX2 &projection, const QRect &viewport) const;
Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE project(const Matrix4x4_AVX2 &modelView, const Matrix4x4_AVX2 &projection, const QRect &viewport) const;
#else
@@ -348,7 +348,7 @@ public:
friend class Vector4D_SSE;
-#ifdef __AVX2__
+#if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_AVX2)
friend class Matrix4x4_AVX2;
friend Vector3D_SSE operator*(const Vector3D_SSE &vector, const Matrix4x4_AVX2 &matrix);
friend Vector3D_SSE operator*(const Matrix4x4_AVX2 &matrix, const Vector3D_SSE &vector);