aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/SamplerPool.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/SamplerPool.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/SamplerPool.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/SamplerPool.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs b/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs
index e95800ad..eb7222f9 100644
--- a/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs
+++ b/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs
@@ -1,16 +1,27 @@
using Ryujinx.Graphics.Gpu.Memory;
+using System.Collections.Generic;
namespace Ryujinx.Graphics.Gpu.Image
{
/// <summary>
/// Sampler pool.
/// </summary>
- class SamplerPool : Pool<Sampler, SamplerDescriptor>
+ class SamplerPool : Pool<Sampler, SamplerDescriptor>, IPool<SamplerPool>
{
private float _forcedAnisotropy;
/// <summary>
- /// Constructs a new instance of the sampler pool.
+ /// Linked list node used on the sampler pool cache.
+ /// </summary>
+ public LinkedListNode<SamplerPool> CacheNode { get; set; }
+
+ /// <summary>
+ /// Timestamp used by the sampler pool cache, updated on every use of this sampler pool.
+ /// </summary>
+ public ulong CacheTimestamp { get; set; }
+
+ /// <summary>
+ /// Creates a new instance of the sampler pool.
/// </summary>
/// <param name="context">GPU context that the sampler pool belongs to</param>
/// <param name="physicalMemory">Physical memory where the sampler descriptors are mapped</param>