SamplerPoolCache.cs
1 namespace Ryujinx.Graphics.Gpu.Image 2 { 3 /// <summary> 4 /// Sampler pool cache. 5 /// This can keep multiple sampler pools, and return the current one as needed. 6 /// It is useful for applications that uses multiple sampler pools. 7 /// </summary> 8 class SamplerPoolCache : PoolCache<SamplerPool> 9 { 10 /// <summary> 11 /// Constructs a new instance of the texture pool. 12 /// </summary> 13 /// <param name="context">GPU context that the texture pool belongs to</param> 14 public SamplerPoolCache(GpuContext context) : base(context) 15 { 16 } 17 18 /// <summary> 19 /// Creates a new instance of the sampler pool. 20 /// </summary> 21 /// <param name="context">GPU context that the sampler pool belongs to</param> 22 /// <param name="channel">GPU channel that the texture pool belongs to</param> 23 /// <param name="address">Address of the sampler pool in guest memory</param> 24 /// <param name="maximumId">Maximum sampler ID of the sampler pool (equal to maximum samplers minus one)</param> 25 protected override SamplerPool CreatePool(GpuContext context, GpuChannel channel, ulong address, int maximumId) 26 { 27 return new SamplerPool(context, channel.MemoryManager.Physical, address, maximumId); 28 } 29 } 30 }