diff options
| author | Tony Wasserka <neobrainx@gmail.com> | 2015-05-11 13:08:18 +0200 |
|---|---|---|
| committer | Tony Wasserka <neobrainx@gmail.com> | 2015-05-11 13:08:18 +0200 |
| commit | 244ba1a6101659d155dadb02068029d0d1922fa7 (patch) | |
| tree | ff40f5a686cae1ff1775f094cab99652405f2869 /src/video_core/debug_utils/debug_utils.cpp | |
| parent | e98fbadf4a49eecc6d39c082cba683d5d88ea2c5 (diff) | |
| parent | 40310e2132ea0b1a48661883e0fbc845488c51eb (diff) | |
Merge pull request #742 from archshift/i4
Implement I4 texture format
Diffstat (limited to 'src/video_core/debug_utils/debug_utils.cpp')
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 11 |
1 files changed, 11 insertions, 0 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); |
