vulkan/wsi/x11: add driconf option to not wait under Xwayland
authorSimon Ser <contact@emersion.fr>
Tue, 7 Sep 2021 13:06:46 +0000 (15:06 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 13 Sep 2021 19:38:13 +0000 (19:38 +0000)
commit3c18e69078a1e6bf9d46273536cadfcac072c6c9
treecc9282b6945103b0737c510a668396fd730a1110
parent91dc863921a683f9c001ab70380fd33425e08355
vulkan/wsi/x11: add driconf option to not wait under Xwayland

By default, Mesa's X11 Vulkan WSI will wait for buffers to be ready
before submitting them to Xwayland when the swapchain is created
with the IMMEDIATE mode.

This is undesirable when the Wayland compositor already monitors
fences. A Wayland compositor may want to know the delay between
the buffer submition and the end of the GPU work, this is impossible
to measure if the WSI waits for the buffer to be ready before
submission.

Since most compositors don't monitor fences, let's introduce a driconf
option for this for now. We can reconsider once more compositors
have better support for fences.

Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11290>
src/amd/vulkan/radv_device.c
src/intel/vulkan/anv_device.c
src/util/driconf.h
src/vulkan/wsi/wsi_common.h
src/vulkan/wsi/wsi_common_x11.c