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
This commit is contained in:
parent
a25dfc47b4
commit
273ae5920b
|
@ -283,7 +283,7 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width,
|
||||||
bool isPow2 = !((width & (width - 1)) || (height & (height - 1)));
|
bool isPow2 = !((width & (width - 1)) || (height & (height - 1)));
|
||||||
entry.isNonPow2 = false;
|
entry.isNonPow2 = false;
|
||||||
int TexLevels = (width > height)?width:height;
|
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)
|
if(TexLevels > maxlevel && maxlevel > 0)
|
||||||
TexLevels = maxlevel;
|
TexLevels = maxlevel;
|
||||||
if (!skip_texture_create)
|
if (!skip_texture_create)
|
||||||
|
|
|
@ -393,7 +393,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
||||||
|
|
||||||
bool isPow2 = !((width & (width - 1)) || (height & (height - 1)));
|
bool isPow2 = !((width & (width - 1)) || (height & (height - 1)));
|
||||||
int TexLevels = (width > height)?width:height;
|
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)
|
if(TexLevels > maxlevel && maxlevel > 0)
|
||||||
TexLevels = maxlevel;
|
TexLevels = maxlevel;
|
||||||
int gl_format;
|
int gl_format;
|
||||||
|
@ -467,7 +467,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expandedWidth != width) // reset
|
if (expandedWidth != width) // reset
|
||||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue