Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandvulkaninstance_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QWAYLANDVULKANINSTANCE_P_H
6#define QWAYLANDVULKANINSTANCE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#if defined(VULKAN_H_) && !defined(VK_USE_PLATFORM_WAYLAND_KHR)
20#error "vulkan.h included without Wayland WSI"
21#endif
22
23#define VK_USE_PLATFORM_WAYLAND_KHR
24
25#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
26#include <QLibrary>
27
29
30namespace QtWaylandClient {
31
32class QWaylandWindow;
33
35{
36public:
37 explicit QWaylandVulkanInstance(QVulkanInstance *instance);
39
41 bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) override;
42 void presentAboutToBeQueued(QWindow *window) override;
43
44 VkSurfaceKHR createSurface(QWaylandWindow *window);
45
46 void beginFrame(QWindow *window) override;
47 void endFrame(QWindow *window) override;
48
49private:
50 QVulkanInstance *m_instance = nullptr;
51 PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR m_getPhysDevPresSupport = nullptr;
52 PFN_vkCreateWaylandSurfaceKHR m_createSurface = nullptr;
53 int mFrameCallbackTimeout = 100;
54};
55
56} // namespace QtWaylandClient
57
58QT_END_NAMESPACE
59
60#endif // QWAYLANDVULKANINSTANCE_P_H
VkSurfaceKHR createSurface(QWaylandWindow *window)
void presentAboutToBeQueued(QWindow *window) override
bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) override
Combined button and popup list for selecting options.