From bd2721dc7a2bd3376e01ff32c18737a6fa38ff42 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 18 May 2014 06:35:33 -0700 Subject: Use _mm_setr_ps instead of _mm_set_ps Apparently _mm_set_ps loads in reverse order compared to _mm_load_ps, so _mm_setr_ps should give what we really want. --- Alc/mixer_sse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Alc') diff --git a/Alc/mixer_sse.c b/Alc/mixer_sse.c index e8bc6076..250181fe 100644 --- a/Alc/mixer_sse.c +++ b/Alc/mixer_sse.c @@ -25,7 +25,7 @@ static inline void ApplyCoeffsStep(ALuint Offset, ALfloat (*restrict Values)[2], const ALfloat (*restrict CoeffStep)[2], ALfloat left, ALfloat right) { - const __m128 lrlr = _mm_set_ps(left, right, left, right); + const __m128 lrlr = _mm_setr_ps(left, right, left, right); __m128 coeffs, deltas, imp0, imp1; __m128 vals = _mm_setzero_ps(); ALuint i; @@ -86,7 +86,7 @@ static inline void ApplyCoeffs(ALuint Offset, ALfloat (*restrict Values)[2], ALfloat (*restrict Coeffs)[2], ALfloat left, ALfloat right) { - const __m128 lrlr = _mm_set_ps(left, right, left, right); + const __m128 lrlr = _mm_setr_ps(left, right, left, right); __m128 vals = _mm_setzero_ps(); __m128 coeffs; ALuint i; @@ -157,7 +157,7 @@ void MixDirect_SSE(DirectParams *params, const ALfloat *restrict data, ALuint sr /* Mix with applying gain steps in aligned multiples of 4. */ if(BufferSize-pos > 3 && Counter-pos > 3) { - gain = _mm_set_ps( + gain = _mm_setr_ps( DrySend, DrySend * Step, DrySend * Step * Step, @@ -220,7 +220,7 @@ void MixSend_SSE(SendParams *params, const ALfloat *restrict data, { if(BufferSize-pos > 3 && Counter-pos > 3) { - gain = _mm_set_ps( + gain = _mm_setr_ps( WetGain, WetGain * Step, WetGain * Step * Step, -- cgit v1.2.3