summaryrefslogtreecommitdiffstats
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-24 04:30:48 +0100
committerGitHub <noreply@github.com>2018-03-24 04:30:48 +0100
commita10baacf9e5ab48af7fb0ccbdc75371c9287d3ba (patch)
tree9ed56f99b9d2564f9250d3754e429eb0c8b43323 /src/core/memory.h
parentMerge pull request #255 from Subv/sd_card (diff)
parentgl_rasterizer: Fake render in green, because it's cooler. (diff)
downloadyuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.tar
yuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.tar.gz
yuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.tar.bz2
yuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.tar.lz
yuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.tar.xz
yuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.tar.zst
yuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.zip
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 {
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,
};
@@ -242,4 +245,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, u64 size, FlushMode mode);
+
} // namespace Memory