diff options
author | gdkchan <gab.dark.100@gmail.com> | 2019-12-29 20:26:37 -0300 |
---|---|---|
committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
commit | 32764f95602611e9daa50362330d760e8ed83fda (patch) | |
tree | f15d3c93714e45c88bce8bc177c3448ebaf518f8 /Ryujinx.Graphics.Gpu/Image/SamplerPool.cs | |
parent | 53bbc1311f9819ac70fd51ae016e8c2070268086 (diff) |
Add XML documentation to Ryujinx.Graphics.Gpu.Image
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/SamplerPool.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Image/SamplerPool.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs b/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs index 55555109..f10f800c 100644 --- a/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs +++ b/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs @@ -3,12 +3,26 @@ using System.Runtime.InteropServices; namespace Ryujinx.Graphics.Gpu.Image { + /// <summary> + /// Sampler pool. + /// </summary> class SamplerPool : Pool<Sampler> { private int _sequenceNumber; + /// <summary> + /// Constructs a new instance of the sampler pool. + /// </summary> + /// <param name="context">GPU context that the sampler pool belongs to</param> + /// <param name="address">Address of the sampler pool in guest memory</param> + /// <param name="maximumId">Maximum sampler ID of the sampler pool (equal to maximum samplers minus one)</param> public SamplerPool(GpuContext context, ulong address, int maximumId) : base(context, address, maximumId) { } + /// <summary> + /// Gets the sampler with the given ID. + /// </summary> + /// <param name="id">ID of the sampler. This is effectively a zero-based index</param> + /// <returns>The sampler with the given ID</returns> public override Sampler Get(int id) { if ((uint)id >= Items.Length) @@ -41,6 +55,11 @@ namespace Ryujinx.Graphics.Gpu.Image return sampler; } + /// <summary> + /// Implementation of the sampler pool range invalidation. + /// </summary> + /// <param name="address">Start address of the range of the sampler pool</param> + /// <param name="size">Size of the range being invalidated</param> protected override void InvalidateRangeImpl(ulong address, ulong size) { ulong endAddress = address + size; @@ -60,6 +79,11 @@ namespace Ryujinx.Graphics.Gpu.Image } } + /// <summary> + /// Deletes a given sampler pool entry. + /// The host memory used by the sampler is released by the driver. + /// </summary> + /// <param name="item">The entry to be deleted</param> protected override void Delete(Sampler item) { item?.Dispose(); |