summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index d9fed58bf..328386b7e 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -392,13 +392,13 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
392 { 392 {
393 const u8* source_ptr = source + coarse_x * block_height * 2 + coarse_y * info.stride + texel_index_within_tile * 2; 393 const u8* source_ptr = source + coarse_x * block_height * 2 + coarse_y * info.stride + texel_index_within_tile * 2;
394 394
395 // TODO: compoent order not verified 395 // TODO: component order not verified
396 396
397 if (disable_alpha) { 397 if (disable_alpha) {
398 // Show intensity as red, alpha as green 398 // Show intensity as red, alpha as green
399 return { *source_ptr, *(source_ptr+1), 0, 255 }; 399 return { source_ptr[0], source_ptr[1], 0, 255 };
400 } else { 400 } else {
401 return { *source_ptr, *source_ptr, *source_ptr, *(source_ptr+1)}; 401 return { source_ptr[0], source_ptr[0], source_ptr[0], source_ptr[1]};
402 } 402 }
403 } 403 }
404 404
@@ -423,9 +423,9 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
423 { 423 {
424 const u8* source_ptr = source + coarse_x * block_height / 2 + coarse_y * info.stride + texel_index_within_tile / 2; 424 const u8* source_ptr = source + coarse_x * block_height / 2 + coarse_y * info.stride + texel_index_within_tile / 2;
425 425
426 // TODO: compoent order not verified 426 // TODO: component order not verified
427 427
428 u8 i = (*source_ptr)&0xF; 428 u8 i = (*source_ptr) & 0xF;
429 u8 a = ((*source_ptr) & 0xF0) >> 4; 429 u8 a = ((*source_ptr) & 0xF0) >> 4;
430 a |= a << 4; 430 a |= a << 4;
431 i |= i << 4; 431 i |= i << 4;
@@ -442,11 +442,11 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
442 { 442 {
443 const u8* source_ptr = source + coarse_x * block_height / 2 + coarse_y * info.stride + texel_index_within_tile / 2; 443 const u8* source_ptr = source + coarse_x * block_height / 2 + coarse_y * info.stride + texel_index_within_tile / 2;
444 444
445 // TODO: Order? 445 // TODO: component order not verified
446
446 u8 a = (coarse_x % 2) ? ((*source_ptr)&0xF) : (((*source_ptr) & 0xF0) >> 4); 447 u8 a = (coarse_x % 2) ? ((*source_ptr)&0xF) : (((*source_ptr) & 0xF0) >> 4);
447 a |= a << 4; 448 a |= a << 4;
448 449
449 // TODO: Better control this...
450 if (disable_alpha) { 450 if (disable_alpha) {
451 return { *source_ptr, *source_ptr, *source_ptr, 255 }; 451 return { *source_ptr, *source_ptr, *source_ptr, 255 };
452 } else { 452 } else {