mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-01-15 16:33:15 -03:00
TextureDecoder: Remove unused function
GetPC_TexFormat was never used. It was added in commitd02426a, with the only user being commented out code. The commented out code was later removed in9893122, but the implementation stayed.
This commit is contained in:
@@ -574,54 +574,6 @@ static void copyDXTBlock(u8* dst, const u8* src)
|
||||
}
|
||||
#endif
|
||||
|
||||
static PC_TexFormat GetPCFormatFromTLUTFormat(int tlutfmt)
|
||||
{
|
||||
switch (tlutfmt)
|
||||
{
|
||||
case 0: return PC_TEX_FMT_IA8; // IA8
|
||||
case 1: return PC_TEX_FMT_RGB565; // RGB565
|
||||
case 2: return PC_TEX_FMT_BGRA32; // RGB5A3: This TLUT format requires
|
||||
// extra work to decode.
|
||||
}
|
||||
return PC_TEX_FMT_NONE; // Error
|
||||
}
|
||||
|
||||
PC_TexFormat GetPC_TexFormat(int texformat, int tlutfmt)
|
||||
{
|
||||
switch (texformat)
|
||||
{
|
||||
case GX_TF_C4:
|
||||
return GetPCFormatFromTLUTFormat(tlutfmt);
|
||||
case GX_TF_I4:
|
||||
return PC_TEX_FMT_IA8;
|
||||
case GX_TF_I8: // speed critical
|
||||
return PC_TEX_FMT_IA8;
|
||||
case GX_TF_C8:
|
||||
return GetPCFormatFromTLUTFormat(tlutfmt);
|
||||
case GX_TF_IA4:
|
||||
return PC_TEX_FMT_IA4_AS_IA8;
|
||||
case GX_TF_IA8:
|
||||
return PC_TEX_FMT_IA8;
|
||||
case GX_TF_C14X2:
|
||||
return GetPCFormatFromTLUTFormat(tlutfmt);
|
||||
case GX_TF_RGB565:
|
||||
return PC_TEX_FMT_RGB565;
|
||||
case GX_TF_RGB5A3:
|
||||
return PC_TEX_FMT_BGRA32;
|
||||
case GX_TF_RGBA8: // speed critical
|
||||
return PC_TEX_FMT_BGRA32;
|
||||
case GX_TF_CMPR: // speed critical
|
||||
// The metroid games use this format almost exclusively.
|
||||
{
|
||||
return PC_TEX_FMT_BGRA32;
|
||||
}
|
||||
}
|
||||
|
||||
// The "copy" texture formats, too?
|
||||
return PC_TEX_FMT_NONE;
|
||||
}
|
||||
|
||||
|
||||
//switch endianness, unswizzle
|
||||
//TODO: to save memory, don't blindly convert everything to argb8888
|
||||
//also ARGB order needs to be swapped later, to accommodate modern hardware better
|
||||
|
||||
Reference in New Issue
Block a user