diff options
| author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2019-05-13 23:01:59 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-13 23:01:59 -0300 |
| commit | 940a71089d6bb6d4e4730bd8d9f742f7c3d8ad62 (patch) | |
| tree | 46832e0e0decfdc2b800202399bf61314eb88658 /src/video_core/rasterizer_cache.h | |
| parent | 7cb17834c76df6fc394d8b1b29e8f752f966710b (diff) | |
| parent | 4c36b7856737556d9a7a0fb21eb710f614194b5d (diff) | |
Merge pull request #2413 from FernandoS27/opt-gpu
Rasterizer Cache: refactor flushing & optimize memory usage of surfaces
Diffstat (limited to 'src/video_core/rasterizer_cache.h')
| -rw-r--r-- | src/video_core/rasterizer_cache.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/video_core/rasterizer_cache.h b/src/video_core/rasterizer_cache.h index 291772186..f820f3ed9 100644 --- a/src/video_core/rasterizer_cache.h +++ b/src/video_core/rasterizer_cache.h @@ -37,9 +37,6 @@ public: /// Gets the size of the shader in guest memory, required for cache management virtual std::size_t GetSizeInBytes() const = 0; - /// Wriets any cached resources back to memory - virtual void Flush() = 0; - /// Sets whether the cached object should be considered registered void SetIsRegistered(bool registered) { is_registered = registered; @@ -158,6 +155,8 @@ protected: return ++modified_ticks; } + virtual void FlushObjectInner(const T& object) = 0; + /// Flushes the specified object, updating appropriate cache state as needed void FlushObject(const T& object) { std::lock_guard lock{mutex}; @@ -165,7 +164,7 @@ protected: if (!object->IsDirty()) { return; } - object->Flush(); + FlushObjectInner(object); object->MarkAsModified(false, *this); } |
