2019-10-13 02:02:07 -04:00
|
|
|
namespace Ryujinx.Graphics.Gpu.Image
|
|
|
|
{
|
2019-12-29 18:26:37 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Texture pool cache.
|
|
|
|
/// This can keep multiple texture pools, and return the current one as needed.
|
|
|
|
/// It is useful for applications that uses multiple texture pools.
|
|
|
|
/// </summary>
|
2022-07-27 20:07:48 -04:00
|
|
|
class TexturePoolCache : PoolCache<TexturePool>
|
2019-10-13 02:02:07 -04:00
|
|
|
{
|
2019-12-29 18:26:37 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Constructs a new instance of the texture pool.
|
|
|
|
/// </summary>
|
2020-01-01 18:14:18 -05:00
|
|
|
/// <param name="context">GPU context that the texture pool belongs to</param>
|
2022-07-27 20:07:48 -04:00
|
|
|
public TexturePoolCache(GpuContext context) : base(context)
|
2019-10-13 02:02:07 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-12-29 18:26:37 -05:00
|
|
|
/// <summary>
|
2022-07-27 20:07:48 -04:00
|
|
|
/// Creates a new instance of the texture pool.
|
2019-12-29 18:26:37 -05:00
|
|
|
/// </summary>
|
2022-07-27 20:07:48 -04:00
|
|
|
/// <param name="context">GPU context that the texture pool belongs to</param>
|
|
|
|
/// <param name="channel">GPU channel that the texture pool belongs to</param>
|
|
|
|
/// <param name="address">Address of the texture pool in guest memory</param>
|
|
|
|
/// <param name="maximumId">Maximum texture ID of the texture pool (equal to maximum textures minus one)</param>
|
|
|
|
protected override TexturePool CreatePool(GpuContext context, GpuChannel channel, ulong address, int maximumId)
|
2019-10-13 02:02:07 -04:00
|
|
|
{
|
2022-07-27 20:07:48 -04:00
|
|
|
return new TexturePool(context, channel, address, maximumId);
|
2019-10-13 02:02:07 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|