aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/video_core/debug_utils/debug_utils.cpp
diff options
context:
space:
mode:
authorGravatar Tony Wasserka <NeoBrainX@gmail.com>2014-12-19 19:15:47 +0100
committerGravatar Tony Wasserka <NeoBrainX@gmail.com>2014-12-20 18:06:55 +0100
commit6e275778c9e7e55cabadb14fdabaa51a55348663 (patch)
tree1cfb3e0ae96847987e1340905e55c4c0b10c32f6 /src/video_core/debug_utils/debug_utils.cpp
parente4e9710d1863a1c503ad4274eb8e64fbfdaa2d76 (diff)
Pica/DebugUtils: Better document LookupTexture.
Diffstat (limited to 'src/video_core/debug_utils/debug_utils.cpp')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 0085c117..1c08ba35 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -392,8 +392,10 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
{
const u8* source_ptr = source + coarse_x * block_height * 2 + coarse_y * info.stride + texel_index_within_tile * 2;
- // TODO: Better control this...
+ // TODO: compoent order not verified
+
if (disable_alpha) {
+ // Show intensity as red, alpha as green
return { *source_ptr, *(source_ptr+1), 0, 255 };
} else {
return { *source_ptr, *source_ptr, *source_ptr, *(source_ptr+1)};
@@ -403,8 +405,6 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::I8:
{
const u8* source_ptr = source + coarse_x * block_height + coarse_y * info.stride + texel_index_within_tile;
-
- // TODO: Better control this...
return { *source_ptr, *source_ptr, *source_ptr, 255 };
}
@@ -412,7 +412,6 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
{
const u8* source_ptr = source + coarse_x * block_height + coarse_y * info.stride + texel_index_within_tile;
- // TODO: Better control this...
if (disable_alpha) {
return { *source_ptr, *source_ptr, *source_ptr, 255 };
} else {
@@ -424,14 +423,15 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
{
const u8* source_ptr = source + coarse_x * block_height / 2 + coarse_y * info.stride + texel_index_within_tile / 2;
- // TODO: Order?
+ // TODO: compoent order not verified
+
u8 i = (*source_ptr)&0xF;
u8 a = ((*source_ptr) & 0xF0) >> 4;
a |= a << 4;
i |= i << 4;
- // TODO: Better control this...
if (disable_alpha) {
+ // Show intensity as red, alpha as green
return { i, a, 0, 255 };
} else {
return { i, i, i, a };