using Ryujinx.Graphics.Gpu.Memory;
namespace Ryujinx.Graphics.Gpu.Image
{
///
/// 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.
///
class TexturePoolCache : PoolCache
{
///
/// Constructs a new instance of the texture pool.
///
/// GPU context that the texture pool belongs to
public TexturePoolCache(GpuContext context) : base(context)
{
}
///
/// Creates a new instance of the texture pool.
///
/// GPU context that the texture pool belongs to
/// GPU channel that the texture pool belongs to
/// Backing memory of the pool
/// Address of the texture pool in guest memory
/// Maximum texture ID of the texture pool (equal to maximum textures minus one)
protected override TexturePool CreatePool(
GpuContext context,
GpuChannel channel,
PhysicalMemory physicalMemory,
ulong address,
int maximumId)
{
return new TexturePool(context, channel, physicalMemory, address, maximumId);
}
}
}