summaryrefslogtreecommitdiffstats
path: root/src/core/memory.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-09 03:39:41 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:42 +0200
commitab9aae28bf5daa5fa7105bb4ef41b6d0b3c9cdc1 (patch)
treeec11dc90eb2cad49237eecc98766f61b04724254 /src/core/memory.cpp
parentScheduler: Set last running time on thread. (diff)
downloadyuzu-ab9aae28bf5daa5fa7105bb4ef41b6d0b3c9cdc1.tar
yuzu-ab9aae28bf5daa5fa7105bb4ef41b6d0b3c9cdc1.tar.gz
yuzu-ab9aae28bf5daa5fa7105bb4ef41b6d0b3c9cdc1.tar.bz2
yuzu-ab9aae28bf5daa5fa7105bb4ef41b6d0b3c9cdc1.tar.lz
yuzu-ab9aae28bf5daa5fa7105bb4ef41b6d0b3c9cdc1.tar.xz
yuzu-ab9aae28bf5daa5fa7105bb4ef41b6d0b3c9cdc1.tar.zst
yuzu-ab9aae28bf5daa5fa7105bb4ef41b6d0b3c9cdc1.zip
Diffstat (limited to '')
-rw-r--r--src/core/memory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 4cb5d05e5..7def00768 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -715,8 +715,8 @@ struct Memory::Impl {
ASSERT_MSG(false, "Mapped memory page without a pointer @ {:016X}", vaddr);
break;
case Common::PageType::RasterizerCachedMemory: {
- u8* host_ptr{GetPointerFromVMA(vaddr)};
- system.GPU().InvalidateRegion(ToCacheAddr(host_ptr), sizeof(T));
+ u8* host_ptr{GetPointerFromRasterizerCachedMemory(vaddr)};
+ system.GPU().InvalidateRegion(vaddr, sizeof(T));
T volatile* pointer = reinterpret_cast<T volatile*>(&host_ptr);
return Common::AtomicCompareAndSwap(pointer, data, expected);
break;
@@ -745,8 +745,8 @@ struct Memory::Impl {
ASSERT_MSG(false, "Mapped memory page without a pointer @ {:016X}", vaddr);
break;
case Common::PageType::RasterizerCachedMemory: {
- u8* host_ptr{GetPointerFromVMA(vaddr)};
- system.GPU().InvalidateRegion(ToCacheAddr(host_ptr), sizeof(u128));
+ u8* host_ptr{GetPointerFromRasterizerCachedMemory(vaddr)};
+ system.GPU().InvalidateRegion(vaddr, sizeof(u128));
u64 volatile* pointer = reinterpret_cast<u64 volatile*>(&host_ptr);
return Common::AtomicCompareAndSwap(pointer, data, expected);
break;