client: Add waitForFrameSync for Vulkan
Frames are processed by mFrameQueue in Qtwayand. However, in vulkan backend, frames are sent by handleUpdate() but waitForFrameSync() is not called which should handle frames in mFrameQueue. For the current vulkan backend, frames are only handled by drivers like mesa. So in the current vulkan backend, some particular animations don't run or are slow because frames sent by qtwayland are not being handled. Fixes: QTBUG-96222 Change-Id: Ifbab385ca619ef9461104eb8bd778f17093a56b5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: YoungSun Park <cathy.park@lge.com>
This commit is contained in:
parent
1a2e499e0e
commit
05fefdbf57
@ -124,6 +124,16 @@ void QWaylandVulkanInstance::presentAboutToBeQueued(QWindow *window)
|
||||
qWarning() << "Attempted to call presentAboutToBeQueued() without a valid platform window";
|
||||
return;
|
||||
}
|
||||
|
||||
bool ok;
|
||||
int frameCallbackTimeout = qEnvironmentVariableIntValue("QT_WAYLAND_FRAME_CALLBACK_TIMEOUT", &ok);
|
||||
|
||||
if (ok)
|
||||
mFrameCallbackTimeout = frameCallbackTimeout;
|
||||
|
||||
if (w->format().swapInterval() > 0)
|
||||
w->waitForFrameSync(mFrameCallbackTimeout);
|
||||
|
||||
w->handleUpdate();
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,7 @@ private:
|
||||
QVulkanInstance *m_instance = nullptr;
|
||||
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR m_getPhysDevPresSupport = nullptr;
|
||||
PFN_vkCreateWaylandSurfaceKHR m_createSurface = nullptr;
|
||||
int mFrameCallbackTimeout = 100;
|
||||
};
|
||||
|
||||
} // namespace QtWaylandClient
|
||||
|
Loading…
x
Reference in New Issue
Block a user