mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Small fix for TexDecoder_GetBlockHeightInTexels, but see no noticeable changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3961 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -108,33 +108,31 @@ int TexDecoder_GetBlockWidthInTexels(int format)
|
|||||||
case GX_TF_C8: return 8;
|
case GX_TF_C8: return 8;
|
||||||
case GX_TF_C14X2: return 4;
|
case GX_TF_C14X2: return 4;
|
||||||
case GX_TF_CMPR: return 8;
|
case GX_TF_CMPR: return 8;
|
||||||
default: return 8;
|
default:
|
||||||
|
ERROR_LOG(VIDEO, "Unsupported Texture Format (%08x)! (GetBlockWidthInTexels)", format);
|
||||||
|
return 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Use reasonable values for block height
|
|
||||||
int TexDecoder_GetBlockHeightInTexels(int format)
|
int TexDecoder_GetBlockHeightInTexels(int format)
|
||||||
{
|
{
|
||||||
/*switch (format)
|
switch (format)
|
||||||
{
|
{
|
||||||
case GX_TF_I4: return 1;
|
case GX_TF_I4: return 8;
|
||||||
case GX_TF_I8: return 1;
|
case GX_TF_I8: return 4;
|
||||||
case GX_TF_IA4: return 1;
|
case GX_TF_IA4: return 4;
|
||||||
case GX_TF_IA8: return 1;
|
case GX_TF_IA8: return 4;
|
||||||
case GX_TF_RGB565: return 1;
|
case GX_TF_RGB565: return 4;
|
||||||
case GX_TF_RGB5A3: return 1;
|
case GX_TF_RGB5A3: return 4;
|
||||||
case GX_TF_RGBA8: return 1;
|
case GX_TF_RGBA8: return 4;
|
||||||
case GX_TF_C4: return 1;
|
case GX_TF_C4: return 8;
|
||||||
case GX_TF_C8: return 1;
|
case GX_TF_C8: return 4;
|
||||||
case GX_TF_C14X2: return 1;
|
case GX_TF_C14X2: return 4;
|
||||||
case GX_TF_CMPR: return 8;
|
case GX_TF_CMPR: return 4;
|
||||||
default: return 1;
|
default:
|
||||||
}*/
|
ERROR_LOG(VIDEO, "Unsupported Texture Format (%08x)! (GetBlockHeightInTexels)", format);
|
||||||
|
return 4;
|
||||||
// Omega: I asssume the height would be the same as the width since it says 'block'
|
}
|
||||||
// width values look better than 1 anyways
|
|
||||||
// TODO: Confirm this
|
|
||||||
return TexDecoder_GetBlockWidthInTexels(format);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//returns bytes
|
//returns bytes
|
||||||
@ -580,6 +578,7 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in
|
|||||||
break;
|
break;
|
||||||
xcnt++;
|
xcnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int y=0; y < 10; y++)
|
for (int y=0; y < 10; y++)
|
||||||
{
|
{
|
||||||
for (int x=0; x < xcnt; x++)
|
for (int x=0; x < xcnt; x++)
|
||||||
|
Reference in New Issue
Block a user