aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-07-27 21:07:48 -0300
committerGitHub <noreply@github.com>2022-07-27 21:07:48 -0300
commit3c3bcd82fe6dfa8bdc2c9a9f33724ebfacd7dd40 (patch)
tree1945094df81c8de1dd540508a6d59d82b5a18d39 /Ryujinx.Graphics.Gpu/Image/TexturePool.cs
parenta00c59a46c372ad004cb5b6c9aca97e6f5e9e910 (diff)
Add a sampler pool cache and improve texture pool cache (#3487)1.1.194
* 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
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TexturePool.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TexturePool.cs11
1 files changed, 8 insertions, 3 deletions
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
/// <summary>
/// Texture pool.
/// </summary>
- class TexturePool : Pool<Texture, TextureDescriptor>
+ class TexturePool : Pool<Texture, TextureDescriptor>, IPool<TexturePool>
{
private readonly GpuChannel _channel;
private readonly ConcurrentQueue<Texture> _dereferenceQueue = new ConcurrentQueue<Texture>();
private TextureDescriptor _defaultDescriptor;
/// <summary>
- /// Intrusive linked list node used on the texture pool cache.
+ /// Linked list node used on the texture pool cache.
/// </summary>
public LinkedListNode<TexturePool> CacheNode { get; set; }
/// <summary>
- /// Constructs a new instance of the texture pool.
+ /// Timestamp used by the texture pool cache, updated on every use of this texture pool.
+ /// </summary>
+ public ulong CacheTimestamp { get; set; }
+
+ /// <summary>
+ /// Creates a new instance of the texture pool.
/// </summary>
/// <param name="context">GPU context that the texture pool belongs to</param>
/// <param name="channel">GPU channel that the texture pool belongs to</param>