Skip to content

Commit 89689e6

Browse files
committed
Minor XMLoadFloat3A SSE4 optimization
1 parent 6504050 commit 89689e6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Inc/DirectXMathConvert.inl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,10 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat3A(const XMFLOAT3A* pSource) noexcept
541541
float32x4_t V = vld1q_f32(reinterpret_cast<const float*>(pSource));
542542
#endif
543543
return vsetq_lane_f32(0, V, 3);
544+
#elif defined(_XM_SSE4_INTRINSICS_)
545+
// Reads an extra float which is zero'd
546+
__m128 V = _mm_load_ps(&pSource->x);
547+
return _mm_blend_ps(_mm_setzero_ps(), V, 0x7);
544548
#elif defined(_XM_SSE_INTRINSICS_)
545549
// Reads an extra float which is zero'd
546550
__m128 V = _mm_load_ps(&pSource->x);

0 commit comments

Comments
 (0)