diff --git a/src/xrt/auxiliary/vk/vk_helpers.h b/src/xrt/auxiliary/vk/vk_helpers.h index 0428d58f9..ff951e8ff 100644 --- a/src/xrt/auxiliary/vk/vk_helpers.h +++ b/src/xrt/auxiliary/vk/vk_helpers.h @@ -477,6 +477,13 @@ vk_print_device_info(struct vk_bundle *vk, uint32_t gpu_index, 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, * if the vk_bundle has that level enabled. diff --git a/src/xrt/auxiliary/vk/vk_print.c b/src/xrt/auxiliary/vk/vk_print.c index 4540af2c0..3f7dd9579 100644 --- a/src/xrt/auxiliary/vk/vk_print.c +++ b/src/xrt/auxiliary/vk/vk_print.c @@ -32,6 +32,15 @@ vk_print_device_info(struct vk_bundle *vk, 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 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_opaque_fd ? "true" : "false"); // - 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", // - "features.timeline_semaphore", vk->features.timeline_semaphore ? "true" : "false", // - "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(binary)", // - vk->external.binary_semaphore_sync_fd ? "true" : "false", // - "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(binary)", // - vk->external.binary_semaphore_opaque_fd ? "true" : "false", // - "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(timeline)", // - vk->external.timeline_semaphore_sync_fd ? "true" : "false", // - "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(timeline)", // - vk->external.timeline_semaphore_opaque_fd ? "true" : "false"); // + 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", // + "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(binary)", // + vk->external.binary_semaphore_sync_fd ? "true" : "false", // + "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(binary)", // + vk->external.binary_semaphore_opaque_fd ? "true" : "false", // + "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(timeline)", // + vk->external.timeline_semaphore_sync_fd ? "true" : "false", // + "VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(timeline)", // + vk->external.timeline_semaphore_opaque_fd ? "true" : "false"); // #elif defined(XRT_GRAPHICS_SYNC_HANDLE_IS_WIN32_HANDLE) diff --git a/src/xrt/compositor/util/comp_vulkan.c b/src/xrt/compositor/util/comp_vulkan.c index 42c53919b..2975bfbad 100644 --- a/src/xrt/compositor/util/comp_vulkan.c +++ b/src/xrt/compositor/util/comp_vulkan.c @@ -217,6 +217,9 @@ create_device(struct vk_bundle *vk, const struct comp_vulkan_arguments *vk_args) return ret; } + // Print features enabled. + vk_print_features_info(vk, U_LOGGING_INFO); + // Now that we are done debug some used external handles. vk_print_external_handles_info(vk, U_LOGGING_INFO);