diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-04-16 05:05:05 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-04-16 05:10:24 +0200 |
commit | ef381e6924ee28162d3ce1cff0523ea7a88981d2 (patch) | |
tree | 59967fcddc8f7c4586818dea3378c924cd53d426 /src/video_core/memory_manager.cpp | |
parent | GPU MemoryManager: Implement ReadBlockUnsafe and WriteBlockUnsafe (diff) | |
download | yuzu-ef381e6924ee28162d3ce1cff0523ea7a88981d2.tar yuzu-ef381e6924ee28162d3ce1cff0523ea7a88981d2.tar.gz yuzu-ef381e6924ee28162d3ce1cff0523ea7a88981d2.tar.bz2 yuzu-ef381e6924ee28162d3ce1cff0523ea7a88981d2.tar.lz yuzu-ef381e6924ee28162d3ce1cff0523ea7a88981d2.tar.xz yuzu-ef381e6924ee28162d3ce1cff0523ea7a88981d2.tar.zst yuzu-ef381e6924ee28162d3ce1cff0523ea7a88981d2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/memory_manager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index 3b9f6caf0..20d744c61 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -234,6 +234,7 @@ void MemoryManager::ReadBlockUnsafe(GPUVAddr src_addr, void* dest_buffer, std::s while (remaining_size > 0) { const std::size_t copy_amount{ std::min(static_cast<std::size_t>(page_size) - page_offset, remaining_size)}; + const u8* src_ptr{page_table.pointers[page_index] + page_offset}; std::memcpy(dest_buffer, src_ptr, copy_amount); page_index++; page_offset = 0; @@ -277,6 +278,7 @@ void MemoryManager::WriteBlockUnsafe(GPUVAddr dest_addr, const void* src_buffer, while (remaining_size > 0) { const std::size_t copy_amount{ std::min(static_cast<std::size_t>(page_size) - page_offset, remaining_size)}; + u8* dest_ptr{page_table.pointers[page_index] + page_offset}; std::memcpy(dest_ptr, src_buffer, copy_amount); page_index++; page_offset = 0; |