diff options
author | bunnei <bunneidev@gmail.com> | 2019-02-07 02:19:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-07 02:19:20 +0100 |
commit | 10ab714fe015b28215ce61e6b4f9085c954a409d (patch) | |
tree | 3c9d5c9ad759749d53773c6416be38d476d483bf /src/video_core/engines/kepler_memory.cpp | |
parent | Merge pull request #2071 from ReinUsesLisp/dsa-texture (diff) | |
parent | video_core: Assert on invalid GPU to CPU address queries (diff) | |
download | yuzu-10ab714fe015b28215ce61e6b4f9085c954a409d.tar yuzu-10ab714fe015b28215ce61e6b4f9085c954a409d.tar.gz yuzu-10ab714fe015b28215ce61e6b4f9085c954a409d.tar.bz2 yuzu-10ab714fe015b28215ce61e6b4f9085c954a409d.tar.lz yuzu-10ab714fe015b28215ce61e6b4f9085c954a409d.tar.xz yuzu-10ab714fe015b28215ce61e6b4f9085c954a409d.tar.zst yuzu-10ab714fe015b28215ce61e6b4f9085c954a409d.zip |
Diffstat (limited to 'src/video_core/engines/kepler_memory.cpp')
-rw-r--r-- | src/video_core/engines/kepler_memory.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/video_core/engines/kepler_memory.cpp b/src/video_core/engines/kepler_memory.cpp index 4880191fc..5c1029ddf 100644 --- a/src/video_core/engines/kepler_memory.cpp +++ b/src/video_core/engines/kepler_memory.cpp @@ -39,16 +39,17 @@ void KeplerMemory::ProcessData(u32 data) { ASSERT_MSG(regs.exec.linear, "Non-linear uploads are not supported"); ASSERT(regs.dest.x == 0 && regs.dest.y == 0 && regs.dest.z == 0); - GPUVAddr address = regs.dest.Address(); - VAddr dest_address = - *memory_manager.GpuToCpuAddress(address + state.write_offset * sizeof(u32)); + const GPUVAddr address = regs.dest.Address(); + const auto dest_address = + memory_manager.GpuToCpuAddress(address + state.write_offset * sizeof(u32)); + ASSERT_MSG(dest_address, "Invalid GPU address"); // We have to invalidate the destination region to evict any outdated surfaces from the cache. // We do this before actually writing the new data because the destination address might contain // a dirty surface that will have to be written back to memory. - rasterizer.InvalidateRegion(dest_address, sizeof(u32)); + rasterizer.InvalidateRegion(*dest_address, sizeof(u32)); - Memory::Write32(dest_address, data); + Memory::Write32(*dest_address, data); Core::System::GetInstance().GPU().Maxwell3D().dirty_flags.OnMemoryWrite(); state.write_offset++; |