gpu: Use host address for caching instead of guest address.

This commit is contained in:
bunnei
2019-02-18 20:58:32 -05:00
parent 84d3cdf7d7
commit 2eaf6c41a4
26 changed files with 393 additions and 293 deletions

View File

@ -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.