radv: add vk_wsi_disable_unordered_submits and enable for GTK

GTK is missing a semaphore between QueueSubmit() and QueuePresent()
causing the WSI submit to be "unordered" and to immediately signal the
semaphores (because it's missing a wait semaphore in QueuePresent()).

The workaround is to disable unordered WSI submits until GTK fixes it
properly.

Cc: "25.3"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14087
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38351>
This commit is contained in:
Samuel Pitoiset
2025-11-10 11:38:15 +01:00
committed by Marge Bot
parent 668259ef0b
commit 0d9d45db4e
5 changed files with 19 additions and 1 deletions
+8 -1
View File
@@ -281,6 +281,12 @@ wsi_device_init(struct wsi_device *wsi,
wsi->force_swapchain_to_currentExtent =
driQueryOptionb(dri_options, "vk_wsi_force_swapchain_to_current_extent");
}
if (driCheckOption(dri_options, "vk_wsi_disable_unordered_submits", DRI_BOOL)) {
wsi->disable_unordered_submits =
driQueryOptionb(dri_options, "vk_wsi_disable_unordered_submits");
}
}
/* can_present_on_device is a function pointer used to determine if images
@@ -1366,7 +1372,8 @@ wsi_queue_submit2_unordered(const struct wsi_device *wsi,
uint32_t fence_count,
const VkFence *fences)
{
if (info->commandBufferInfoCount == 0 &&
if (!wsi->disable_unordered_submits &&
info->commandBufferInfoCount == 0 &&
queue->base.device->copy_sync_payloads != NULL) {
/* This helper is unordered so if there are no command buffers, we can
* just signal the signal semaphores and fences with the wait semaphores
+2
View File
@@ -100,6 +100,8 @@ struct wsi_device {
bool force_swapchain_to_currentExtent;
bool disable_unordered_submits;
struct {
/* Override the minimum number of images on the swapchain.
* 0 = no override */