summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2015-05-11 13:08:18 +0200
committerTony Wasserka <neobrainx@gmail.com>2015-05-11 13:08:18 +0200
commit244ba1a6101659d155dadb02068029d0d1922fa7 (patch)
treeff40f5a686cae1ff1775f094cab99652405f2869 /src
parentMerge pull request #740 from yuriks/gsp-shmem (diff)
parentImplement I4 texture format (diff)
downloadyuzu-244ba1a6101659d155dadb02068029d0d1922fa7.tar
yuzu-244ba1a6101659d155dadb02068029d0d1922fa7.tar.gz
yuzu-244ba1a6101659d155dadb02068029d0d1922fa7.tar.bz2
yuzu-244ba1a6101659d155dadb02068029d0d1922fa7.tar.lz
yuzu-244ba1a6101659d155dadb02068029d0d1922fa7.tar.xz
yuzu-244ba1a6101659d155dadb02068029d0d1922fa7.tar.zst
yuzu-244ba1a6101659d155dadb02068029d0d1922fa7.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp11
-rw-r--r--src/video_core/pica.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 2d9d8ab1f..883df48a5 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -393,6 +393,17 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
}
}
+ case Regs::TextureFormat::I4:
+ {
+ u32 morton_offset = VideoCore::GetMortonOffset(x, y, 1);
+ const u8* source_ptr = source + morton_offset / 2;
+
+ u8 i = (morton_offset % 2) ? ((*source_ptr & 0xF0) >> 4) : (*source_ptr & 0xF);
+ i = Color::Convert4To8(i);
+
+ return { i, i, i, 255 };
+ }
+
case Regs::TextureFormat::A4:
{
u32 morton_offset = VideoCore::GetMortonOffset(x, y, 1);
diff --git a/src/video_core/pica.h b/src/video_core/pica.h
index 5e169ff69..a53429716 100644
--- a/src/video_core/pica.h
+++ b/src/video_core/pica.h
@@ -156,7 +156,7 @@ struct Regs {
I8 = 7,
A8 = 8,
IA4 = 9,
-
+ I4 = 10,
A4 = 11,
ETC1 = 12, // compressed
ETC1A4 = 13, // compressed