diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp index ff42bc6656..9ade896a72 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp @@ -283,7 +283,7 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, bool isPow2 = !((width & (width - 1)) || (height & (height - 1))); entry.isNonPow2 = false; int TexLevels = (width > height)?width:height; - TexLevels = (isPow2 && UseNativeMips) ? (int)(log((double)TexLevels)/log((double)2)) + 1 : (isPow2?0:1); + TexLevels = (isPow2 && UseNativeMips && tex_format != GX_TF_CMPR) ? (int)(log((double)TexLevels)/log((double)2)) + 1 : (isPow2?0:1); if(TexLevels > maxlevel && maxlevel > 0) TexLevels = maxlevel; if (!skip_texture_create) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp index 4ca701c35f..55fd0712ce 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp @@ -393,7 +393,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width bool isPow2 = !((width & (width - 1)) || (height & (height - 1))); int TexLevels = (width > height)?width:height; - TexLevels = (isPow2 && UseNativeMips) ? (int)(log((double)TexLevels)/log((double)2)) + 1 : (isPow2?0:1); + TexLevels = (isPow2 && UseNativeMips && tex_format != GX_TF_CMPR) ? (int)(log((double)TexLevels)/log((double)2)) + 1 : (isPow2?0:1); if(TexLevels > maxlevel && maxlevel > 0) TexLevels = maxlevel; int gl_format; @@ -467,7 +467,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width } if (expandedWidth != width) // reset - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } else {