/// <summary> /// /// </summary> internal static unsafe QueueFamilyProperties2 MarshalFrom(SharpVk.Interop.Khronos.QueueFamilyProperties2 *pointer) { QueueFamilyProperties2 result = default(QueueFamilyProperties2); result.QueueFamilyProperties = pointer->QueueFamilyProperties; return(result); }
/// <summary> /// /// </summary> public static unsafe SharpVk.Khronos.QueueFamilyProperties2[] GetQueueFamilyProperties2(this SharpVk.PhysicalDevice extendedHandle) { try { SharpVk.Khronos.QueueFamilyProperties2[] result = default(SharpVk.Khronos.QueueFamilyProperties2[]); uint queueFamilyPropertyCount = default(uint); CommandCache commandCache = default(CommandCache); SharpVk.Interop.Khronos.QueueFamilyProperties2 *marshalledQueueFamilyProperties = default(SharpVk.Interop.Khronos.QueueFamilyProperties2 *); commandCache = extendedHandle.commandCache; SharpVk.Interop.Khronos.VkPhysicalDeviceGetQueueFamilyProperties2Delegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Khronos.VkPhysicalDeviceGetQueueFamilyProperties2Delegate>("vkGetPhysicalDeviceQueueFamilyProperties2KHR", "instance"); commandDelegate(extendedHandle.handle, &queueFamilyPropertyCount, marshalledQueueFamilyProperties); marshalledQueueFamilyProperties = (SharpVk.Interop.Khronos.QueueFamilyProperties2 *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.QueueFamilyProperties2>((uint)(queueFamilyPropertyCount))); commandDelegate(extendedHandle.handle, &queueFamilyPropertyCount, marshalledQueueFamilyProperties); if (marshalledQueueFamilyProperties != null) { var fieldPointer = new SharpVk.Khronos.QueueFamilyProperties2[(uint)(queueFamilyPropertyCount)]; for (int index = 0; index < (uint)(queueFamilyPropertyCount); index++) { fieldPointer[index] = SharpVk.Khronos.QueueFamilyProperties2.MarshalFrom(&marshalledQueueFamilyProperties[index]); } result = fieldPointer; } else { result = null; } return(result); } finally { Interop.HeapUtil.FreeAll(); } }