VideoCommon: Add an option to disable mipmaps
Needed by M1 fifoci to work around a minor non-determinism bug
This commit is contained in:
parent
ee7887b751
commit
37a51f1d09
|
@ -153,6 +153,9 @@ const Info<u32> GFX_HACK_MISSING_COLOR_VALUE{{System::GFX, "Hacks", "MissingColo
|
|||
0xFFFFFFFF};
|
||||
const Info<bool> GFX_HACK_FAST_TEXTURE_SAMPLING{{System::GFX, "Hacks", "FastTextureSampling"},
|
||||
true};
|
||||
#ifdef __APPLE__
|
||||
const Info<bool> GFX_HACK_NO_MIPMAPPING{{System::GFX, "Hacks", "NoMipmapping"}, false};
|
||||
#endif
|
||||
|
||||
// Graphics.GameSpecific
|
||||
|
||||
|
|
|
@ -129,6 +129,9 @@ extern const Info<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES;
|
|||
extern const Info<bool> GFX_HACK_VERTEX_ROUNDING;
|
||||
extern const Info<u32> GFX_HACK_MISSING_COLOR_VALUE;
|
||||
extern const Info<bool> GFX_HACK_FAST_TEXTURE_SAMPLING;
|
||||
#ifdef __APPLE__
|
||||
extern const Info<bool> GFX_HACK_NO_MIPMAPPING;
|
||||
#endif
|
||||
|
||||
// Graphics.GameSpecific
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -140,6 +140,9 @@ void VideoConfig::Refresh()
|
|||
iEFBAccessTileSize = Config::Get(Config::GFX_HACK_EFB_ACCESS_TILE_SIZE);
|
||||
iMissingColorValue = Config::Get(Config::GFX_HACK_MISSING_COLOR_VALUE);
|
||||
bFastTextureSampling = Config::Get(Config::GFX_HACK_FAST_TEXTURE_SAMPLING);
|
||||
#ifdef __APPLE__
|
||||
bNoMipmapping = Config::Get(Config::GFX_HACK_NO_MIPMAPPING);
|
||||
#endif
|
||||
|
||||
bPerfQueriesEnable = Config::Get(Config::GFX_PERF_QUERIES_ENABLE);
|
||||
|
||||
|
|
|
@ -143,6 +143,9 @@ struct VideoConfig final
|
|||
int iSaveTargetId = 0; // TODO: Should be dropped
|
||||
u32 iMissingColorValue = 0;
|
||||
bool bFastTextureSampling = false;
|
||||
#ifdef __APPLE__
|
||||
bool bNoMipmapping = false; // Used by macOS fifoci to work around an M1 bug
|
||||
#endif
|
||||
|
||||
// Stereoscopy
|
||||
StereoMode stereo_mode{};
|
||||
|
|
Loading…
Reference in New Issue