void PickQueues()
        {
            uint count = 0;

            VK.GetPhysicalDeviceQueueFamilyProperties(physicalDevice, ref count, IntPtr.Zero);
            var queues = new NativeArray <VkQueueFamilyProperties>(count);

            VK.GetPhysicalDeviceQueueFamilyProperties(physicalDevice, ref count, queues.Address);

            int g = -1;
            int p = -1;

            for (int i = 0; i < count; i++)
            {
                if (g == -1 && queues[i].queueCount > 0 && (queues[i].queueFlags & CSGL.Vulkan.VkQueueFlags.GraphicsBit) != 0)
                {
                    g = i;
                }

                bool support;
                getPhysicalDeviceSurfaceSupport(physicalDevice, (uint)i, surface, out support);
                if (p == -1 && queues[i].queueCount > 0 && support)
                {
                    p = i;
                }
            }

            graphicsIndex = (uint)g;
            presentIndex  = (uint)p;

            queues.Dispose();
        }