summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-11 06:18:34 +0200
committerbunnei <bunneidev@gmail.com>2018-10-11 06:19:36 +0200
commitbf795edac483ab76ca21f5d0d5d19dccd15dc1a9 (patch)
tree01e2ea0bfa1ea2208967025eccc1233980298b59 /src/core/hle/service
parentMerge pull request #1458 from FernandoS27/fix-render-target-block-settings (diff)
downloadyuzu-bf795edac483ab76ca21f5d0d5d19dccd15dc1a9.tar
yuzu-bf795edac483ab76ca21f5d0d5d19dccd15dc1a9.tar.gz
yuzu-bf795edac483ab76ca21f5d0d5d19dccd15dc1a9.tar.bz2
yuzu-bf795edac483ab76ca21f5d0d5d19dccd15dc1a9.tar.lz
yuzu-bf795edac483ab76ca21f5d0d5d19dccd15dc1a9.tar.xz
yuzu-bf795edac483ab76ca21f5d0d5d19dccd15dc1a9.tar.zst
yuzu-bf795edac483ab76ca21f5d0d5d19dccd15dc1a9.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
index 7555bbe7d..8d194e175 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp
@@ -167,10 +167,11 @@ u32 nvhost_as_gpu::UnmapBuffer(const std::vector<u8>& input, std::vector<u8>& ou
auto& system_instance = Core::System::GetInstance();
// Remove this memory region from the rasterizer cache.
- system_instance.Renderer().Rasterizer().FlushAndInvalidateRegion(params.offset,
- itr->second.size);
-
auto& gpu = system_instance.GPU();
+ auto cpu_addr = gpu.MemoryManager().GpuToCpuAddress(params.offset);
+ ASSERT(cpu_addr);
+ system_instance.Renderer().Rasterizer().FlushAndInvalidateRegion(*cpu_addr, itr->second.size);
+
params.offset = gpu.MemoryManager().UnmapBuffer(params.offset, itr->second.size);
buffer_mappings.erase(itr->second.offset);