summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-06 04:19:06 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-02-04 21:33:25 +0100
commit09a750e8662e5d4d608177fdfb69b398c3202cd6 (patch)
tree6d5b6af7cd77de75406516eb41eda42f2c963f4a /src/citra_qt
parentVideoCore: Move LookupTexture out of debug_utils.h (diff)
downloadyuzu-09a750e8662e5d4d608177fdfb69b398c3202cd6.tar
yuzu-09a750e8662e5d4d608177fdfb69b398c3202cd6.tar.gz
yuzu-09a750e8662e5d4d608177fdfb69b398c3202cd6.tar.bz2
yuzu-09a750e8662e5d4d608177fdfb69b398c3202cd6.tar.lz
yuzu-09a750e8662e5d4d608177fdfb69b398c3202cd6.tar.xz
yuzu-09a750e8662e5d4d608177fdfb69b398c3202cd6.tar.zst
yuzu-09a750e8662e5d4d608177fdfb69b398c3202cd6.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/debugger/graphics/graphics_surface.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics_surface.cpp b/src/citra_qt/debugger/graphics/graphics_surface.cpp
index c0a72a6ef..bd82b00d4 100644
--- a/src/citra_qt/debugger/graphics/graphics_surface.cpp
+++ b/src/citra_qt/debugger/graphics/graphics_surface.cpp
@@ -568,19 +568,14 @@ void GraphicsSurfaceWidget::OnUpdate() {
surface_picture_label->show();
- unsigned nibbles_per_pixel = GraphicsSurfaceWidget::NibblesPerPixel(surface_format);
- unsigned stride = nibbles_per_pixel * surface_width / 2;
-
- // We handle depth formats here because DebugUtils only supports TextureFormats
if (surface_format <= Format::MaxTextureFormat) {
-
// Generate a virtual texture
Pica::Texture::TextureInfo info;
info.physical_address = surface_address;
info.width = surface_width;
info.height = surface_height;
info.format = static_cast<Pica::Regs::TextureFormat>(surface_format);
- info.stride = stride;
+ info.SetDefaultStride();
for (unsigned int y = 0; y < surface_height; ++y) {
for (unsigned int x = 0; x < surface_width; ++x) {
@@ -588,8 +583,12 @@ void GraphicsSurfaceWidget::OnUpdate() {
decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a()));
}
}
-
} else {
+ // We handle depth formats here because DebugUtils only supports TextureFormats
+
+ // TODO(yuriks): Convert to newer tile-based addressing
+ unsigned nibbles_per_pixel = GraphicsSurfaceWidget::NibblesPerPixel(surface_format);
+ unsigned stride = nibbles_per_pixel * surface_width / 2;
ASSERT_MSG(nibbles_per_pixel >= 2,
"Depth decoder only supports formats with at least one byte per pixel");