mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 00:23:36 +00:00
24 lines
524 B
C#
24 lines
524 B
C#
using Silk.NET.Vulkan;
|
|
|
|
namespace Ryujinx.Graphics.Vulkan
|
|
{
|
|
struct DisposableBuffer : System.IDisposable
|
|
{
|
|
private readonly Vk _api;
|
|
private readonly Device _device;
|
|
|
|
public Buffer Value { get; }
|
|
|
|
public DisposableBuffer(Vk api, Device device, Buffer buffer)
|
|
{
|
|
_api = api;
|
|
_device = device;
|
|
Value = buffer;
|
|
}
|
|
|
|
public unsafe void Dispose()
|
|
{
|
|
_api.DestroyBuffer(_device, Value, null);
|
|
}
|
|
}
|
|
}
|