diff options
| author | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-06-06 14:44:35 +0000 |
|---|---|---|
| committer | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-06-06 14:44:35 +0000 |
| commit | b20c04aa4553cc04bdc7bec8c2ed97e581c5fc29 (patch) | |
| tree | 571f86c127ec21e010d946293b8dd784cbb72ec1 /Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp | |
| parent | 0af55bd85bda4b978a3ae000258dfe6e72a63139 (diff) | |
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5629 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp index f7e0820115..b668025b1b 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp @@ -188,7 +188,7 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, if (!g_ActiveConfig.bSafeTextureCache) hash_value = ((u32 *)ptr)[0]; - if (entry.isRenderTarget || ((address == entry.addr) && (hash_value == entry.hash) && FullFormat == entry.fmt && entry.MipLevels <= maxlevel)) + if (entry.isRenderTarget || ((address == entry.addr) && (hash_value == entry.hash) && FullFormat == entry.fmt/* && entry.MipLevels == maxlevel*/)) { entry.frameCount = frameCount; D3D::SetTexture(stage, entry.texture); @@ -200,7 +200,7 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, // instead of destroying it and having to create a new one. // Might speed up movie playback very, very slightly. - if (width == entry.w && height==entry.h && FullFormat == entry.fmt && entry.MipLevels == maxlevel) + if (width == entry.w && height==entry.h && FullFormat == entry.fmt/* && entry.MipLevels < maxlevel*/) { skip_texture_create = true; } @@ -284,8 +284,8 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, entry.isNonPow2 = false; int TexLevels = (width > height)?width:height; TexLevels = (isPow2 && UseNativeMips && (maxlevel > 0)) ? (int)(log((double)TexLevels)/log((double)2)) + 1 : ((isPow2)? 0 : 1); - if(TexLevels > maxlevel && maxlevel > 0) - TexLevels = maxlevel; + if(TexLevels > (maxlevel + 1) && maxlevel > 0) + TexLevels = (maxlevel + 1); entry.MipLevels = maxlevel; if (!skip_texture_create) { |
