From 01090f4ce72c4d69a3e473d3a8f2f64bb605c6d3 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 18 Jan 2014 16:39:46 -0800 Subject: [PATCH] softgpu: Respect the texture filering option. Nearest is much faster, so you can force it to nearest for a good boost in speed. --- GPU/Software/Rasterizer.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/GPU/Software/Rasterizer.cpp b/GPU/Software/Rasterizer.cpp index f1e6c0c6ba..4c5aeafe40 100644 --- a/GPU/Software/Rasterizer.cpp +++ b/GPU/Software/Rasterizer.cpp @@ -18,6 +18,7 @@ #include "base/basictypes.h" #include "Common/ThreadPools.h" +#include "Core/Config.h" #include "Core/MemMap.h" #include "Core/Reporting.h" #include "GPU/GPUState.h" @@ -858,6 +859,14 @@ void DrawTriangleSlice( int maxTexLevel = (gstate.texmode >> 16) & 7; u8 *texptr[8] = {NULL}; + int magFilt = (gstate.texfilter>>8) & 1; + if (g_Config.iTexFiltering > 1) { + if (g_Config.iTexFiltering == 2) { + magFilt = 0; + } else if (g_Config.iTexFiltering == 3) { + magFilt = 1; + } + } if ((gstate.texfilter & 4) == 0) { // No mipmapping enabled maxTexLevel = 0; @@ -937,8 +946,6 @@ void DrawTriangleSlice( int frac_u, frac_v; int texlevel = 0; - - int magFilt = (gstate.texfilter>>8) & 1; bool bilinear = magFilt != 0; // bilinear = false;