From e6a150004a2ae945c035cce435f593f73633a760 Mon Sep 17 00:00:00 2001 From: Will Campbell Date: Mon, 27 Oct 2025 14:59:05 -0700 Subject: [PATCH 1/4] presentation-time: add flags to differentiate variable and fixed refresh rate presentation Wayland clients currently have no way to determine whether presentation is happening at a fixed or variable refresh rate. This change adds `fixed_rate` and `variable_rate` flags to the presentation_feedback event, allowing compositors to report this information. The compositor is free to leave these blank for cases where the behavior matches neither case, like occluded windows and windows spanning multiple displays. This MR also requires that the compositor output a 'refresh' interval when either of these flags is set, as there should be a clear refresh interval in the cases described by these flags, and there is not much use in this information without the 'refresh' value. This information will be exposed through the upcoming VK_EXT_present_timing Vulkan extension. The extension allows reporting variable, fixed, and unknown refresh rates in VkSwapchainTimingPropertiesEXT. This information is useful for apps that want to align simulation with presentation times for smooth animation. Knowing that presentation will happen at a fixed refresh rate lets applications align their simulation to this interval. Whereas with a variable refresh rate apps can expect content updates to become visible soon after they are ready when running below the display's max refresh rate. --- .../presentation-time/presentation-time.xml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/stable/presentation-time/presentation-time.xml b/stable/presentation-time/presentation-time.xml index c2431c5..5c0a4bc 100644 --- a/stable/presentation-time/presentation-time.xml +++ b/stable/presentation-time/presentation-time.xml @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. - + @@ -123,7 +123,7 @@ - + A presentation_feedback object returns an indication that a wl_surface content update has become visible to the user. @@ -195,6 +195,22 @@ fullscreen surface and a surface on a hardware overlay. + + + The display hardware is operating at a fixed refresh rate. + The presentation was aligned to a multiple of the previous event's + 'refresh' argument. + If this is set the refresh argument must not be 0. + + + + + The display hardware is operating at a variable refresh rate. + The presentation occurred as soon as possible after the interval + in the previous event's 'refresh' argument. + If this is set the refresh argument must not be 0. + + From 992bd982068e359c107c16eae60bf4bdf66472e5 Mon Sep 17 00:00:00 2001 From: Will Campbell Date: Thu, 30 Oct 2025 13:00:50 -0700 Subject: [PATCH 2/4] Elaborating based on feedback --- stable/presentation-time/presentation-time.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stable/presentation-time/presentation-time.xml b/stable/presentation-time/presentation-time.xml index 5c0a4bc..d9730d6 100644 --- a/stable/presentation-time/presentation-time.xml +++ b/stable/presentation-time/presentation-time.xml @@ -205,7 +205,8 @@ - The display hardware is operating at a variable refresh rate. + The display hardware is operating at a variable refresh rate driven + by the surface. The presentation occurred as soon as possible after the interval in the previous event's 'refresh' argument. If this is set the refresh argument must not be 0. @@ -247,6 +248,9 @@ For version 1, if the output does not have a constant refresh rate, the refresh argument must be zero. + If the 'fixed_rate' flag is set then the refresh argument is + the output's constant refresh rate. + The 64-bit value combined from seq_hi and seq_lo is the value of the output's vertical retrace counter when the content update was first scanned out to the display. This value must From aa367955829ba434a2977f6b78420d1fbb189bfe Mon Sep 17 00:00:00 2001 From: Will Campbell Date: Tue, 4 Nov 2025 16:00:03 -0800 Subject: [PATCH 3/4] Elaborate on variable_rate as well --- stable/presentation-time/presentation-time.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stable/presentation-time/presentation-time.xml b/stable/presentation-time/presentation-time.xml index d9730d6..c510e90 100644 --- a/stable/presentation-time/presentation-time.xml +++ b/stable/presentation-time/presentation-time.xml @@ -249,7 +249,9 @@ the refresh argument must be zero. If the 'fixed_rate' flag is set then the refresh argument is - the output's constant refresh rate. + the output's constant refresh rate. If the 'variable_rate' flag + is set then the refresh argument is the output's fastest refresh + rate. The 64-bit value combined from seq_hi and seq_lo is the value of the output's vertical retrace counter when the content From a2727fe408c202958d2771fc8d8e0db82ed07743 Mon Sep 17 00:00:00 2001 From: Will Campbell Date: Mon, 1 Dec 2025 19:54:40 -0800 Subject: [PATCH 4/4] Add commas --- stable/presentation-time/presentation-time.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stable/presentation-time/presentation-time.xml b/stable/presentation-time/presentation-time.xml index c510e90..35eace2 100644 --- a/stable/presentation-time/presentation-time.xml +++ b/stable/presentation-time/presentation-time.xml @@ -200,7 +200,7 @@ The display hardware is operating at a fixed refresh rate. The presentation was aligned to a multiple of the previous event's 'refresh' argument. - If this is set the refresh argument must not be 0. + If this is set, the refresh argument must not be 0. @@ -209,7 +209,7 @@ by the surface. The presentation occurred as soon as possible after the interval in the previous event's 'refresh' argument. - If this is set the refresh argument must not be 0. + If this is set, the refresh argument must not be 0. @@ -248,9 +248,9 @@ For version 1, if the output does not have a constant refresh rate, the refresh argument must be zero. - If the 'fixed_rate' flag is set then the refresh argument is + If the 'fixed_rate' flag is set, then the refresh argument is the output's constant refresh rate. If the 'variable_rate' flag - is set then the refresh argument is the output's fastest refresh + is set, then the refresh argument is the output's fastest refresh rate. The 64-bit value combined from seq_hi and seq_lo is the value