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
This commit is contained in:
parent
a00c59a46c
commit
3c3bcd82fe
8 changed files with 321 additions and 136 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue