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