SSE HMM_EqualsVec4

This commit is contained in:
Zakary Strange
2020-01-11 18:56:15 -08:00
parent 9d5baac382
commit 81659df32d
2 changed files with 9 additions and 2 deletions

View File

@@ -1002,8 +1002,14 @@ COVERAGE(HMM_EqualsVec4, 1)
HMM_INLINE hmm_bool HMM_EqualsVec4(hmm_vec4 Left, hmm_vec4 Right)
{
ASSERT_COVERED(HMM_EqualsVec4);
hmm_bool Result;
hmm_bool Result = (Left.X == Right.X && Left.Y == Right.Y && Left.Z == Right.Z && Left.W == Right.W);
#if HANDMADE_MATH__USE_SSE
Result = _mm_movemask_ps(_mm_cmpeq_ps(Left.InternalElementsSSE, Right.InternalElementsSSE)) == 0xF ? 1 : 0;
#else
Result = (Left.X == Right.X && Left.Y == Right.Y && Left.Z == Right.Z && Left.W == Right.W);
#endif
return (Result);
}

View File

@@ -10,7 +10,8 @@ To get started, go download [the latest release](https://github.com/HandmadeMath
Version | Changes |
----------------|----------------|
**1.10.1** | Removed stdint.h, this doesn't exist on some really old compilers and we didn't really use it anyways. |
**1.10.2** | Introduced safe floating point comparrision in HMM_EqualsVec2, HMM_EqualsVec3, HMM_EqualsVec4. |
**1.10.1** | Removed use of stdint.h, this doesn't exist on some really old compilers and we didn't really use it anyways. |
**1.10.0** | Made HMM_Perspective use vertical FOV instead of horizontal FOV for consistency with other graphics APIs. |
**1.9.0** | Added SSE versions of quaternion operations. |
**1.8.0** | Added fast vector normalization routines that use fast inverse square roots.