a/vk: Add function to print opened device info

This commit is contained in:
Jakob Bornecrantz 2022-05-08 14:23:34 +01:00 committed by Christoph Haag
parent 6c61965790
commit 2b042d48ff
2 changed files with 18 additions and 0 deletions

View file

@ -488,6 +488,15 @@ vk_print_device_info(struct vk_bundle *vk,
uint32_t gpu_index,
const char *title);
/*!
* Print device information about the device that bundle manages at the given
* logging level if the vk_bundle has that level enabled.
*
* @ingroup aux_vk
*/
void
vk_print_opened_device_info(struct vk_bundle *vk, enum u_logging_level log_level);
/*!
* Print device features to the logger at the given logging level, if the
* vk_bundle has that level enabled.

View file

@ -36,6 +36,15 @@ vk_print_device_info(struct vk_bundle *vk,
pdp->driverVersion); // Driver specific
}
void
vk_print_opened_device_info(struct vk_bundle *vk, enum u_logging_level log_level)
{
VkPhysicalDeviceProperties pdp;
vk->vkGetPhysicalDeviceProperties(vk->physical_device, &pdp);
vk_print_device_info(vk, log_level, &pdp, 0, "Device info:\n");
}
void
vk_print_features_info(struct vk_bundle *vk, enum u_logging_level log_level)
{