diff --git a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
index 79effedfa..1989131e3 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
@@ -1,13 +1,14 @@
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Gpu.State;
using Ryujinx.Graphics.Shader;
+using System;
namespace Ryujinx.Graphics.Gpu.Image
{
///
/// Texture bindings manager.
///
- class TextureBindingsManager
+ class TextureBindingsManager : IDisposable
{
private const int HandleHigh = 16;
private const int HandleMask = (1 << HandleHigh) - 1;
@@ -505,5 +506,13 @@ namespace Ryujinx.Graphics.Gpu.Image
{
_rebind = true;
}
+
+ ///
+ /// Disposes all textures and samplers in the cache.
+ ///
+ public void Dispose()
+ {
+ _samplerPool?.Dispose();
+ }
}
}
\ No newline at end of file
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
index 94939ae47..989dca7ad 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
@@ -1286,7 +1286,7 @@ namespace Ryujinx.Graphics.Gpu.Image
}
///
- /// 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.
///
public void Dispose()
@@ -1297,6 +1297,9 @@ namespace Ryujinx.Graphics.Gpu.Image
{
texture.Dispose();
}
+
+ _cpBindingsManager.Dispose();
+ _gpBindingsManager.Dispose();
}
}
}