mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 23:30:47 -07:00
GPU resource disposal
This commit is contained in:
@ -8,7 +8,7 @@ namespace Ryujinx.Graphics.Gpu
|
||||
/// <summary>
|
||||
/// GPU emulation context.
|
||||
/// </summary>
|
||||
public class GpuContext
|
||||
public sealed class GpuContext : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Host renderer.
|
||||
@ -104,5 +104,18 @@ namespace Ryujinx.Graphics.Gpu
|
||||
{
|
||||
PhysicalMemory = new PhysicalMemory(cpuMemory);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disposes all GPU resources currently cached.
|
||||
/// It's an error to push any GPU commands after disposal.
|
||||
/// Additionally, the GPU commands FIFO must be empty for disposal,
|
||||
/// and processing of all commands must have finished.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Methods.ShaderCache.Dispose();
|
||||
Methods.BufferManager.Dispose();
|
||||
Methods.TextureManager.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user