예제 #1
0
 public static VkQueueFamilyProperties[] GetQueueFamilyProperties(this VkPhysicalDevice phy)
 {
     vkGetPhysicalDeviceQueueFamilyProperties(phy, out uint queueFamilyCount, IntPtr.Zero);
     VkQueueFamilyProperties[] qFamProps = new VkQueueFamilyProperties[queueFamilyCount];
     vkGetPhysicalDeviceQueueFamilyProperties(phy, out queueFamilyCount, qFamProps.Pin());
     qFamProps.Unpin();
     return(qFamProps);
 }
예제 #2
0
        /// <summary>
        /// Reports properties of the queues of the specified physical device.
        /// </summary>
        /// <param name="physicalDevice"></param>
        /// <returns></returns>
        public static VkQueueFamilyProperties[] QueueFamilyProperties(this VkPhysicalDevice physicalDevice)
        {
            VkQueueFamilyProperties[] result;
            UInt32 count;

            vkAPI.vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &count, null);
            result = new VkQueueFamilyProperties[count];
            if (count > 0)
            {
                fixed(VkQueueFamilyProperties *pointer = result)
                {
                    vkAPI.vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &count, pointer);
                }
            }

            return(result);
        }