From 330f7da746717dc17532180ff784bc086279d82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Sun, 11 Apr 2021 22:12:15 +0200 Subject: [PATCH] Add Vulkan device presentation support to glfwinfo The glfwinfo tool now reports the results of glfwGetPhysicalDevicePresentationSupport for each physical device. --- tests/glfwinfo.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/glfwinfo.c b/tests/glfwinfo.c index d5d14885..4b61a776 100644 --- a/tests/glfwinfo.c +++ b/tests/glfwinfo.c @@ -946,7 +946,6 @@ int main(int argc, char** argv) for (uint32_t i = 0; i < pd_count; i++) { VkPhysicalDeviceProperties pdp; - vkGetPhysicalDeviceProperties(pd[i], &pdp); printf("Vulkan %s device: \"%s\" (API version %i.%i)\n", @@ -955,6 +954,19 @@ int main(int argc, char** argv) VK_VERSION_MAJOR(pdp.apiVersion), VK_VERSION_MINOR(pdp.apiVersion)); + uint32_t qfp_count; + vkGetPhysicalDeviceQueueFamilyProperties(pd[i], &qfp_count, NULL); + + printf("Vulkan device queue family presentation support:\n"); + for (uint32_t j = 0; j < qfp_count; j++) + { + printf(" %u: ", j); + if (glfwGetPhysicalDevicePresentationSupport(instance, pd[i], j)) + printf("supported\n"); + else + printf("no\n"); + } + if (list_extensions) list_vulkan_device_extensions(instance, pd[i]);