From cee712105850ac3385cd0091a923438167433f9f Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:22:00 +0200 Subject: Move solution and projects to src --- src/Ryujinx.Graphics.Gpu/Image/SamplerPoolCache.cs | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/Ryujinx.Graphics.Gpu/Image/SamplerPoolCache.cs (limited to 'src/Ryujinx.Graphics.Gpu/Image/SamplerPoolCache.cs') diff --git a/src/Ryujinx.Graphics.Gpu/Image/SamplerPoolCache.cs b/src/Ryujinx.Graphics.Gpu/Image/SamplerPoolCache.cs new file mode 100644 index 00000000..3b3350fb --- /dev/null +++ b/src/Ryujinx.Graphics.Gpu/Image/SamplerPoolCache.cs @@ -0,0 +1,30 @@ +namespace Ryujinx.Graphics.Gpu.Image +{ + /// + /// Sampler pool cache. + /// This can keep multiple sampler pools, and return the current one as needed. + /// It is useful for applications that uses multiple sampler pools. + /// + class SamplerPoolCache : PoolCache + { + /// + /// Constructs a new instance of the texture pool. + /// + /// GPU context that the texture pool belongs to + public SamplerPoolCache(GpuContext context) : base(context) + { + } + + /// + /// Creates a new instance of the sampler pool. + /// + /// GPU context that the sampler pool belongs to + /// GPU channel that the texture pool belongs to + /// Address of the sampler pool in guest memory + /// Maximum sampler ID of the sampler pool (equal to maximum samplers minus one) + protected override SamplerPool CreatePool(GpuContext context, GpuChannel channel, ulong address, int maximumId) + { + return new SamplerPool(context, channel.MemoryManager.Physical, address, maximumId); + } + } +} \ No newline at end of file -- cgit v1.2.3