Example #1
0
 /// <summary>
 /// Reports properties of the queues of the specified physical device.
 /// </summary>
 public unsafe SharpVk.QueueFamilyProperties[] GetQueueFamilyProperties()
 {
     try
     {
         SharpVk.QueueFamilyProperties[] result = default(SharpVk.QueueFamilyProperties[]);
         uint queueFamilyPropertyCount          = default(uint);
         SharpVk.QueueFamilyProperties *marshalledQueueFamilyProperties = default(SharpVk.QueueFamilyProperties *);
         SharpVk.Interop.VkPhysicalDeviceGetQueueFamilyPropertiesDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.VkPhysicalDeviceGetQueueFamilyPropertiesDelegate>("vkGetPhysicalDeviceQueueFamilyProperties", "");
         commandDelegate(this.handle, &queueFamilyPropertyCount, marshalledQueueFamilyProperties);
         marshalledQueueFamilyProperties = (SharpVk.QueueFamilyProperties *)(Interop.HeapUtil.Allocate <SharpVk.QueueFamilyProperties>((uint)(queueFamilyPropertyCount)));
         commandDelegate(this.handle, &queueFamilyPropertyCount, marshalledQueueFamilyProperties);
         if (marshalledQueueFamilyProperties != null)
         {
             var fieldPointer = new SharpVk.QueueFamilyProperties[(uint)(queueFamilyPropertyCount)];
             for (int index = 0; index < (uint)(queueFamilyPropertyCount); index++)
             {
                 fieldPointer[index] = marshalledQueueFamilyProperties[index];
             }
             result = fieldPointer;
         }
         else
         {
             result = null;
         }
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Example #2
0
 public static extern void vkGetPhysicalDeviceQueueFamilyProperties(SharpVk.Interop.PhysicalDevice physicalDevice, uint *queueFamilyPropertyCount, SharpVk.QueueFamilyProperties *queueFamilyProperties);