6b814fb973
See merge request ryubing/ryujinx!214
18 lines
495 B
C#
18 lines
495 B
C#
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ryujinx.Graphics.GAL
|
|
{
|
|
[StructLayout(LayoutKind.Sequential, Size = 8)]
|
|
public readonly record struct BufferHandle
|
|
{
|
|
private readonly ulong _value;
|
|
|
|
public static BufferHandle Null => new(0);
|
|
|
|
private BufferHandle(ulong value) => _value = value;
|
|
|
|
public static implicit operator int(BufferHandle handle) => (int)Unsafe.As<BufferHandle, ulong>(ref handle);
|
|
}
|
|
}
|