From 3c3bcd82fe6dfa8bdc2c9a9f33724ebfacd7dd40 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 27 Jul 2022 21:07:48 -0300 Subject: Add a sampler pool cache and improve texture pool cache (#3487) * Add a sampler pool cache and improve texture pool cache * Increase disposal timestamp delta more to be on the safe side * Nits * Use abstract class for PoolCache, remove factory callback --- Ryujinx.Graphics.Gpu/Image/TexturePool.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Image/TexturePool.cs') diff --git a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs index 75974c43..4d2544e2 100644 --- a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs +++ b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs @@ -10,19 +10,24 @@ namespace Ryujinx.Graphics.Gpu.Image /// /// Texture pool. /// - class TexturePool : Pool + class TexturePool : Pool, IPool { private readonly GpuChannel _channel; private readonly ConcurrentQueue _dereferenceQueue = new ConcurrentQueue(); private TextureDescriptor _defaultDescriptor; /// - /// Intrusive linked list node used on the texture pool cache. + /// Linked list node used on the texture pool cache. /// public LinkedListNode CacheNode { get; set; } /// - /// Constructs a new instance of the texture pool. + /// Timestamp used by the texture pool cache, updated on every use of this texture pool. + /// + public ulong CacheTimestamp { get; set; } + + /// + /// Creates a new instance of the texture pool. /// /// GPU context that the texture pool belongs to /// GPU channel that the texture pool belongs to -- cgit v1.2.3