summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-03-16 05:05:24 +0100
committerGitHub <noreply@github.com>2019-03-16 05:05:24 +0100
commit47b622825ca0ff664044abdf2d64a141452a8d1c (patch)
treeff18141caee2b1a460e6d5e22283e78c073880b0 /src/video_core/engines/maxwell_3d.cpp
parentMerge pull request #2048 from FearlessTobi/port-3924 (diff)
parentgpu: Use host address for caching instead of guest address. (diff)
downloadyuzu-47b622825ca0ff664044abdf2d64a141452a8d1c.tar
yuzu-47b622825ca0ff664044abdf2d64a141452a8d1c.tar.gz
yuzu-47b622825ca0ff664044abdf2d64a141452a8d1c.tar.bz2
yuzu-47b622825ca0ff664044abdf2d64a141452a8d1c.tar.lz
yuzu-47b622825ca0ff664044abdf2d64a141452a8d1c.tar.xz
yuzu-47b622825ca0ff664044abdf2d64a141452a8d1c.tar.zst
yuzu-47b622825ca0ff664044abdf2d64a141452a8d1c.zip
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp5
1 files changed, 4 insertions, 1 deletions
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.