mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
TextureDecoder: Remove unused function
GetPC_TexFormat was never used. It was added in commit d02426a, with the only user being commented out code. The commented out code was later removed in 9893122, but the implementation stayed.
This commit is contained in:
parent
6682a2fadd
commit
bfb2c04ace
@ -76,7 +76,6 @@ enum PC_TexFormat
|
||||
};
|
||||
|
||||
PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt,bool rgbaOnly = false);
|
||||
PC_TexFormat GetPC_TexFormat(int texformat, int tlutfmt);
|
||||
void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth, int texformat, int tlutaddr, int tlutfmt);
|
||||
void TexDecoder_DecodeTexelRGBA8FromTmem(u8 *dst, const u8 *src_ar, const u8* src_gb, int s, int t, int imageWidth);
|
||||
PC_TexFormat TexDecoder_DecodeRGBA8FromTmem(u8* dst, const u8 *src_ar, const u8 *src_gb, int width, int height);
|
||||
|
@ -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
|
||||
|
@ -622,53 +622,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;
|
||||
}
|
||||
|
||||
inline void SetOpenMPThreadCount(int width, int height)
|
||||
{
|
||||
#ifdef _OPENMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user