mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
c/main: Print creation info for direct mode objects
This commit is contained in:
parent
67c24ebe92
commit
9bac7ed30e
|
@ -679,16 +679,15 @@ comp_target_swapchain_create_images(struct comp_target *ct,
|
|||
}
|
||||
|
||||
// Always print the first one.
|
||||
{
|
||||
static bool first = true;
|
||||
if (first) {
|
||||
vk_print_surface_info(vk, &info, U_LOGGING_INFO);
|
||||
first = false;
|
||||
} else {
|
||||
vk_print_surface_info(vk, &info, U_LOGGING_DEBUG);
|
||||
}
|
||||
enum u_logging_level print_log_level = U_LOGGING_DEBUG;
|
||||
if (!cts->has_logged_info) {
|
||||
print_log_level = U_LOGGING_INFO;
|
||||
cts->has_logged_info = true;
|
||||
}
|
||||
|
||||
// Print info about the surface.
|
||||
vk_print_surface_info(vk, &info, print_log_level);
|
||||
|
||||
if (!check_surface_present_mode(cts, &info, cts->present_mode)) {
|
||||
// Free old.
|
||||
destroy_old(cts, old_swapchain_handle);
|
||||
|
@ -746,8 +745,6 @@ comp_target_swapchain_create_images(struct comp_target *ct,
|
|||
* Do the creation.
|
||||
*/
|
||||
|
||||
COMP_DEBUG(ct->c, "Creating compositor swapchain with %d images", image_count);
|
||||
|
||||
// Create the swapchain now.
|
||||
VkSwapchainCreateInfoKHR swapchain_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
|
||||
|
@ -771,6 +768,10 @@ comp_target_swapchain_create_images(struct comp_target *ct,
|
|||
.oldSwapchain = old_swapchain_handle,
|
||||
};
|
||||
|
||||
// Print what we are creating.
|
||||
vk_print_swapchain_create_info(vk, &swapchain_info, print_log_level);
|
||||
|
||||
// Everything decided and logged, do the creation.
|
||||
ret = vk->vkCreateSwapchainKHR(vk->device, &swapchain_info, NULL, &cts->swapchain.handle);
|
||||
|
||||
// Always destroy the old.
|
||||
|
|
|
@ -87,6 +87,12 @@ struct comp_target_swapchain
|
|||
//! Thread waiting on vblank_event_fence (first pixel out).
|
||||
struct os_thread_helper event_thread;
|
||||
} vblank;
|
||||
|
||||
/*!
|
||||
* We print swapchain info as INFO the first time we create a
|
||||
* VkSWapchain, this keeps track if we have done it.
|
||||
*/
|
||||
bool has_logged_info;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -211,11 +211,11 @@ comp_window_direct_create_surface(struct comp_target_swapchain *cts,
|
|||
},
|
||||
};
|
||||
|
||||
VkResult result = vk->vkCreateDisplayPlaneSurfaceKHR(vk->instance, &surface_info, NULL, &cts->surface.handle);
|
||||
// This function is called seldom so ok to always print.
|
||||
vk_print_display_surface_create_info(vk, &surface_info, U_LOGGING_INFO);
|
||||
|
||||
free(plane_properties);
|
||||
|
||||
return result;
|
||||
// Everything decided and logged, do the creation.
|
||||
return vk->vkCreateDisplayPlaneSurfaceKHR(vk->instance, &surface_info, NULL, &cts->surface.handle);
|
||||
}
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||
|
|
Loading…
Reference in a new issue