wsi/x11: Disable vk_xwayland_wait_ready by default on most drivers.

Venus is special and still requires extra waits.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27074>
This commit is contained in:
Hans-Kristian Arntzen
2024-02-08 11:50:25 +01:00
committed by Marge Bot
parent fc8a83c96d
commit 8b4259e69b
5 changed files with 15 additions and 12 deletions

View File

@@ -127,7 +127,7 @@ static const driOptionDescription radv_dri_options[] = {
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false)
DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false)
DRI_CONF_VK_KHR_PRESENT_WAIT(false)
DRI_CONF_VK_XWAYLAND_WAIT_READY(true)
DRI_CONF_VK_XWAYLAND_WAIT_READY(false)
DRI_CONF_RADV_REPORT_LLVM9_VERSION_STRING(false)
DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP(false)
DRI_CONF_RADV_DISABLE_SHRINK_IMAGE_STORE(false)

View File

@@ -764,7 +764,7 @@ static const driOptionDescription tu_dri_options[] = {
DRI_CONF_VK_KHR_PRESENT_WAIT(false)
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false)
DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false)
DRI_CONF_VK_XWAYLAND_WAIT_READY(true)
DRI_CONF_VK_XWAYLAND_WAIT_READY(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG

View File

@@ -76,7 +76,7 @@ static const driOptionDescription anv_dri_options[] = {
DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0)
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false)
DRI_CONF_VK_KHR_PRESENT_WAIT(false)
DRI_CONF_VK_XWAYLAND_WAIT_READY(true)
DRI_CONF_VK_XWAYLAND_WAIT_READY(false)
DRI_CONF_ANV_ASSUME_FULL_SUBGROUPS(0)
DRI_CONF_ANV_DISABLE_FCV(false)
DRI_CONF_ANV_SAMPLE_MASK_OUT_OPENGL_BEHAVIOUR(false)

View File

@@ -72,7 +72,7 @@ static const driOptionDescription nvk_dri_options[] = {
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false)
DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false)
DRI_CONF_VK_KHR_PRESENT_WAIT(false)
DRI_CONF_VK_XWAYLAND_WAIT_READY(true)
DRI_CONF_VK_XWAYLAND_WAIT_READY(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG

View File

@@ -1510,15 +1510,18 @@ static VkResult x11_swapchain_read_status_atomic(struct x11_swapchain *chain)
}
/**
* Decides if an early wait on buffer fences before buffer submission is required. That is for:
* - Mailbox mode, as otherwise the latest image in the queue might not be fully rendered at
* present time, which could lead to missing a frame.
* - Immediate mode under Xwayland, as it works practically the same as mailbox mode using the
* mailbox mechanism of Wayland. Sending a buffer with fences not yet signalled can make the
* compositor miss a frame when compositing the final image with this buffer.
* Decides if an early wait on buffer fences before buffer submission is required.
* That is for mailbox mode, as otherwise the latest image in the queue might not be fully rendered at
* present time, which could lead to missing a frame. This is an Xorg issue.
*
* Note though that early waits can be disabled in general on Xwayland by setting the
* 'vk_xwayland_wait_ready' DRIConf option to false.
* On Wayland compositors, this used to be a problem as well, but not anymore,
* and this check assumes that Mesa is running on a reasonable compositor.
* The wait behavior can be forced by setting the 'vk_xwayland_wait_ready' DRIConf option to true.
* Some drivers, like e.g. Venus may still want to require wait_ready by default,
* so the option is kept around for now.
*
* On Wayland, we don't know at this point if tearing protocol is/can be used by Xwl,
* so we have to make the MAILBOX assumption.
*/
static bool
x11_needs_wait_for_fences(const struct wsi_device *wsi_device,