test commit: please test if this improve the performance with the safe texture cache

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5038 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-02-10 15:55:24 +00:00
parent 0b733d36c4
commit 6200c99dd4
4 changed files with 118 additions and 13 deletions

View File

@ -167,10 +167,13 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width,
// visible or invisible. Thus, unless we want to recreate the textures for every drawn character,
// we must make sure that texture with different tluts get different IDs.
texHash = TexDecoder_GetFullHash(ptr,TexDecoder_GetTextureSizeInBytes(expandedWidth, expandedHeight, tex_format));
u64 tlutHash = TexDecoder_GetFullHash(&texMem[tlutaddr], TexDecoder_GetPaletteSize(tex_format));
texHash ^= tlutHash;
u32 tlutHash = TexDecoder_GetFullHash32(&texMem[tlutaddr], TexDecoder_GetPaletteSize(tex_format));
//texHash ^= tlutHash; //this line was the problem, as the hash changes with the tlut hash
//the textures where alway recreated
if (g_ActiveConfig.bSafeTextureCache)
texID = texID ^ ((u32)(tlutHash & 0xFFFFFFFF)) ^ ((u32)((tlutHash >> 32) & 0xFFFFFFFF));
{
texID = texID ^ tlutHash;
}
}
else
{