mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
wsi/x11: Wait for fences with IMMEDIATE on Xwayland
The commit below was already meant to do this, but accidentally missed
this part.
Fixes stutter when the frame-rate drops below the refresh rate.
Fixes: e8f50bd600 "wsi/x11: Treat IMMEDIATE present mode the same as
MAILBOX for Xwayland"
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10026>
This commit is contained in:
parent
519eb735a3
commit
8ec530d982
1 changed files with 5 additions and 1 deletions
|
|
@ -1202,6 +1202,8 @@ static void *
|
||||||
x11_manage_fifo_queues(void *state)
|
x11_manage_fifo_queues(void *state)
|
||||||
{
|
{
|
||||||
struct x11_swapchain *chain = state;
|
struct x11_swapchain *chain = state;
|
||||||
|
struct wsi_x11_connection *wsi_conn =
|
||||||
|
wsi_x11_get_connection((struct wsi_device*)chain->base.wsi, chain->conn);
|
||||||
VkResult result = VK_SUCCESS;
|
VkResult result = VK_SUCCESS;
|
||||||
|
|
||||||
assert(chain->has_present_queue);
|
assert(chain->has_present_queue);
|
||||||
|
|
@ -1225,7 +1227,9 @@ x11_manage_fifo_queues(void *state)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chain->base.present_mode == VK_PRESENT_MODE_MAILBOX_KHR) {
|
if (chain->base.present_mode == VK_PRESENT_MODE_MAILBOX_KHR ||
|
||||||
|
(chain->base.present_mode == VK_PRESENT_MODE_IMMEDIATE_KHR &&
|
||||||
|
wsi_conn->is_xwayland)) {
|
||||||
result = chain->base.wsi->WaitForFences(chain->base.device, 1,
|
result = chain->base.wsi->WaitForFences(chain->base.device, 1,
|
||||||
&chain->base.fences[image_index],
|
&chain->base.fences[image_index],
|
||||||
true, UINT64_MAX);
|
true, UINT64_MAX);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue