diff options
Diffstat (limited to 'src/gui/vulkan/qvulkaninstance.cpp')
-rw-r--r-- | src/gui/vulkan/qvulkaninstance.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gui/vulkan/qvulkaninstance.cpp b/src/gui/vulkan/qvulkaninstance.cpp index 0605d88cca..4b961a6f20 100644 --- a/src/gui/vulkan/qvulkaninstance.cpp +++ b/src/gui/vulkan/qvulkaninstance.cpp @@ -251,7 +251,6 @@ public: QVulkanInstancePrivate(QVulkanInstance *q) : q_ptr(q), vkInst(VK_NULL_HANDLE), - flags(0), errorCode(VK_SUCCESS) { } ~QVulkanInstancePrivate() { reset(); } @@ -759,7 +758,7 @@ VkSurfaceKHR QVulkanInstance::surfaceForWindow(QWindow *window) // VkSurfaceKHR is non-dispatchable and maps to a pointer on x64 and a uint64 on x86. // Therefore a pointer is returned from the platform plugin, not the value itself. void *p = nativeInterface->nativeResourceForWindow(QByteArrayLiteral("vkSurface"), window); - return p ? *static_cast<VkSurfaceKHR *>(p) : 0; + return p ? *static_cast<VkSurfaceKHR *>(p) : VK_NULL_HANDLE; } /*! @@ -775,6 +774,20 @@ bool QVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevice, uint32_t } /*! + This function should be called by the application's renderer before queuing + a present operation for \a window. + + While on some platforms this will be a no-op, some may perform windowing + system dependent synchronization. For example, on Wayland this will + add send a wl_surface.frame request in order to prevent the driver from + blocking for minimized windows. + */ +void QVulkanInstance::presentAboutToBeQueued(QWindow *window) +{ + d_ptr->platformInst->presentAboutToBeQueued(window); +} + +/*! This function should be called by the application's renderer after queuing a present operation for \a window. |