using System.Runtime.Versioning;
namespace Brutal.VulkanApi.Win32
{
///
/// VkImportMemoryWin32HandleInfoKHR - Import Win32 memory created on the same physical device
///
///
///
/// To import memory from a Windows handle, add a
/// VkImportMemoryWin32HandleInfoKHR structure to the pNext chain of
/// the VkMemoryAllocateInfo structure.
///
///
/// The VkImportMemoryWin32HandleInfoKHR structure is defined as:
///
///
/// // Provided by VK_KHR_external_memory_win32
/// typedef struct VkImportMemoryWin32HandleInfoKHR {
/// VkStructureType sType;
/// const void* pNext;
/// VkExternalMemoryHandleTypeFlagBits handleType;
/// HANDLE handle;
/// LPCWSTR name;
/// } VkImportMemoryWin32HandleInfoKHR;
///
///
[StructLayout(LayoutKind.Explicit, Size = 40)]
[SupportedOSPlatform("windows")]
public unsafe partial struct VkImportMemoryWin32HandleInfoKHR()
{
///
/// sType is a VkStructureType value identifying this structure.
///
[FieldOffset(0)]
internal readonly VkStructureType sType = VkStructureType.ImportMemoryWin32HandleInfoKHR;
///
/// Next is `NULL` or a pointer to a structure extending this structure.
///
[FieldOffset(8)]
public void* Next;
///
/// HandleType is a VkExternalMemoryHandleTypeFlags value specifying the type of handle or name.
///
[FieldOffset(16)]
public VkExternalMemoryHandleTypeFlags HandleType;
///
/// Handle is `NULL` or the external handle to import.
///
[FieldOffset(24)]
public nint Handle;
///
/// Name is `NULL` or a null-terminated UTF-16 string naming the payload to import.
///
[FieldOffset(32)]
public char* Name;
}
}