diff --git a/src/amd/vulkan/radv_instance.c b/src/amd/vulkan/radv_instance.c index 8c656491672..7e9b8cacc83 100644 --- a/src/amd/vulkan/radv_instance.c +++ b/src/amd/vulkan/radv_instance.c @@ -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) diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index b243b6589bf..d3ade679798 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -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 diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 57b810f80ee..f11bad3bb44 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -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) diff --git a/src/nouveau/vulkan/nvk_instance.c b/src/nouveau/vulkan/nvk_instance.c index 145b9ab664c..dc72f5020e4 100644 --- a/src/nouveau/vulkan/nvk_instance.c +++ b/src/nouveau/vulkan/nvk_instance.c @@ -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 diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 417d7cc10b9..a55638649eb 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -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,