From 2eaf6c41a4686028c0abc84d1be6fd48a67cf49f Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 18 Feb 2019 20:58:32 -0500 Subject: gpu: Use host address for caching instead of guest address. --- src/video_core/engines/maxwell_3d.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/video_core/engines/maxwell_3d.cpp') diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 144e7fa82..49979694e 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -396,7 +396,10 @@ void Maxwell3D::ProcessCBData(u32 value) { const auto address = memory_manager.GpuToCpuAddress(buffer_address + regs.const_buffer.cb_pos); ASSERT_MSG(address, "Invalid GPU address"); - Memory::Write32(*address, value); + u8* ptr{Memory::GetPointer(*address)}; + rasterizer.InvalidateRegion(ToCacheAddr(ptr), sizeof(u32)); + std::memcpy(ptr, &value, sizeof(u32)); + dirty_flags.OnMemoryWrite(); // Increment the current buffer position. -- cgit v1.2.3