summaryrefslogtreecommitdiff
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-03-23 23:30:48 -0400
committerGravatar GitHub2018-03-23 23:30:48 -0400
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.gz
yuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.tar.xz
yuzu-a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba.zip
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 {
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