diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-08 10:01:44 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-08 10:01:44 +0200 |
commit | c99f5d405b6a24603ff8174aeb2952facc4a92d9 (patch) | |
tree | c6ae4894793bb3d4868fe1095d61de877adff7ec /src/video_core/texture_cache/texture_cache.h | |
parent | texture_cache: Handle 3D texture blits with one layer (diff) | |
download | yuzu-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/texture_cache/texture_cache.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 16 |
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()); } |