Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-02-14 16:20:51 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-02-17 18:26:24 +0300
commit859118d8f6ff022a16acbc6435488883424bad25 (patch)
treee0f708929a884070f7c3758f7fb58527cbdfd555 /source/blender/modifiers/intern/MOD_meshdeform.c
parentac680c569e1b979f20c2e81dbd4f232085141aad (diff)
BLI: add BLI_simd.h header to wrap SSE includes
In preparation of adding Neon support. Ref D8237, T78710
Diffstat (limited to 'source/blender/modifiers/intern/MOD_meshdeform.c')
-rw-r--r--source/blender/modifiers/intern/MOD_meshdeform.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c
index 4bd306e7679..a94dd6da477 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@ -24,6 +24,7 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
+#include "BLI_simd.h"
#include "BLI_task.h"
#include "BLT_translation.h"
@@ -61,10 +62,6 @@
#include "MOD_ui_common.h"
#include "MOD_util.h"
-#ifdef __SSE2__
-# include <emmintrin.h>
-#endif
-
static void initData(ModifierData *md)
{
MeshDeformModifierData *mmd = (MeshDeformModifierData *)md;
@@ -188,7 +185,7 @@ static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3
float gridvec[3], dvec[3], ivec[3], wx, wy, wz;
float weight, cageweight, totweight, *cageco;
int i, j, a, x, y, z, size;
-#ifdef __SSE2__
+#ifdef BLI_HAVE_SSE2
__m128 co = _mm_setzero_ps();
#else
float co[3] = {0.0f, 0.0f, 0.0f};
@@ -243,7 +240,7 @@ static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3
for (j = 0; j < cell->totinfluence; j++, inf++) {
cageco = dco[inf->vertex];
cageweight = weight * inf->weight;
-#ifdef __SSE2__
+#ifdef BLI_HAVE_SSE2
{
__m128 cageweight_r = _mm_set1_ps(cageweight);
/* This will load one extra element, this is ok because
@@ -261,7 +258,7 @@ static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3
}
}
-#ifdef __SSE2__
+#ifdef BLI_HAVE_SSE2
copy_v3_v3(vec, (float *)&co);
#else
copy_v3_v3(vec, co);