1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 01:24:11 +01:00

[util] replaceNaN: Use unaligned SIMD _mm_loadu_ps

There is no good reason to expect games will have aligned the data they're passing in.
This commit is contained in:
Alpyne 2022-10-09 02:54:20 -07:00 committed by Joshie
parent 0236e780a7
commit 5d29140f74

View File

@ -153,7 +153,7 @@ namespace dxvk {
inline Vector4 replaceNaN(Vector4 a) {
#ifdef DXVK_ARCH_X86
Vector4 result;
__m128 value = _mm_load_ps(a.data);
__m128 value = _mm_loadu_ps(a.data);
__m128 mask = _mm_cmpeq_ps(value, value);
value = _mm_and_ps(value, mask);
_mm_store_ps(result.data, value);