mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-28 00:46:29 +00:00
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);
|
|
}
|
|
}
|