diff options
| author | 2017-01-05 20:11:23 -0200 | |
|---|---|---|
| committer | 2017-02-04 12:31:40 -0800 | |
| commit | a1c9ac7845395c250a78fc8df93a9ffed29f3d5b (patch) | |
| tree | 7e3768df24f82e9e732302318326113419309d33 /src/citra_qt/debugger/graphics/graphics_surface.cpp | |
| parent | Merge pull request #2496 from mailwl/cfg-mem (diff) | |
| download | yuzu-a1c9ac7845395c250a78fc8df93a9ffed29f3d5b.tar.gz yuzu-a1c9ac7845395c250a78fc8df93a9ffed29f3d5b.tar.xz yuzu-a1c9ac7845395c250a78fc8df93a9ffed29f3d5b.zip | |
VideoCore: Move LookupTexture out of debug_utils.h
Diffstat (limited to 'src/citra_qt/debugger/graphics/graphics_surface.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_surface.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics_surface.cpp b/src/citra_qt/debugger/graphics/graphics_surface.cpp index 4efd95d3c..c0a72a6ef 100644 --- a/src/citra_qt/debugger/graphics/graphics_surface.cpp +++ b/src/citra_qt/debugger/graphics/graphics_surface.cpp | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include "core/memory.h" | 18 | #include "core/memory.h" |
| 19 | #include "video_core/pica.h" | 19 | #include "video_core/pica.h" |
| 20 | #include "video_core/pica_state.h" | 20 | #include "video_core/pica_state.h" |
| 21 | #include "video_core/texture/texture_decode.h" | ||
| 21 | #include "video_core/utils.h" | 22 | #include "video_core/utils.h" |
| 22 | 23 | ||
| 23 | SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_) | 24 | SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_) |
| @@ -512,7 +513,7 @@ void GraphicsSurfaceWidget::OnUpdate() { | |||
| 512 | } | 513 | } |
| 513 | 514 | ||
| 514 | const auto texture = Pica::g_state.regs.GetTextures()[texture_index]; | 515 | const auto texture = Pica::g_state.regs.GetTextures()[texture_index]; |
| 515 | auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(texture.config, texture.format); | 516 | auto info = Pica::Texture::TextureInfo::FromPicaRegister(texture.config, texture.format); |
| 516 | 517 | ||
| 517 | surface_address = info.physical_address; | 518 | surface_address = info.physical_address; |
| 518 | surface_width = info.width; | 519 | surface_width = info.width; |
| @@ -574,7 +575,7 @@ void GraphicsSurfaceWidget::OnUpdate() { | |||
| 574 | if (surface_format <= Format::MaxTextureFormat) { | 575 | if (surface_format <= Format::MaxTextureFormat) { |
| 575 | 576 | ||
| 576 | // Generate a virtual texture | 577 | // Generate a virtual texture |
| 577 | Pica::DebugUtils::TextureInfo info; | 578 | Pica::Texture::TextureInfo info; |
| 578 | info.physical_address = surface_address; | 579 | info.physical_address = surface_address; |
| 579 | info.width = surface_width; | 580 | info.width = surface_width; |
| 580 | info.height = surface_height; | 581 | info.height = surface_height; |
| @@ -583,7 +584,7 @@ void GraphicsSurfaceWidget::OnUpdate() { | |||
| 583 | 584 | ||
| 584 | for (unsigned int y = 0; y < surface_height; ++y) { | 585 | for (unsigned int y = 0; y < surface_height; ++y) { |
| 585 | for (unsigned int x = 0; x < surface_width; ++x) { | 586 | for (unsigned int x = 0; x < surface_width; ++x) { |
| 586 | Math::Vec4<u8> color = Pica::DebugUtils::LookupTexture(buffer, x, y, info, true); | 587 | Math::Vec4<u8> color = Pica::Texture::LookupTexture(buffer, x, y, info, true); |
| 587 | decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a())); | 588 | decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a())); |
| 588 | } | 589 | } |
| 589 | } | 590 | } |