From 32764f95602611e9daa50362330d760e8ed83fda Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 29 Dec 2019 20:26:37 -0300 Subject: Add XML documentation to Ryujinx.Graphics.Gpu.Image --- Ryujinx.Graphics.Gpu/Image/TexturePoolCache.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Ryujinx.Graphics.Gpu/Image/TexturePoolCache.cs') diff --git a/Ryujinx.Graphics.Gpu/Image/TexturePoolCache.cs b/Ryujinx.Graphics.Gpu/Image/TexturePoolCache.cs index 9ab7e292..6c249ca6 100644 --- a/Ryujinx.Graphics.Gpu/Image/TexturePoolCache.cs +++ b/Ryujinx.Graphics.Gpu/Image/TexturePoolCache.cs @@ -2,6 +2,11 @@ using System.Collections.Generic; 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 { private const int MaxCapacity = 4; @@ -10,6 +15,10 @@ namespace Ryujinx.Graphics.Gpu.Image private LinkedList _pools; + /// + /// Constructs a new instance of the texture pool. + /// + /// public TexturePoolCache(GpuContext context) { _context = context; @@ -17,6 +26,12 @@ namespace Ryujinx.Graphics.Gpu.Image _pools = new LinkedList(); } + /// + /// Finds a cache texture pool, or creates a new one if not found. + /// + /// Start address of the texture pool + /// Maximum ID of the texture pool + /// The found or newly created texture pool public TexturePool FindOrCreate(ulong address, int maximumId) { TexturePool pool; @@ -58,6 +73,11 @@ namespace Ryujinx.Graphics.Gpu.Image return pool; } + /// + /// Invalidates a memory range of all intersecting texture pools on the cache. + /// + /// Start address of the range to invalidate + /// Size of the range to invalidate public void InvalidateRange(ulong address, ulong size) { for (LinkedListNode node = _pools.First; node != null; node = node.Next) -- cgit v1.2.3