1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Add Vulkan device presentation support to glfwinfo

The glfwinfo tool now reports the results of
glfwGetPhysicalDevicePresentationSupport for each physical device.
This commit is contained in:
Camilla Löwy 2021-04-11 22:12:15 +02:00
parent 0beadfdc66
commit 330f7da746

View File

@ -946,7 +946,6 @@ int main(int argc, char** argv)
for (uint32_t i = 0; i < pd_count; i++) for (uint32_t i = 0; i < pd_count; i++)
{ {
VkPhysicalDeviceProperties pdp; VkPhysicalDeviceProperties pdp;
vkGetPhysicalDeviceProperties(pd[i], &pdp); vkGetPhysicalDeviceProperties(pd[i], &pdp);
printf("Vulkan %s device: \"%s\" (API version %i.%i)\n", 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_MAJOR(pdp.apiVersion),
VK_VERSION_MINOR(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) if (list_extensions)
list_vulkan_device_extensions(instance, pd[i]); list_vulkan_device_extensions(instance, pd[i]);