The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/main: Print creation info for direct mode objects

+21 -14
+11 -10
src/xrt/compositor/main/comp_target_swapchain.c
··· 679 679 } 680 680 681 681 // Always print the first one. 682 - { 683 - static bool first = true; 684 - if (first) { 685 - vk_print_surface_info(vk, &info, U_LOGGING_INFO); 686 - first = false; 687 - } else { 688 - vk_print_surface_info(vk, &info, U_LOGGING_DEBUG); 689 - } 682 + enum u_logging_level print_log_level = U_LOGGING_DEBUG; 683 + if (!cts->has_logged_info) { 684 + print_log_level = U_LOGGING_INFO; 685 + cts->has_logged_info = true; 690 686 } 687 + 688 + // Print info about the surface. 689 + vk_print_surface_info(vk, &info, print_log_level); 691 690 692 691 if (!check_surface_present_mode(cts, &info, cts->present_mode)) { 693 692 // Free old. ··· 746 745 * Do the creation. 747 746 */ 748 747 749 - COMP_DEBUG(ct->c, "Creating compositor swapchain with %d images", image_count); 750 - 751 748 // Create the swapchain now. 752 749 VkSwapchainCreateInfoKHR swapchain_info = { 753 750 .sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, ··· 771 768 .oldSwapchain = old_swapchain_handle, 772 769 }; 773 770 771 + // Print what we are creating. 772 + vk_print_swapchain_create_info(vk, &swapchain_info, print_log_level); 773 + 774 + // Everything decided and logged, do the creation. 774 775 ret = vk->vkCreateSwapchainKHR(vk->device, &swapchain_info, NULL, &cts->swapchain.handle); 775 776 776 777 // Always destroy the old.
+6
src/xrt/compositor/main/comp_target_swapchain.h
··· 87 87 //! Thread waiting on vblank_event_fence (first pixel out). 88 88 struct os_thread_helper event_thread; 89 89 } vblank; 90 + 91 + /*! 92 + * We print swapchain info as INFO the first time we create a 93 + * VkSWapchain, this keeps track if we have done it. 94 + */ 95 + bool has_logged_info; 90 96 }; 91 97 92 98
+4 -4
src/xrt/compositor/main/comp_window_direct.c
··· 211 211 }, 212 212 }; 213 213 214 - VkResult result = vk->vkCreateDisplayPlaneSurfaceKHR(vk->instance, &surface_info, NULL, &cts->surface.handle); 215 - 216 - free(plane_properties); 214 + // This function is called seldom so ok to always print. 215 + vk_print_display_surface_create_info(vk, &surface_info, U_LOGGING_INFO); 217 216 218 - return result; 217 + // Everything decided and logged, do the creation. 218 + return vk->vkCreateDisplayPlaneSurfaceKHR(vk->instance, &surface_info, NULL, &cts->surface.handle); 219 219 } 220 220 221 221 #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT