mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 03:25:10 +00: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:
parent
0beadfdc66
commit
330f7da746
@ -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]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user