fixes for "simd, sse: use 0x80000000 insteaf of -0.f to fix fastmath on msvc"

This commit is contained in:
Recep Aslantas
2023-04-21 22:42:04 +03:00
parent 5ce7dff812
commit a4b8778be9
2 changed files with 3 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ glm_mat4_det_sse2(mat4 mat) {
_mm_shuffle_ps(x0, x1, _MM_SHUFFLE(2, 2, 3, 1)),
x2);
x2 = _mm_xor_ps(x2, glmm_float32x4_SIGNMASK_PNPN);
x2 = _mm_xor_ps(x2, glmm_float32x4_SIGNMASK_NPNP);
return glmm_hadd(_mm_mul_ps(x2, r0));
}

View File

@@ -64,8 +64,8 @@
#define glmm_float32x4_SIGNMASK_NPNP GLMM__SIGNMASKf(GLMM_NEGZEROf, 0, GLMM_NEGZEROf, 0)
#define glmm_float32x4_SIGNMASK_NPPN GLMM__SIGNMASKf(GLMM_NEGZEROf, 0, 0, GLMM_NEGZEROf)
#define glmm_float32x4_SIGNMASK_NEG _mm_set1_ps(GLMM_NEGZEROf)
#define glmm_float32x8_SIGNMASK_NEG _mm256_castsi256_ps(_mm256_set1_epi32(GLMM_NEGZEROf));
#define glmm_float32x4_SIGNMASK_NEG _mm_castsi128_ps(_mm_set1_epi32(0x80000000)) /* _mm_set1_ps(-0.0f) */
#define glmm_float32x8_SIGNMASK_NEG _mm256_castsi256_ps(_mm256_set1_epi32(GLMM_NEGZEROf))
static inline
__m128