diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2016-03-26 03:25:01 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2016-03-26 03:25:01 +0100 |
| commit | 2fd08843475aaa023a7a1b8c56c7bf141b042e6c (patch) | |
| tree | 3a6a1c0d383d1bffcf9ac37df0361afa4da19006 /Source/Core/VideoBackends/Software/TextureSampler.cpp | |
| parent | ae4cb12033eb01df67cea1f054d44526fe093059 (diff) | |
| parent | 0b9a72a62d38481ff08f742b2318d07f29ff5dff (diff) | |
Merge pull request #3672 from EmptyChaos/d3d-anisotropy
Fix D3D Forced Anisotropy
Diffstat (limited to 'Source/Core/VideoBackends/Software/TextureSampler.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/TextureSampler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/TextureSampler.cpp b/Source/Core/VideoBackends/Software/TextureSampler.cpp index 6c1001a6c8..b5049cb6a3 100644 --- a/Source/Core/VideoBackends/Software/TextureSampler.cpp +++ b/Source/Core/VideoBackends/Software/TextureSampler.cpp @@ -10,6 +10,7 @@ #include "VideoBackends/Software/TextureSampler.h" #include "VideoCommon/BPMemory.h" +#include "VideoCommon/SamplerCommon.h" #include "VideoCommon/TextureDecoder.h" #define ALLOW_MIPMAP 1 @@ -69,14 +70,14 @@ void Sample(s32 s, s32 t, s32 lod, bool linear, u8 texmap, u8 *sample) s32 lodFract = lod & 0xf; - if (lod > 0 && tm0.min_filter & 3) + if (lod > 0 && SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0)) { // use mipmap baseMip = lod >> 4; - mipLinear = (lodFract && tm0.min_filter & 2); + mipLinear = (lodFract && tm0.min_filter & TexMode0::TEXF_LINEAR); // if using nearest mip filter and lodFract >= 0.5 round up to next mip - baseMip += (lodFract >> 3) & (tm0.min_filter & 1); + baseMip += (lodFract >> 3) & (tm0.min_filter & TexMode0::TEXF_POINT); } if (mipLinear) |
