diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2014-08-24 17:23:02 +0200 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-12-09 16:37:34 +0100 |
commit | 2793619dcef9fb2f97db5f0258ca950e18fe7f13 (patch) | |
tree | 47f0b608ca674d7dce921de2e11b10fc1ca9807a /src/video_core/pica.h | |
parent | fd194d95b0f1522b970a2b77f9ea490fb8c3ef08 (diff) |
citra_qt: Add enhanced texture debugging widgets.
Double-clicking a texture parameter command in the pica command lists will spawn these as a new tab in the pica command list dock area.
Diffstat (limited to 'src/video_core/pica.h')
-rw-r--r-- | src/video_core/pica.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/video_core/pica.h b/src/video_core/pica.h index 10fa73355..c1f35a011 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -130,7 +130,20 @@ struct Regs { // Seems like they are luminance formats and compressed textures. }; - BitField<0, 1, u32> texturing_enable; + static unsigned BytesPerPixel(TextureFormat format) { + if (format == TextureFormat::RGBA8) + return 4; + else if (format == TextureFormat::RGB8) + return 3; + else if (format == TextureFormat::RGBA5551 || + format == TextureFormat::RGB565 || + format == TextureFormat::RGBA4) + return 2; + else // placeholder + return 1; + } + + BitField< 0, 1, u32> texturing_enable; TextureConfig texture0; INSERT_PADDING_WORDS(0x8); BitField<0, 4, TextureFormat> texture0_format; |