mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 23:08:18 +02:00
wsi/wayland: Unconditionally assign present_timing.time_domain.
This is a tiny simplification, which should not have any practical differences, except for a tiny bit more simple enablement of VK_GOOGLE_display_timing in a followup commit, and dropping one line of code. The time_domain can always be assigned, even if present_timing is not enabled (and neither is GOOGLE_display_timing), because 1. The field isn't used if none of these extensions is enabled. 2. The field would default to a valid initial value of zero == VK_TIME_DOMAIN_DEVICE_KHR anyway. 3. Even if wp_presentation_feedback is unavailable, and therefore presentation_clock_id has an "unknown clock" value of -1, the mapping through clock_id_to_vk_time_domain(-1) would again map to VK_TIME_DOMAIN_DEVICE_KHR. Iow. with or without the dropped if statement, the field gets a nominally valid value, and also a value that does not get used can do no harm. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41168>
This commit is contained in:
parent
3d43a0a05c
commit
7215c4ef5f
1 changed files with 1 additions and 4 deletions
|
|
@ -3843,10 +3843,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
|
|||
chain->base.set_present_mode = wsi_wl_swapchain_set_present_mode;
|
||||
chain->base.set_timing_request = wsi_wl_swapchain_set_timing_request;
|
||||
chain->base.poll_timing_request = wsi_wl_swapchain_poll_timing_request;
|
||||
if (pCreateInfo->flags & VK_SWAPCHAIN_CREATE_PRESENT_TIMING_BIT_EXT) {
|
||||
chain->base.present_timing.time_domain =
|
||||
clock_id_to_vk_time_domain(wsi_wl_surface->display->presentation_clock_id);
|
||||
}
|
||||
chain->base.present_timing.time_domain = clock_id_to_vk_time_domain(wsi_wl_surface->display->presentation_clock_id);
|
||||
chain->base.wait_for_present = wsi_wl_swapchain_wait_for_present;
|
||||
chain->base.wait_for_present2 = wsi_wl_swapchain_wait_for_present2;
|
||||
chain->base.present_mode = present_mode;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue