mesa/src/gallium/frontends
Qiang Yu a6bf07e7c2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
dri: avoid sending too many present reuqests when app start or pause
Found when running glxgears with vblank enabled and modesetting DDX.
glxgears will send many present requests at the beginning, but most
of them get complete event with skip mode. This problem causes
glxgears report ~75fps on a 60Hz monitor at the first record.
This change reduces it to 60fps.

Vulkan side X11 WSI does not have this problem as it will wait first
present request's complete event before send second present request.

How the problem happens:
1. client send present request 1 with target msc = 1
2. server side current msc is 100, so it find request 1 is
   outdated and queue it for vblank with target msc = 101
3. client send present request 2 with target msc = 2
4. server side current msc is still 100, so it find request 2
   is outdated and queue it with target msc = 101, and find
   request 1 will be overridden, so mark it as skipped and
   send idle notify for it.
5. client get the idle notify for request 1, and reuse the
   request 1 buffer for new back buffer to send present
   request 3.
6. this keeps going until client send present request N, and
   server finally process the vblank queue before 101 msc
   arrive and send complete event for all these requests back
   to client.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38178>
2025-11-19 10:01:50 +08:00
..
d3d10umd d3d10umd: Add missing dependency on u_formats codegen. 2025-09-17 12:04:37 -07:00
dri dri: avoid sending too many present reuqests when app start or pause 2025-11-19 10:01:50 +08:00
glx/xlib mesa: replace most occurrences of getenv() with os_get_option() 2025-11-06 04:36:13 +00:00
hgl mesa: remove inc_mapi 2025-08-06 20:35:26 +00:00
lavapipe nir: Prepare nir_lower_io_vars_to_temporaries() for optional PLS lowering 2025-11-18 20:25:42 +00:00
mediafoundation mediafoundation: propagate input timestamp / duration to output 2025-11-13 16:31:06 +00:00
rusticl rusticl/kernel: Do not run kernels with a workgroup size beyond work_dim 2025-11-18 15:42:43 +00:00
teflon teflon: Link to the ethos driver 2025-10-15 20:10:15 +00:00
va radeonsi/vcn: Cleanup AV1 screen content tools coding 2025-11-18 09:28:13 +00:00
wgl mesa: replace most occurrences of getenv() with os_get_option() 2025-11-06 04:36:13 +00:00