diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-23 23:30:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-23 23:30:48 -0400 |
commit | a10baacf9e5ab48af7fb0ccbdc75371c9287d3ba (patch) | |
tree | 9ed56f99b9d2564f9250d3754e429eb0c8b43323 /src/core/memory.h | |
parent | a397a9e9a4bad1ed03229082408b7fa424295530 (diff) | |
parent | d561e4acc8bd3f9a7d677fe713ab0a748ff7dd9c (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.h | 20 |
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 |