mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-09 21:52:34 -07:00
Force cache to remove entries when memory usage exceeds a given threshold (#492)
This commit is contained in:
@@ -6,13 +6,15 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||
{
|
||||
class OGLTexture : IGalTexture
|
||||
{
|
||||
private const long MaxTextureCacheSize = 768 * 1024 * 1024;
|
||||
|
||||
private OGLCachedResource<ImageHandler> TextureCache;
|
||||
|
||||
public EventHandler<int> TextureDeleted { get; set; }
|
||||
|
||||
public OGLTexture()
|
||||
{
|
||||
TextureCache = new OGLCachedResource<ImageHandler>(DeleteTexture);
|
||||
TextureCache = new OGLCachedResource<ImageHandler>(DeleteTexture, MaxTextureCacheSize);
|
||||
}
|
||||
|
||||
public void LockCache()
|
||||
|
Reference in New Issue
Block a user