summaryrefslogtreecommitdiff
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-23 23:30:48 -0400
committerGitHub <noreply@github.com>2018-03-23 23:30:48 -0400
commita10baacf9e5ab48af7fb0ccbdc75371c9287d3ba (patch)
tree9ed56f99b9d2564f9250d3754e429eb0c8b43323 /src/core/memory.h
parenta397a9e9a4bad1ed03229082408b7fa424295530 (diff)
parentd561e4acc8bd3f9a7d677fe713ab0a748ff7dd9c (diff)
Merge pull request #265 from bunnei/tegra-progress-2
Tegra progress 2
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