mesa/src/loader
Michel Dänzer 31e9de9c8a loader/dri3: Allocate up to 4 back buffers for page flips
With swap interval 0, i.e. sync-to-vblank disabled.

This can be necessary for unthrottled drawing with Xwayland:

1) One buffer can be scanned out
2) One buffer can be pending in the kernel for a page flip
3) One buffer can be pending in the Wayland compositor

Therefore, with 3 buffers, the frame-rate could be capped much lower
than the throughput the GPU is capable of, in the worst case at the
Wayland compositor refresh rate.

(The native Wayland EGL backend always uses up to 4 buffers)

Leave the maximum number of buffers at 3 for swap interval != 0, it's
sufficient in that case to always be able to queue one frame ahead of
time.

https://gitlab.gnome.org/GNOME/mutter/-/issues/1455
https://gitlab.gnome.org/GNOME/mutter/-/issues/1462

Cc: mesa-stable
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7033>
2020-10-22 15:52:33 +00:00
..
Android.mk Android: move libdrm settings to top-level Android.common.mk 2016-06-13 15:31:29 +01:00
loader.c driconf: Make the driver's declarations be structs instead of XML. 2020-10-02 23:59:52 +00:00
loader.h loader: replace int/1/0 with bool/true/false 2019-10-07 21:30:16 +01:00
loader_dri3_helper.c loader/dri3: Allocate up to 4 back buffers for page flips 2020-10-22 15:52:33 +00:00
loader_dri3_helper.h loader/dri3: Only allocate additional buffers if needed 2020-10-22 15:52:33 +00:00
Makefile.sources loader: Add headers to distribution. 2014-12-12 12:11:47 -08:00
meson.build egl/x11_dri3: implement EGL_KHR_swap_buffers_with_damage 2020-08-19 12:47:58 +00:00
pci_id_driver_map.c loader: s/int/bool/ for predicate result 2019-10-07 21:30:16 +01:00
pci_id_driver_map.h loader: Check if the kernel driver is i915 before loading iris 2020-01-28 15:35:09 -08:00
SConscript loader: Factor out the common driver opening logic from each loader. 2018-11-16 17:49:17 -08:00