From d35c10beb6a8fabe8a4db8a4e724ec354bad74dd Mon Sep 17 00:00:00 2001 From: fp64 <106717720+fp64@users.noreply.github.com> Date: Thu, 21 Dec 2023 11:55:45 -0500 Subject: [PATCH] Fix texture upscaler bug Was not actually affecting anything, since this path is not used. Still better fix it, for correctness sake. --- GPU/Common/TextureScalerCommon.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/Common/TextureScalerCommon.cpp b/GPU/Common/TextureScalerCommon.cpp index 40e686bdde8c..a02ada92ff5e 100644 --- a/GPU/Common/TextureScalerCommon.cpp +++ b/GPU/Common/TextureScalerCommon.cpp @@ -236,7 +236,7 @@ static void load_sample(ptrdiff_t w, ptrdiff_t h, ptrdiff_t s, const u8 *pixels, break; case 2: // Zero memset(output, 0, 4); - break; + return; } } memcpy(output, pixels + s*y + 4*x, 4); @@ -395,7 +395,7 @@ static void upscale_block_sse2( _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(S(0)), C0), _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(S(1)), C1), _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(S(2)), C2), - _mm_mul_ps(_mm_loadu_ps(S(3)), C3))))); + _mm_mul_ps(_mm_loadu_ps(S(3)), C3))))); #undef S } // Vertical pass. @@ -410,7 +410,7 @@ static void upscale_block_sse2( _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(S(0)), C0), _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(S(1)), C1), _mm_add_ps(_mm_mul_ps(_mm_loadu_ps(S(2)), C2), - _mm_mul_ps(_mm_loadu_ps(S(3)), C3))))); + _mm_mul_ps(_mm_loadu_ps(S(3)), C3))))); #undef S } // Pack destination pixels.