diff --git a/src/xrt/auxiliary/vk/vk_helpers.c b/src/xrt/auxiliary/vk/vk_helpers.c index e85f493ab..8ca3f7399 100644 --- a/src/xrt/auxiliary/vk/vk_helpers.c +++ b/src/xrt/auxiliary/vk/vk_helpers.c @@ -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) { diff --git a/src/xrt/auxiliary/vk/vk_helpers.h b/src/xrt/auxiliary/vk/vk_helpers.h index ff933f5c9..63f539b35 100644 --- a/src/xrt/auxiliary/vk/vk_helpers.h +++ b/src/xrt/auxiliary/vk/vk_helpers.h @@ -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);