aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/debugger/graphics/graphics_surface.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-03-16 21:59:45 -0400
committerGitHub <noreply@github.com>2019-03-16 21:59:45 -0400
commit2392e146b09c2a4b3bb557bb3a20c4afc7f75957 (patch)
tree1eafa50be7af78d74b4781fbe858277ac8ab1d35 /src/yuzu/debugger/graphics/graphics_surface.cpp
parentbf41132aa96f9b9b5f95b87c2add5ed7440bcbf3 (diff)
parent574e89d924b484b846f4eb522c5a62af9d63e801 (diff)
Merge pull request #2244 from bunnei/gpu-mem-refactor
video_core: Refactor to use MemoryManager interface for all memory access.
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);