mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-06 07:06:10 +00:00
a/vk: Add function to print device features
This commit is contained in:
parent
f65a8b1eda
commit
3aa4fdb096
|
@ -477,6 +477,13 @@ vk_print_device_info(struct vk_bundle *vk,
|
||||||
uint32_t gpu_index,
|
uint32_t gpu_index,
|
||||||
const char *title);
|
const char *title);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Print device features to the logger at the given logging level, if the
|
||||||
|
* vk_bundle has that level enabled.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
vk_print_features_info(struct vk_bundle *vk, enum u_logging_level log_level);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Print external handle features to the logger at the given logging level,
|
* Print external handle features to the logger at the given logging level,
|
||||||
* if the vk_bundle has that level enabled.
|
* if the vk_bundle has that level enabled.
|
||||||
|
|
|
@ -32,6 +32,15 @@ vk_print_device_info(struct vk_bundle *vk,
|
||||||
VK_VERSION_PATCH(pdp->driverVersion));
|
VK_VERSION_PATCH(pdp->driverVersion));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
vk_print_features_info(struct vk_bundle *vk, enum u_logging_level log_level)
|
||||||
|
{
|
||||||
|
U_LOG_IFL(log_level, vk->log_level, //
|
||||||
|
"Features:" //
|
||||||
|
"\n\ttimeline_semaphore: %s", //
|
||||||
|
vk->features.timeline_semaphore ? "true" : "false"); //
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
vk_print_external_handles_info(struct vk_bundle *vk, enum u_logging_level log_level)
|
vk_print_external_handles_info(struct vk_bundle *vk, enum u_logging_level log_level)
|
||||||
{
|
{
|
||||||
|
@ -44,17 +53,16 @@ vk_print_external_handles_info(struct vk_bundle *vk, enum u_logging_level log_le
|
||||||
"VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT", //
|
"VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT", //
|
||||||
vk->external.fence_opaque_fd ? "true" : "false"); //
|
vk->external.fence_opaque_fd ? "true" : "false"); //
|
||||||
|
|
||||||
U_LOG_IFL(log_level, vk->log_level, //
|
U_LOG_IFL(log_level, vk->log_level, //
|
||||||
"Supported semaphores:\n\t%s: %s\n\t%s: %s\n\t%s: %s\n\t%s: %s\n\t%s: %s", //
|
"Supported semaphores:\n\t%s: %s\n\t%s: %s\n\t%s: %s\n\t%s: %s", //
|
||||||
"features.timeline_semaphore", vk->features.timeline_semaphore ? "true" : "false", //
|
"VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(binary)", //
|
||||||
"VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(binary)", //
|
vk->external.binary_semaphore_sync_fd ? "true" : "false", //
|
||||||
vk->external.binary_semaphore_sync_fd ? "true" : "false", //
|
"VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(binary)", //
|
||||||
"VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(binary)", //
|
vk->external.binary_semaphore_opaque_fd ? "true" : "false", //
|
||||||
vk->external.binary_semaphore_opaque_fd ? "true" : "false", //
|
"VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(timeline)", //
|
||||||
"VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(timeline)", //
|
vk->external.timeline_semaphore_sync_fd ? "true" : "false", //
|
||||||
vk->external.timeline_semaphore_sync_fd ? "true" : "false", //
|
"VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(timeline)", //
|
||||||
"VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(timeline)", //
|
vk->external.timeline_semaphore_opaque_fd ? "true" : "false"); //
|
||||||
vk->external.timeline_semaphore_opaque_fd ? "true" : "false"); //
|
|
||||||
|
|
||||||
#elif defined(XRT_GRAPHICS_SYNC_HANDLE_IS_WIN32_HANDLE)
|
#elif defined(XRT_GRAPHICS_SYNC_HANDLE_IS_WIN32_HANDLE)
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,9 @@ create_device(struct vk_bundle *vk, const struct comp_vulkan_arguments *vk_args)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print features enabled.
|
||||||
|
vk_print_features_info(vk, U_LOGGING_INFO);
|
||||||
|
|
||||||
// Now that we are done debug some used external handles.
|
// Now that we are done debug some used external handles.
|
||||||
vk_print_external_handles_info(vk, U_LOGGING_INFO);
|
vk_print_external_handles_info(vk, U_LOGGING_INFO);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue