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 f406cc848..1c7232115 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
@@ -253,4 +256,19 @@ boost::optional<VAddr> PhysicalToVirtualAddress(PAddr addr);
253 */ 256 */
254u8* GetPhysicalPointer(PAddr address); 257u8* GetPhysicalPointer(PAddr address);
255 258
259enum class FlushMode {
260 /// Write back modified surfaces to RAM
261 Flush,
262 /// Remove region from the cache
263 Invalidate,
264 /// Write back modified surfaces to RAM, and also remove them from the cache
265 FlushAndInvalidate,
266};
267
268/**
269 * Flushes and invalidates any externally cached rasterizer resources touching the given virtual
270 * address region.
271 */
272void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode);
273
256} // namespace Memory 274} // namespace Memory