summaryrefslogtreecommitdiffstats
path: root/src/core/device_memory_manager.inc
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-02-22 18:34:23 +0100
committerGitHub <noreply@github.com>2024-02-22 18:34:23 +0100
commit2b3f1d3fc53c1b7a729c3f1cebbddebcd9427952 (patch)
tree212f3f415073e1fda5c8859e6dbb5ef2d0887128 /src/core/device_memory_manager.inc
parentMerge pull request #13001 from liamwhite/scaled-availability (diff)
parentdevice_memory_manager: skip unregistered interfaces on invalidate (diff)
downloadyuzu-2b3f1d3fc53c1b7a729c3f1cebbddebcd9427952.tar
yuzu-2b3f1d3fc53c1b7a729c3f1cebbddebcd9427952.tar.gz
yuzu-2b3f1d3fc53c1b7a729c3f1cebbddebcd9427952.tar.bz2
yuzu-2b3f1d3fc53c1b7a729c3f1cebbddebcd9427952.tar.lz
yuzu-2b3f1d3fc53c1b7a729c3f1cebbddebcd9427952.tar.xz
yuzu-2b3f1d3fc53c1b7a729c3f1cebbddebcd9427952.tar.zst
yuzu-2b3f1d3fc53c1b7a729c3f1cebbddebcd9427952.zip
Diffstat (limited to 'src/core/device_memory_manager.inc')
-rw-r--r--src/core/device_memory_manager.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/device_memory_manager.inc b/src/core/device_memory_manager.inc
index 37c1e69c3..f104d495b 100644
--- a/src/core/device_memory_manager.inc
+++ b/src/core/device_memory_manager.inc
@@ -522,13 +522,17 @@ void DeviceMemoryManager<Traits>::UpdatePagesCachedCount(DAddr addr, size_t size
auto* memory_device_inter = registered_processes[asid.id];
const auto release_pending = [&] {
if (uncache_bytes > 0) {
- MarkRegionCaching(memory_device_inter, uncache_begin << Memory::YUZU_PAGEBITS,
- uncache_bytes, false);
+ if (memory_device_inter != nullptr) {
+ MarkRegionCaching(memory_device_inter, uncache_begin << Memory::YUZU_PAGEBITS,
+ uncache_bytes, false);
+ }
uncache_bytes = 0;
}
if (cache_bytes > 0) {
- MarkRegionCaching(memory_device_inter, cache_begin << Memory::YUZU_PAGEBITS,
- cache_bytes, true);
+ if (memory_device_inter != nullptr) {
+ MarkRegionCaching(memory_device_inter, cache_begin << Memory::YUZU_PAGEBITS,
+ cache_bytes, true);
+ }
cache_bytes = 0;
}
};