summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorTellowKrinkle <tellowkrinkle@gmail.com>2022-11-06 23:28:46 -0600
committerTellowKrinkle <tellowkrinkle@gmail.com>2022-11-07 22:18:56 -0600
commit37a51f1d091c7db91261e73462d4e67eee5f9252 (patch)
tree9f869f782c1c65edb3569f2feaad0e9f94724c7f /Source/Core/VideoCommon/TextureCacheBase.cpp
parentee7887b7511dd3cdb27fd8517d42088cf26cdade (diff)
VideoCommon: Add an option to disable mipmaps
Needed by M1 fifoci to work around a minor non-determinism bug
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 29f972a67b..f16bcc342a 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -1544,8 +1544,15 @@ TextureCacheBase::GetTexture(const int textureCacheSafetyColorSampleSize,
}
}
+#ifdef __APPLE__
+ const bool no_mips = g_ActiveConfig.bNoMipmapping;
+#else
+ const bool no_mips = false;
+#endif
// how many levels the allocated texture shall have
- const u32 texLevels = hires_tex ? (u32)hires_tex->m_levels.size() : texture_info.GetLevelCount();
+ const u32 texLevels = no_mips ? 1 :
+ hires_tex ? (u32)hires_tex->m_levels.size() :
+ texture_info.GetLevelCount();
// We can decode on the GPU if it is a supported format and the flag is enabled.
// Currently we don't decode RGBA8 textures from TMEM, as that would require copying from both