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