diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-08-15 15:35:53 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-08-28 17:54:12 +0200 |
commit | d540d284b5711f044678191bbab858de626103a9 (patch) | |
tree | 42839b218c848973c1886c7b288d2708821130a5 /src/video_core/texture_cache/texture_cache_base.h | |
parent | Merge pull request #6929 from yuzu-emu/revert-6870-trace-back-stack-back-stack-back (diff) | |
download | yuzu-d540d284b5711f044678191bbab858de626103a9.tar yuzu-d540d284b5711f044678191bbab858de626103a9.tar.gz yuzu-d540d284b5711f044678191bbab858de626103a9.tar.bz2 yuzu-d540d284b5711f044678191bbab858de626103a9.tar.lz yuzu-d540d284b5711f044678191bbab858de626103a9.tar.xz yuzu-d540d284b5711f044678191bbab858de626103a9.tar.zst yuzu-d540d284b5711f044678191bbab858de626103a9.zip |
Diffstat (limited to 'src/video_core/texture_cache/texture_cache_base.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache_base.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h index e4ae351cb..d7528ed24 100644 --- a/src/video_core/texture_cache/texture_cache_base.h +++ b/src/video_core/texture_cache/texture_cache_base.h @@ -14,6 +14,7 @@ #include "common/common_types.h" #include "common/literals.h" +#include "common/lru_cache.h" #include "video_core/compatible_formats.h" #include "video_core/delayed_destruction_ring.h" #include "video_core/engines/fermi_2d.h" @@ -370,6 +371,12 @@ private: std::vector<ImageId> uncommitted_downloads; std::queue<std::vector<ImageId>> committed_downloads; + struct LRUItemParams { + using ObjectType = ImageId; + using TickType = u64; + }; + Common::LeastRecentlyUsedCache<LRUItemParams> lru_cache; + static constexpr size_t TICKS_TO_DESTROY = 6; DelayedDestructionRing<Image, TICKS_TO_DESTROY> sentenced_images; DelayedDestructionRing<ImageView, TICKS_TO_DESTROY> sentenced_image_view; @@ -379,7 +386,6 @@ private: u64 modification_tick = 0; u64 frame_tick = 0; - typename SlotVector<Image>::Iterator deletion_iterator; }; } // namespace VideoCommon |