Simplify the params for the safe texture cache

after some test the more relevant parameters were the color samples and the tlut max size.
so delete the rest of the parameters and define 3 modes:
Safe : the two values are set to 0 meaning all the texture data and all the tlut data are hashed this is the most correct and slowwwwwwwwwww way
Normal: 37 samples are taken from the color textures an the firs 4096 bytes of the tlut are hashed, is a lot faster than safe mode but in some games i observe small glitches.
Fast: 8 samples are taken from the color textures an the first 1024 bytes are hashed from the tlut, is a little slower than the unsafe cache but at least all the games i tested have correct text output and fast frame rate. the glitches in dinamyc color textures are more noticeable in this mode
this values could be improved, if you find a better combination please post it and the game it fixes and i will update the source.
for the moment, as my time is limited by a lot of work, only implemented the d3d gui, if someone can implement the opengl gui will be a lot of help for me.
please test a lot and let me know the results.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5135 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-02-26 12:54:08 +00:00
parent 0718385f27
commit 02189ec5e0
7 changed files with 100 additions and 50 deletions

View File

@ -63,12 +63,8 @@ void VideoConfig::Load(const char *ini_file)
iniFile.Get("Settings", "SafeTextureCache", &bSafeTextureCache, false); // Settings
//Safe texture cache params
iniFile.Get("Settings", "SafeTextureCacheColorSamples", &iSafeTextureCache_ColorSamples,37);
iniFile.Get("Settings", "SafeTextureCacheIndexedSamples", &iSafeTextureCache_IndexedSamples,0);
iniFile.Get("Settings", "SafeTextureCacheTlutSamples", &iSafeTextureCache_TlutSamples,0);
iniFile.Get("Settings", "SafeTextureCacheColorMaxSize", &iSafeTextureCache_ColorMaxSize,0);
iniFile.Get("Settings", "SafeTextureCacheIndexedMaxSize", &iSafeTextureCache_IndexedMaxSize,0);
iniFile.Get("Settings", "SafeTextureCacheTlutMaxSize", &iSafeTextureCache_TlutMaxSize,0);
iniFile.Get("Settings", "SafeTextureCacheColorSamples", &iSafeTextureCache_ColorSamples,37);
iniFile.Get("Settings", "SafeTextureCacheTlutMaxSize", &iSafeTextureCache_TlutMaxSize,1024);
iniFile.Get("Settings", "ShowFPS", &bShowFPS, false); // Settings
iniFile.Get("Settings", "OverlayStats", &bOverlayStats, false);
@ -137,16 +133,8 @@ void VideoConfig::GameIniLoad(const char *ini_file)
//Safe texture cache params
if (iniFile.Exists("Video", "SafeTextureCacheColorSamples"))
iniFile.Get("Video", "SafeTextureCacheColorSamples", &iSafeTextureCache_ColorSamples,37);
if (iniFile.Exists("Video", "SafeTextureCacheIndexedSamples"))
iniFile.Get("Video", "SafeTextureCacheIndexedSamples", &iSafeTextureCache_IndexedSamples,0);
if (iniFile.Exists("Video", "SafeTextureCacheTlutSamples"))
iniFile.Get("Video", "SafeTextureCacheTlutSamples", &iSafeTextureCache_TlutSamples,0);
if (iniFile.Exists("Video", "SafeTextureCacheColorMaxSize"))
iniFile.Get("Video", "SafeTextureCacheColorMaxSize", &iSafeTextureCache_ColorMaxSize,0);
if (iniFile.Exists("Video", "SafeTextureCacheIndexedMaxSize"))
iniFile.Get("Video", "SafeTextureCacheIndexedMaxSize", &iSafeTextureCache_IndexedMaxSize,0);
if (iniFile.Exists("Video", "SafeTextureCacheTlutMaxSize"))
iniFile.Get("Video", "SafeTextureCacheTlutMaxSize", &iSafeTextureCache_TlutMaxSize,0);
iniFile.Get("Video", "SafeTextureCacheTlutMaxSize", &iSafeTextureCache_TlutMaxSize,1024);
if (iniFile.Exists("Video", "MSAA"))
iniFile.Get("Video", "MSAA", &iMultisampleMode, 0);
@ -181,10 +169,6 @@ void VideoConfig::Save(const char *ini_file)
iniFile.Set("Settings", "SafeTextureCache", bSafeTextureCache);
//safe texture cache params
iniFile.Set("Settings", "SafeTextureCacheColorSamples", iSafeTextureCache_ColorSamples);
iniFile.Set("Settings", "SafeTextureCacheIndexedSamples", iSafeTextureCache_IndexedSamples);
iniFile.Set("Settings", "SafeTextureCacheTlutSamples", iSafeTextureCache_TlutSamples);
iniFile.Set("Settings", "SafeTextureCacheColorMaxSize", iSafeTextureCache_ColorMaxSize);
iniFile.Set("Settings", "SafeTextureCacheIndexedMaxSize", iSafeTextureCache_IndexedMaxSize);
iniFile.Set("Settings", "SafeTextureCacheTlutMaxSize", iSafeTextureCache_TlutMaxSize);
iniFile.Set("Settings", "ShowFPS", bShowFPS);

View File

@ -120,10 +120,6 @@ struct VideoConfig
bool bCopyEFBScaled;
bool bSafeTextureCache;
int iSafeTextureCache_ColorSamples;
int iSafeTextureCache_IndexedSamples;
int iSafeTextureCache_TlutSamples;
int iSafeTextureCache_ColorMaxSize;
int iSafeTextureCache_IndexedMaxSize;
int iSafeTextureCache_TlutMaxSize;
bool bFIFOBPhack;
int iPhackvalue;