Merge 'Fix refresh duration comment for headless backend' into 'main'

See merge request mesa/vulkan-wsi-layer!169
This commit is contained in:
Rosen Zhelev 2025-06-06 10:54:35 +01:00
commit 106de49b9e

View file

@ -123,7 +123,12 @@ util::unique_ptr<wsi_ext_present_timing_headless> wsi_ext_present_timing_headles
VkResult wsi_ext_present_timing_headless::get_swapchain_timing_properties(
uint64_t &timing_properties_counter, VkSwapchainTimingPropertiesEXT &timing_properties)
{
/* Use a reasonable approximate (5ms) that most devices should be able to match. */
/*
* The headless backend does not have a limit on how fast the swapchain can be presented.
* We set the refresh duration to 1, because on some platforms, 0 is returned until after
* at least one image had been presented. On these platforms, 0 is used to indicate timing
* properties are currently unavailable.
*/
const uint64_t fixed_refresh_duration_ns = 1;
timing_properties_counter = 1;
@ -132,4 +137,4 @@ VkResult wsi_ext_present_timing_headless::get_swapchain_timing_properties(
return VK_SUCCESS;
}
#endif
#endif