summaryrefslogtreecommitdiff
path: root/src/video_core/debug_utils
diff options
context:
space:
mode:
authorGravatar Tony Wasserka2014-08-17 12:31:19 +0200
committerGravatar Tony Wasserka2014-08-25 22:03:18 +0200
commit9679d231df0bc8fac9e0e596ab78750bb38ef248 (patch)
treef80fe9c3396c3c83aacc06c26ddf3643140b20ae /src/video_core/debug_utils
parentPica/DebugUtils: Add convenient tev setup printer. (diff)
downloadyuzu-9679d231df0bc8fac9e0e596ab78750bb38ef248.tar.gz
yuzu-9679d231df0bc8fac9e0e596ab78750bb38ef248.tar.xz
yuzu-9679d231df0bc8fac9e0e596ab78750bb38ef248.zip
Pica/Rasterizer: Add texturing support.
Diffstat (limited to 'src/video_core/debug_utils')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 619c0fbe5..f7d9455be 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -387,23 +387,7 @@ void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) {
387 buf = new u8[row_stride * texture_config.height]; 387 buf = new u8[row_stride * texture_config.height];
388 for (int y = 0; y < texture_config.height; ++y) { 388 for (int y = 0; y < texture_config.height; ++y) {
389 for (int x = 0; x < texture_config.width; ++x) { 389 for (int x = 0; x < texture_config.width; ++x) {
390 // Images are split into 8x8 tiles. Each tile is composed of four 4x4 subtiles each 390 // Cf. rasterizer code for an explanation of this algorithm.
391 // of which is composed of four 2x2 subtiles each of which is composed of four texels.
392 // Each structure is embedded into the next-bigger one in a diagonal pattern, e.g.
393 // texels are laid out in a 2x2 subtile like this:
394 // 2 3
395 // 0 1
396 //
397 // The full 8x8 tile has the texels arranged like this:
398 //
399 // 42 43 46 47 58 59 62 63
400 // 40 41 44 45 56 57 60 61
401 // 34 35 38 39 50 51 54 55
402 // 32 33 36 37 48 49 52 53
403 // 10 11 14 15 26 27 30 31
404 // 08 09 12 13 24 25 28 29
405 // 02 03 06 07 18 19 22 23
406 // 00 01 04 05 16 17 20 21
407 int texel_index_within_tile = 0; 391 int texel_index_within_tile = 0;
408 for (int block_size_index = 0; block_size_index < 3; ++block_size_index) { 392 for (int block_size_index = 0; block_size_index < 3; ++block_size_index) {
409 int sub_tile_width = 1 << block_size_index; 393 int sub_tile_width = 1 << block_size_index;