summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-06-08 10:01:44 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-06-08 10:01:44 +0200
commitc99f5d405b6a24603ff8174aeb2952facc4a92d9 (patch)
treec6ae4894793bb3d4868fe1095d61de877adff7ec /src/video_core
parenttexture_cache: Handle 3D texture blits with one layer (diff)
downloadyuzu-c99f5d405b6a24603ff8174aeb2952facc4a92d9.tar
yuzu-c99f5d405b6a24603ff8174aeb2952facc4a92d9.tar.gz
yuzu-c99f5d405b6a24603ff8174aeb2952facc4a92d9.tar.bz2
yuzu-c99f5d405b6a24603ff8174aeb2952facc4a92d9.tar.lz
yuzu-c99f5d405b6a24603ff8174aeb2952facc4a92d9.tar.xz
yuzu-c99f5d405b6a24603ff8174aeb2952facc4a92d9.tar.zst
yuzu-c99f5d405b6a24603ff8174aeb2952facc4a92d9.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/texture_cache/texture_cache.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 60b95a854..b19eeed66 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -298,15 +298,13 @@ public:
const GPUVAddr src_gpu_addr = src_config.Address();
const GPUVAddr dst_gpu_addr = dst_config.Address();
DeduceBestBlit(src_params, dst_params, src_gpu_addr, dst_gpu_addr);
- const std::optional<VAddr> dst_cpu_addr =
- system.GPU().MemoryManager().GpuToCpuAddress(dst_gpu_addr);
- const std::optional<VAddr> src_cpu_addr =
- system.GPU().MemoryManager().GpuToCpuAddress(src_gpu_addr);
- std::pair<TSurface, TView> dst_surface =
- GetSurface(dst_gpu_addr, *dst_cpu_addr, dst_params, true, false);
- std::pair<TSurface, TView> src_surface =
- GetSurface(src_gpu_addr, *src_cpu_addr, src_params, true, false);
- ImageBlit(src_surface.second, dst_surface.second, copy_config);
+
+ const auto& memory_manager = system.GPU().MemoryManager();
+ const std::optional<VAddr> dst_cpu_addr = memory_manager.GpuToCpuAddress(dst_gpu_addr);
+ const std::optional<VAddr> src_cpu_addr = memory_manager.GpuToCpuAddress(src_gpu_addr);
+ std::pair dst_surface = GetSurface(dst_gpu_addr, *dst_cpu_addr, dst_params, true, false);
+ TView src_surface = GetSurface(src_gpu_addr, *src_cpu_addr, src_params, true, false).second;
+ ImageBlit(src_surface, dst_surface.second, copy_config);
dst_surface.first->MarkAsModified(true, Tick());
}