diff options
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 14db64f9d..e5ca78ef4 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -1001,4 +1001,17 @@ void Memory::FlushRegion(Common::ProcessAddress dest_addr, size_t size) { | |||
| 1001 | impl->FlushRegion(dest_addr, size); | 1001 | impl->FlushRegion(dest_addr, size); |
| 1002 | } | 1002 | } |
| 1003 | 1003 | ||
| 1004 | bool Memory::InvalidateNCE(Common::ProcessAddress vaddr, size_t size) { | ||
| 1005 | bool mapped = true; | ||
| 1006 | u8* const ptr = impl->GetPointerImpl( | ||
| 1007 | GetInteger(vaddr), | ||
| 1008 | [&] { | ||
| 1009 | LOG_ERROR(HW_Memory, "Unmapped InvalidateNCE for {} bytes @ {:#x}", size, | ||
| 1010 | GetInteger(vaddr)); | ||
| 1011 | mapped = false; | ||
| 1012 | }, | ||
| 1013 | [&] { impl->system.GPU().InvalidateRegion(GetInteger(vaddr), size); }); | ||
| 1014 | return mapped && ptr != nullptr; | ||
| 1015 | } | ||
| 1016 | |||
| 1004 | } // namespace Core::Memory | 1017 | } // namespace Core::Memory |