GPU resource disposal
This commit is contained in:
parent
f7bcc884e4
commit
59fdaa744b
20 changed files with 195 additions and 46 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue