2019-10-13 08:02:07 +02:00
|
|
|
namespace Ryujinx.Graphics.Gpu.Image
|
|
|
|
{
|
2019-12-30 00:26:37 +01: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-28 02:07:48 +02:00
|
|
|
class TexturePoolCache : PoolCache<TexturePool>
|
2019-10-13 08:02:07 +02:00
|
|
|
{
|
2019-12-30 00:26:37 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Constructs a new instance of the texture pool.
|
|
|
|
/// </summary>
|
2020-01-02 00:14:18 +01:00
|
|
|
/// <param name="context">GPU context that the texture pool belongs to</param>
|
2022-07-28 02:07:48 +02:00
|
|
|
public TexturePoolCache(GpuContext context) : base(context)
|
2019-10-13 08:02:07 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-12-30 00:26:37 +01:00
|
|
|
/// <summary>
|
2022-07-28 02:07:48 +02:00
|
|
|
/// Creates a new instance of the texture pool.
|
2019-12-30 00:26:37 +01:00
|
|
|
/// </summary>
|
2022-07-28 02:07:48 +02: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 08:02:07 +02:00
|
|
|
{
|
2022-07-28 02:07:48 +02:00
|
|
|
return new TexturePool(context, channel, address, maximumId);
|
2019-10-13 08:02:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|