summaryrefslogtreecommitdiff
path: root/src/core/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/memory.h')
-rw-r--r--src/core/memory.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index f5bf0141f..4b9c482fe 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -36,7 +36,10 @@ enum class PageType : u8 {
36 Unmapped, 36 Unmapped,
37 /// Page is mapped to regular memory. This is the only type you can get pointers to. 37 /// Page is mapped to regular memory. This is the only type you can get pointers to.
38 Memory, 38 Memory,
39 /// Page is mapped to a memory hook, which intercepts read and write requests. 39 /// Page is mapped to regular memory, but also needs to check for rasterizer cache flushing and
40 /// invalidation
41 RasterizerCachedMemory,
42 /// Page is mapped to a I/O region. Writing and reading to this page is handled by functions.
40 Special, 43 Special,
41}; 44};
42 45
@@ -242,4 +245,19 @@ boost::optional<VAddr> PhysicalToVirtualAddress(PAddr addr);
242 */ 245 */
243u8* GetPhysicalPointer(PAddr address); 246u8* GetPhysicalPointer(PAddr address);
244 247
248enum class FlushMode {
249 /// Write back modified surfaces to RAM
250 Flush,
251 /// Remove region from the cache
252 Invalidate,
253 /// Write back modified surfaces to RAM, and also remove them from the cache
254 FlushAndInvalidate,
255};
256
257/**
258 * Flushes and invalidates any externally cached rasterizer resources touching the given virtual
259 * address region.
260 */
261void RasterizerFlushVirtualRegion(VAddr start, u64 size, FlushMode mode);
262
245} // namespace Memory 263} // namespace Memory