diff options
| author | 2019-07-08 22:19:27 -0700 | |
|---|---|---|
| committer | 2019-07-08 22:52:05 -0700 | |
| commit | 697206092e8ac28c7dfe83eff0eea6613082740c (patch) | |
| tree | 587b19d4fbf727a88524fefff496c2c12d9f7f97 /src/core | |
| parent | Remove unused member function declaration (diff) | |
| download | yuzu-697206092e8ac28c7dfe83eff0eea6613082740c.tar.gz yuzu-697206092e8ac28c7dfe83eff0eea6613082740c.tar.xz yuzu-697206092e8ac28c7dfe83eff0eea6613082740c.zip | |
Prevent merging of device mapped memory blocks.
This sets the DeviceMapped attribute for GPU-mapped memory blocks,
and prevents merging device mapped blocks. This prevents memory
mapped from the gpu from having its backing address changed by
block coalesce.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 775d170bf..72a9d7717 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp | |||
| @@ -51,6 +51,11 @@ bool VirtualMemoryArea::CanBeMergedWith(const VirtualMemoryArea& next) const { | |||
| 51 | type != next.type) { | 51 | type != next.type) { |
| 52 | return false; | 52 | return false; |
| 53 | } | 53 | } |
| 54 | if ((attribute & MemoryAttribute::DeviceMapped) == MemoryAttribute::DeviceMapped) { | ||
| 55 | // TODO: Can device mapped memory be merged sanely? | ||
| 56 | // Not merging it may cause inaccuracies versus hardware when memory layout is queried. | ||
| 57 | return false; | ||
| 58 | } | ||
| 54 | if (type == VMAType::AllocatedMemoryBlock) { | 59 | if (type == VMAType::AllocatedMemoryBlock) { |
| 55 | return true; | 60 | return true; |
| 56 | } | 61 | } |