diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-12-31 19:09:49 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 59fdaa744b20f91928ee3fcaf5fabfcb7b409451 (patch) | |
| tree | f01e21d930e456398411317784c5063c532a7215 /Ryujinx.Graphics.Gpu/Memory/BufferManager.cs | |
| parent | f7bcc884e46805f4dcda4fc7d7e7bccb2a3ac316 (diff) | |
GPU resource disposal
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/BufferManager.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/BufferManager.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs index 1d27bc7e..44542349 100644 --- a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs @@ -683,5 +683,17 @@ namespace Ryujinx.Graphics.Gpu.Memory buffer.SynchronizeMemory(address, size); } } + + /// <summary> + /// Disposes all buffers in the cache. + /// It's an error to use the buffer manager after disposal. + /// </summary> + public void Dispose() + { + foreach (Buffer buffer in _buffers) + { + buffer.Dispose(); + } + } } }
\ No newline at end of file |
