summaryrefslogtreecommitdiffstats
path: root/src/video_core/pica.h
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2014-12-10 21:51:00 +0100
committerTony Wasserka <NeoBrainX@gmail.com>2014-12-20 18:06:54 +0100
commit1c972ef3b93252a157ec15d0878a2be3e4b46a0e (patch)
treeef6432579232cf4d040eb2694a06c7f807deeae0 /src/video_core/pica.h
parentPica: Unify ugly address translation hacks. (diff)
downloadyuzu-1c972ef3b93252a157ec15d0878a2be3e4b46a0e.tar
yuzu-1c972ef3b93252a157ec15d0878a2be3e4b46a0e.tar.gz
yuzu-1c972ef3b93252a157ec15d0878a2be3e4b46a0e.tar.bz2
yuzu-1c972ef3b93252a157ec15d0878a2be3e4b46a0e.tar.lz
yuzu-1c972ef3b93252a157ec15d0878a2be3e4b46a0e.tar.xz
yuzu-1c972ef3b93252a157ec15d0878a2be3e4b46a0e.tar.zst
yuzu-1c972ef3b93252a157ec15d0878a2be3e4b46a0e.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/pica.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/video_core/pica.h b/src/video_core/pica.h
index 7d82d733d..583614328 100644
--- a/src/video_core/pica.h
+++ b/src/video_core/pica.h
@@ -142,29 +142,39 @@ struct Regs {
RGBA5551 = 2,
RGB565 = 3,
RGBA4 = 4,
+ IA8 = 5,
+ I8 = 7,
A8 = 8,
+ IA4 = 9,
+ A4 = 11,
// TODO: Support for the other formats is not implemented, yet.
// Seems like they are luminance formats and compressed textures.
};
- static unsigned BytesPerPixel(TextureFormat format) {
+ static unsigned NibblesPerPixel(TextureFormat format) {
switch (format) {
case TextureFormat::RGBA8:
- return 4;
+ return 8;
case TextureFormat::RGB8:
- return 3;
+ return 6;
case TextureFormat::RGBA5551:
case TextureFormat::RGB565:
case TextureFormat::RGBA4:
- return 2;
+ case TextureFormat::IA8:
+ return 4;
- default:
- // placeholder for yet unknown formats
+ case TextureFormat::A4:
return 1;
+
+ case TextureFormat::I8:
+ case TextureFormat::A8:
+ case TextureFormat::IA4:
+ default: // placeholder for yet unknown formats
+ return 2;
}
}