a/vk: Add vk_physical_device_type_string

This commit is contained in:
Jakob Bornecrantz 2023-08-29 18:58:16 +01:00 committed by Ryan Pavlik
parent ceeeb2d136
commit ccf232d4ac
2 changed files with 15 additions and 0 deletions

View file

@ -160,6 +160,18 @@ vk_result_string(VkResult code)
}
}
XRT_CHECK_RESULT const char *
vk_physical_device_type_string(VkPhysicalDeviceType device_type)
{
switch (device_type) {
ENUM_TO_STR(VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU);
ENUM_TO_STR(VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU);
ENUM_TO_STR(VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU);
ENUM_TO_STR(VK_PHYSICAL_DEVICE_TYPE_CPU);
default: return "UNKNOWN PHYSICAL DEVICE TYPE";
}
}
XRT_CHECK_RESULT const char *
vk_format_string(VkFormat code)
{

View file

@ -446,6 +446,9 @@ struct vk_buffer
XRT_CHECK_RESULT const char *
vk_result_string(VkResult code);
XRT_CHECK_RESULT const char *
vk_physical_device_type_string(VkPhysicalDeviceType device_type);
XRT_CHECK_RESULT const char *
vk_format_string(VkFormat code);