diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/mixer/mixer_sse2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Alc/mixer/mixer_sse2.c b/Alc/mixer/mixer_sse2.c index 4aeb6fc4..e0198022 100644 --- a/Alc/mixer/mixer_sse2.c +++ b/Alc/mixer/mixer_sse2.c @@ -49,7 +49,7 @@ const ALfloat *Resample_lerp_SSE2(const InterpState* UNUSED(state), for(i = 0;numsamples-i > 3;i += 4) { - const __m128 val1 = _mm_setr_ps(src[pos_.i[0]], src[pos_.i[1]], src[pos_.i[2]], src[pos_.i[3]]); + const __m128 val1 = _mm_setr_ps(src[pos_.i[0] ], src[pos_.i[1] ], src[pos_.i[2] ], src[pos_.i[3] ]); const __m128 val2 = _mm_setr_ps(src[pos_.i[0]+1], src[pos_.i[1]+1], src[pos_.i[2]+1], src[pos_.i[3]+1]); /* val1 + (val2-val1)*mu */ @@ -63,7 +63,10 @@ const ALfloat *Resample_lerp_SSE2(const InterpState* UNUSED(state), pos4 = _mm_add_epi32(pos4, _mm_srli_epi32(frac4, FRACTIONBITS)); frac4 = _mm_and_si128(frac4, fracMask4); - _mm_store_ps(pos_.f, _mm_castsi128_ps(pos4)); + pos_.i[0] = _mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(0, 0, 0, 0))); + pos_.i[1] = _mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(1, 1, 1, 1))); + pos_.i[2] = _mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(2, 2, 2, 2))); + pos_.i[3] = _mm_cvtsi128_si32(_mm_shuffle_epi32(pos4, _MM_SHUFFLE(3, 3, 3, 3))); } /* NOTE: These four elements represent the position *after* the last four |