microsoft / DirectXMath

DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
https://walbourn.github.io/introducing-directxmath/
MIT License
1.52k stars 234 forks source link

Fixed overread problem with XMUNIBBLE4 and other 16-bit packed types #128

Closed walbourn closed 2 years ago

walbourn commented 2 years ago

The load functions for the following packed types all read 32-bits even though the data types 16-bits. It mostly works, except at the end of a tight buffer.

I changed from using _mm_load1_ps to _mm_loadu_si16. This is still SSEv1. Note the Store functions never had this problem.