summaryrefslogtreecommitdiffstats
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-23 03:56:41 +0100
committerbunnei <bunneidev@gmail.com>2018-03-23 03:56:41 +0100
commit63d3924b5bb5dd17f1de9dfe3a357df293fc113d (patch)
tree7f636f8c396ea50329ac20e45b58c387d9722eba /src/core/memory.h
parentgl_rasterizer_cache: LoadGLBuffer should do a morton copy. (diff)
downloadyuzu-63d3924b5bb5dd17f1de9dfe3a357df293fc113d.tar
yuzu-63d3924b5bb5dd17f1de9dfe3a357df293fc113d.tar.gz
yuzu-63d3924b5bb5dd17f1de9dfe3a357df293fc113d.tar.bz2
yuzu-63d3924b5bb5dd17f1de9dfe3a357df293fc113d.tar.lz
yuzu-63d3924b5bb5dd17f1de9dfe3a357df293fc113d.tar.xz
yuzu-63d3924b5bb5dd17f1de9dfe3a357df293fc113d.tar.zst
yuzu-63d3924b5bb5dd17f1de9dfe3a357df293fc113d.zip
Diffstat (limited to '')
-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 {
Unmapped,
/// Page is mapped to regular memory. This is the only type you can get pointers to.
Memory,
- /// Page is mapped to a memory hook, which intercepts read and write requests.
+ /// Page is mapped to regular memory, but also needs to check for rasterizer cache flushing and
+ /// invalidation
+ RasterizerCachedMemory,
+ /// Page is mapped to a I/O region. Writing and reading to this page is handled by functions.
Special,
};
@@ -253,4 +256,19 @@ boost::optional<VAddr> PhysicalToVirtualAddress(PAddr addr);
*/
u8* GetPhysicalPointer(PAddr address);
+enum class FlushMode {
+ /// Write back modified surfaces to RAM
+ Flush,
+ /// Remove region from the cache
+ Invalidate,
+ /// Write back modified surfaces to RAM, and also remove them from the cache
+ FlushAndInvalidate,
+};
+
+/**
+ * Flushes and invalidates any externally cached rasterizer resources touching the given virtual
+ * address region.
+ */
+void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode);
+
} // namespace Memory