summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureDecoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/TextureDecoder.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp
index e934997dd7..79f1527f42 100644
--- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp
+++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp
@@ -109,6 +109,25 @@ int TexDecoder_GetBlockWidthInTexels(int format)
}
}
+// FIXME: Use reasonable values for block height
+int TexDecoder_GetBlockHeightInTexels(int format)
+{
+ switch (format) {
+ case GX_TF_I4: return 1;
+ case GX_TF_I8: return 1;
+ case GX_TF_IA4: return 1;
+ case GX_TF_IA8: return 1;
+ case GX_TF_RGB565: return 1;
+ case GX_TF_RGB5A3: return 1;
+ case GX_TF_RGBA8: return 1;
+ case GX_TF_C4: return 1;
+ case GX_TF_C8: return 1;
+ case GX_TF_C14X2: return 1;
+ case GX_TF_CMPR: return 8;
+ default: return 1;
+ }
+}
+
//returns bytes
int TexDecoder_GetPaletteSize(int format)
{