TexturePoolCache.cs 1.3 KB

123456789101112131415161718192021222324252627282930
  1. namespace Ryujinx.Graphics.Gpu.Image
  2. {
  3. /// <summary>
  4. /// Texture pool cache.
  5. /// This can keep multiple texture pools, and return the current one as needed.
  6. /// It is useful for applications that uses multiple texture pools.
  7. /// </summary>
  8. class TexturePoolCache : PoolCache<TexturePool>
  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 TexturePoolCache(GpuContext context) : base(context)
  15. {
  16. }
  17. /// <summary>
  18. /// Creates a new instance of the texture pool.
  19. /// </summary>
  20. /// <param name="context">GPU context that the texture pool belongs to</param>
  21. /// <param name="channel">GPU channel that the texture pool belongs to</param>
  22. /// <param name="address">Address of the texture pool in guest memory</param>
  23. /// <param name="maximumId">Maximum texture ID of the texture pool (equal to maximum textures minus one)</param>
  24. protected override TexturePool CreatePool(GpuContext context, GpuChannel channel, ulong address, int maximumId)
  25. {
  26. return new TexturePool(context, channel, address, maximumId);
  27. }
  28. }
  29. }