aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
diff options
context:
space:
mode:
authorMary <me@thog.eu>2021-06-09 01:00:28 +0200
committerGitHub <noreply@github.com>2021-06-09 01:00:28 +0200
commitafd68d4c6cb0e08a02cbd29f45083a4b620f1f4c (patch)
tree16ac5b6288c73be69f291cc70dd2b6f60d76371b /Ryujinx.Graphics.Gpu/Image/TextureManager.cs
parent60cf3dfebc6bc573fb90a1b9645bca43da3d65f6 (diff)
GAL: Fix sampler leaks on exit (#2353)
Before this, all samplers instance were leaking on exit because the dispose method was never getting called. This fix this issue by making TextureBindingsManager disposable and calling the dispose method in the TextureManager.
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureManager.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureManager.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
index 94939ae4..989dca7a 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
@@ -1286,7 +1286,7 @@ namespace Ryujinx.Graphics.Gpu.Image
}
/// <summary>
- /// Disposes all textures in the cache.
+ /// Disposes all textures and samplers in the cache.
/// It's an error to use the texture manager after disposal.
/// </summary>
public void Dispose()
@@ -1297,6 +1297,9 @@ namespace Ryujinx.Graphics.Gpu.Image
{
texture.Dispose();
}
+
+ _cpBindingsManager.Dispose();
+ _gpBindingsManager.Dispose();
}
}
}