summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2014-12-21 02:51:48 +0100
committerTony Wasserka <NeoBrainX@gmail.com>2014-12-31 15:35:24 +0100
commit632655e292cc317f8a985747dda8883d3f785431 (patch)
treec348ea586a5203c3f3a1e844c43bd94ce64f9d15
parentPica/CommandProcessor: Add support for integer uniforms. (diff)
downloadyuzu-632655e292cc317f8a985747dda8883d3f785431.tar
yuzu-632655e292cc317f8a985747dda8883d3f785431.tar.gz
yuzu-632655e292cc317f8a985747dda8883d3f785431.tar.bz2
yuzu-632655e292cc317f8a985747dda8883d3f785431.tar.lz
yuzu-632655e292cc317f8a985747dda8883d3f785431.tar.xz
yuzu-632655e292cc317f8a985747dda8883d3f785431.tar.zst
yuzu-632655e292cc317f8a985747dda8883d3f785431.zip
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 5921185a6..9c0fbc453 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -389,13 +389,11 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
{
const u8* source_ptr = source + offset * 2;
- // TODO: component order not verified
-
if (disable_alpha) {
// Show intensity as red, alpha as green
- return { source_ptr[0], source_ptr[1], 0, 255 };
+ return { source_ptr[1], source_ptr[0], 0, 255 };
} else {
- return { source_ptr[0], source_ptr[0], source_ptr[0], source_ptr[1]};
+ return { source_ptr[1], source_ptr[1], source_ptr[1], source_ptr[0]};
}
}
@@ -418,12 +416,10 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::IA4:
{
- const u8* source_ptr = source + offset / 2;
-
- // TODO: component order not verified
+ const u8* source_ptr = source + offset;
- u8 i = (*source_ptr) & 0xF;
- u8 a = ((*source_ptr) & 0xF0) >> 4;
+ u8 i = ((*source_ptr) & 0xF0) >> 4;
+ u8 a = (*source_ptr) & 0xF;
a |= a << 4;
i |= i << 4;
@@ -439,15 +435,13 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
{
const u8* source_ptr = source + offset / 2;
- // TODO: component order not verified
-
u8 a = (coarse_x % 2) ? ((*source_ptr)&0xF) : (((*source_ptr) & 0xF0) >> 4);
a |= a << 4;
if (disable_alpha) {
- return { *source_ptr, *source_ptr, *source_ptr, 255 };
+ return { a, a, a, 255 };
} else {
- return { 0, 0, 0, *source_ptr };
+ return { 0, 0, 0, a };
}
}