From 273ae5920b25697061241fcc08d3b5d1bd282728 Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Wed, 14 Apr 2010 15:15:01 +0000 Subject: [PATCH] disable loading of native mip for compressed textures as they are not working, this should fix grass problem in zww git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5367 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 {