diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-04-16 22:39:27 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-04-20 02:44:56 +0200 |
commit | a3eb91ed8ce3384d5bb1cf6df2cea4a6ebb5a976 (patch) | |
tree | b686fa63959634e2ea9fdaf5974b1826392d99d0 /src/video_core/rasterizer_cache.h | |
parent | Merge pull request #2415 from lioncash/const (diff) | |
download | yuzu-a3eb91ed8ce3384d5bb1cf6df2cea4a6ebb5a976.tar yuzu-a3eb91ed8ce3384d5bb1cf6df2cea4a6ebb5a976.tar.gz yuzu-a3eb91ed8ce3384d5bb1cf6df2cea4a6ebb5a976.tar.bz2 yuzu-a3eb91ed8ce3384d5bb1cf6df2cea4a6ebb5a976.tar.lz yuzu-a3eb91ed8ce3384d5bb1cf6df2cea4a6ebb5a976.tar.xz yuzu-a3eb91ed8ce3384d5bb1cf6df2cea4a6ebb5a976.tar.zst yuzu-a3eb91ed8ce3384d5bb1cf6df2cea4a6ebb5a976.zip |
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); } |