diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-24 23:22:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-24 23:22:24 -0400 |
commit | ea3151f475e170eaaec3ded306a0fe5c1e5944db (patch) | |
tree | 6f7e127c4f58de6071d9a7dbd2af464dbbd14b9b /src/yuzu/debugger/graphics/graphics_surface.cpp | |
parent | 6c9ca8cbca1502346c0d22e141f21054087e6a96 (diff) | |
parent | c30cd898fc122d1277583c5165d622e323faad07 (diff) |
Merge pull request #388 from bunnei/refactor-rasterizer-cache
Refactor rasterizer cache
Diffstat (limited to 'src/yuzu/debugger/graphics/graphics_surface.cpp')
-rw-r--r-- | src/yuzu/debugger/graphics/graphics_surface.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp index 5fada74be..1fbca8ad0 100644 --- a/src/yuzu/debugger/graphics/graphics_surface.cpp +++ b/src/yuzu/debugger/graphics/graphics_surface.cpp @@ -378,10 +378,10 @@ void GraphicsSurfaceWidget::OnUpdate() { // TODO: Implement a good way to visualize alpha components! QImage decoded_image(surface_width, surface_height, QImage::Format_ARGB32); - VAddr address = gpu.memory_manager->PhysicalToVirtualAddress(surface_address); + boost::optional<VAddr> address = gpu.memory_manager->GpuToCpuAddress(surface_address); auto unswizzled_data = - Tegra::Texture::UnswizzleTexture(address, surface_format, surface_width, surface_height); + Tegra::Texture::UnswizzleTexture(*address, surface_format, surface_width, surface_height); auto texture_data = Tegra::Texture::DecodeTexture(unswizzled_data, surface_format, surface_width, surface_height); @@ -437,9 +437,9 @@ void GraphicsSurfaceWidget::SaveSurface() { pixmap->save(&file, "PNG"); } else if (selectedFilter == bin_filter) { auto& gpu = Core::System::GetInstance().GPU(); - VAddr address = gpu.memory_manager->PhysicalToVirtualAddress(surface_address); + boost::optional<VAddr> address = gpu.memory_manager->GpuToCpuAddress(surface_address); - const u8* buffer = Memory::GetPointer(address); + const u8* buffer = Memory::GetPointer(*address); ASSERT_MSG(buffer != nullptr, "Memory not accessible"); QFile file(filename); |