aboutsummaryrefslogtreecommitdiffstatsci
path: root/samples/create_device/Program.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-12-07 20:18:00 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-12-07 20:18:00 +0100
commitfe6cb8a976b328b87ec66357c97614f67865e1d7 (patch)
tree9c45081e91c552f96558ea2a8b13af23cf48181e /samples/create_device/Program.cs
parent35323bd205c9680ad1fdb5dcc072872746747f6f (diff)
move sample.Utils to main lib and Vulkan.Utils
Diffstat (limited to 'samples/create_device/Program.cs')
-rw-r--r--samples/create_device/Program.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/samples/create_device/Program.cs b/samples/create_device/Program.cs
index ef7339d..3daca81 100644
--- a/samples/create_device/Program.cs
+++ b/samples/create_device/Program.cs
@@ -1,7 +1,7 @@
using System;
using Vulkan;
using static Vulkan.Vk;
-using static samples.Utils;
+using static Vulkan.Utils;
using System.Linq;
namespace tests
@@ -32,12 +32,15 @@ namespace tests
}
vkGetPhysicalDeviceQueueFamilyProperties (phy, out uint queueFamilyCount, IntPtr.Zero);
- VkQueueFamilyProperties[] phys = new VkQueueFamilyProperties[queueFamilyCount];
- vkGetPhysicalDeviceQueueFamilyProperties (phy, out queueFamilyCount, phys.Pin());
- phys.Unpin();
+ VkQueueFamilyProperties[] qFamProps = new VkQueueFamilyProperties[queueFamilyCount];
+ vkGetPhysicalDeviceQueueFamilyProperties (phy, out queueFamilyCount, qFamProps.Pin());
+ qFamProps.Unpin();
+ Console.WriteLine ($"Queues:");
+ for (int i = 0; i < queueFamilyCount; i++)
+ Console.WriteLine ($"\t{i}: {qFamProps[i].queueFlags,-60} ({qFamProps[i].queueCount})");
- uint qFamIndex = (uint)phys.Select((phy, index) => (phy, index))
- .First (qfp=>qfp.phy.queueFlags.HasFlag (VkQueueFlags.Graphics)).index;
+ uint qFamIndex = (uint)qFamProps.Select((qFam, index) => (qFam, index))
+ .First (qfp=>qfp.qFam.queueFlags.HasFlag (VkQueueFlags.Graphics)).index;
VkDevice dev = default;
float[] priorities = {0};