Compare commits

...

2 Commits

Author SHA1 Message Date
Matthias Clasen
56a9f15a0f x11: Fix Vulkan slowness
Change our swapchain configuration from
VK_PRESENT_MODE_FIFO_KHR to VK_PRESENT_MODE_IMMEDIATE_KHR.

This makes second-long hangs in vkAcquireNextImageKHR() go
away, which doesn't make any sense to me.
2020-09-10 21:17:35 -04:00
Matthias Clasen
24f4db081b x11: Fix glx slowness
Without this glFinish() call, I see glxMakeCurrent()
block for up to one second. No idea why, and it does
not make any sense to me that glFinish() would help
for this.
2020-09-10 21:17:13 -04:00
2 changed files with 2 additions and 1 deletions

View File

@@ -354,7 +354,7 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
},
.preTransform = capabilities.currentTransform,
.compositeAlpha = composite_alpha,
.presentMode = VK_PRESENT_MODE_FIFO_KHR,
.presentMode = VK_PRESENT_MODE_IMMEDIATE_KHR,
.clipped = VK_FALSE,
.oldSwapchain = priv->swapchain
},

View File

@@ -1483,6 +1483,7 @@ gdk_x11_display_make_gl_context_current (GdkDisplay *display,
g_message ("Making GLX context %p current to drawable %lu",
context, (unsigned long) drawable));
glFinish ();
if (!glXMakeContextCurrent (dpy, drawable, drawable,
context_x11->glx_context))
{