The open source OpenXR runtime

c/util, a/vk: add logging info for selected queues

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2572>

+35
+7
src/xrt/auxiliary/vk/vk_helpers.h
··· 839 839 enum u_logging_level log_level); 840 840 #endif 841 841 842 + /*! 843 + * Print queue info to the logger at the given logging level, 844 + * if the vk_bundle has that level enabled. 845 + */ 846 + void 847 + vk_print_queues_info(const struct vk_bundle *vk, enum u_logging_level log_level); 848 + 842 849 843 850 /* 844 851 *
+25
src/xrt/auxiliary/vk/vk_print.c
··· 38 38 } \ 39 39 } while (false) 40 40 41 + static inline void 42 + print_queue(u_pp_delegate_t dg, const char *prefix, const struct vk_bundle_queue *queue) 43 + { 44 + PNT("%squeue.queue: %p", prefix, (const void *)queue->queue); 45 + PNT("%squeue.index: %d", prefix, (int32_t)queue->index); 46 + PNT("%squeue.family_index: %d", prefix, (int32_t)queue->family_index); 47 + } 41 48 42 49 /* 43 50 * ··· 277 284 U_LOG_IFL(log_level, vk->log_level, "%s", sink.buffer); 278 285 } 279 286 #endif 287 + 288 + void 289 + vk_print_queues_info(const struct vk_bundle *vk, enum u_logging_level log_level) 290 + { 291 + struct vk_bundle_queue encode_queue = VK_BUNDLE_NULL_QUEUE; 292 + #if defined(VK_KHR_video_encode_queue) 293 + encode_queue = vk->encode_queue; 294 + #endif 295 + 296 + struct u_pp_sink_stack_only sink; 297 + u_pp_delegate_t dg = u_pp_sink_stack_only_init(&sink); 298 + 299 + P("Selected Queues/Families:"); 300 + print_queue(dg, "main_", &vk->main_queue); 301 + print_queue(dg, "encode_", &encode_queue); 302 + 303 + U_LOG_IFL(log_level, vk->log_level, "%s", sink.buffer); 304 + }
+3
src/xrt/compositor/util/comp_vulkan.c
··· 328 328 // Print device information. 329 329 vk_print_opened_device_info(vk, U_LOGGING_INFO); 330 330 331 + // Print selected queue(s) information. 332 + vk_print_queues_info(vk, U_LOGGING_INFO); 333 + 331 334 // Print features enabled. 332 335 vk_print_features_info(vk, U_LOGGING_INFO); 333 336