summaryrefslogtreecommitdiff
path: root/src/yuzu/debugger/graphics/graphics_surface.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-02-24 00:15:35 -0500
committerbunnei <bunneidev@gmail.com>2019-03-16 00:38:48 -0400
commit574e89d924b484b846f4eb522c5a62af9d63e801 (patch)
tree24b2d6e21b9e3aff77f2242eb94ec49a2b8e67c9 /src/yuzu/debugger/graphics/graphics_surface.cpp
parent47b622825ca0ff664044abdf2d64a141452a8d1c (diff)
video_core: Refactor to use MemoryManager interface for all memory access.
# Conflicts: # src/video_core/engines/kepler_memory.cpp # src/video_core/engines/maxwell_3d.cpp # src/video_core/morton.cpp # src/video_core/morton.h # src/video_core/renderer_opengl/gl_global_cache.cpp # src/video_core/renderer_opengl/gl_global_cache.h # src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
Diffstat (limited to 'src/yuzu/debugger/graphics/graphics_surface.cpp')
-rw-r--r--src/yuzu/debugger/graphics/graphics_surface.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp
index 71683da8e..29f01dfb2 100644
--- a/src/yuzu/debugger/graphics/graphics_surface.cpp
+++ b/src/yuzu/debugger/graphics/graphics_surface.cpp
@@ -383,13 +383,12 @@ void GraphicsSurfaceWidget::OnUpdate() {
// TODO: Implement a good way to visualize alpha components!
QImage decoded_image(surface_width, surface_height, QImage::Format_ARGB32);
- std::optional<VAddr> address = gpu.MemoryManager().GpuToCpuAddress(surface_address);
// TODO(bunnei): Will not work with BCn formats that swizzle 4x4 tiles.
// Needs to be fixed if we plan to use this feature more, otherwise we may remove it.
auto unswizzled_data = Tegra::Texture::UnswizzleTexture(
- *address, 1, 1, Tegra::Texture::BytesPerPixel(surface_format), surface_width,
- surface_height, 1U);
+ gpu.MemoryManager().GetPointer(surface_address), 1, 1,
+ Tegra::Texture::BytesPerPixel(surface_format), surface_width, surface_height, 1U);
auto texture_data = Tegra::Texture::DecodeTexture(unswizzled_data, surface_format,
surface_width, surface_height);