SamplerPoolCache.cs 1.3 KB

123456789101112131415161718192021222324252627282930
  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. /// <summary>
  18. /// Creates a new instance of the sampler pool.
  19. /// </summary>
  20. /// <param name="context">GPU context that the sampler pool belongs to</param>
  21. /// <param name="channel">GPU channel that the texture pool belongs to</param>
  22. /// <param name="address">Address of the sampler pool in guest memory</param>
  23. /// <param name="maximumId">Maximum sampler ID of the sampler pool (equal to maximum samplers minus one)</param>
  24. protected override SamplerPool CreatePool(GpuContext context, GpuChannel channel, ulong address, int maximumId)
  25. {
  26. return new SamplerPool(context, channel.MemoryManager.Physical, address, maximumId);
  27. }
  28. }
  29. }