diff options
author | Laurent Rineau <laurent.rineau@cgal.org> | 2020-06-11 12:55:17 +0200 |
---|---|---|
committer | Laurent Rineau <laurent.rineau@cgal.org> | 2020-08-31 16:33:24 +0200 |
commit | d41b639cc46e5d76aa7f779e6ef37bfd4e6c2e72 (patch) | |
tree | dc1a26e6020ce24d0a2e37df02215a9ff18cb50b | |
parent | d8b98b3e236bb2dcec0b8082d9a59c54efc63bca (diff) |
Fix compilation error with -no-avx2
Change-Id: I1aa49328226d5e3f1da4bd86704c7fad44da6ad9
Pick-to: 5.15 5.14
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | src/core/transforms/vector3d_sse.cpp | 4 | ||||
-rw-r--r-- | src/core/transforms/vector3d_sse_p.h | 4 |
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); |