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
qvulkaninstance_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QVULKANINSTANCE_P_H
6#define QVULKANINSTANCE_P_H
7
8#include <QtGui/private/qtguiglobal_p.h>
9
10#if QT_CONFIG(vulkan) || defined(Q_QDOC)
11
12#include "qvulkaninstance.h"
13#include <private/qvulkanfunctions_p.h>
14#include <QtCore/QHash>
15
16//
17// W A R N I N G
18// -------------
19//
20// This file is not part of the Qt API. It exists for the convenience
21// of a number of Qt sources files. This header file may change from
22// version to version without notice, or even be removed.
23//
24// We mean it.
25//
26
27QT_BEGIN_NAMESPACE
28
29class Q_GUI_EXPORT QVulkanInstancePrivate
30{
31public:
32 QVulkanInstancePrivate(QVulkanInstance *q)
33 : q_ptr(q),
34 vkInst(VK_NULL_HANDLE),
35 errorCode(VK_SUCCESS)
36 { }
37 ~QVulkanInstancePrivate() { reset(); }
38 static QVulkanInstancePrivate *get(QVulkanInstance *q) { return q->d_ptr.data(); }
39
40 bool ensureVulkan();
41 void reset();
42
43 QVulkanInstance *q_ptr;
44 QScopedPointer<QPlatformVulkanInstance> platformInst;
45 VkInstance vkInst;
46 QVulkanInstance::Flags flags;
47 QByteArrayList layers;
48 QByteArrayList extensions;
49 QVersionNumber apiVersion;
50 VkResult errorCode;
51 QScopedPointer<QVulkanFunctions> funcs;
52 QHash<VkDevice, QVulkanDeviceFunctions *> deviceFuncs;
53 QList<QVulkanInstance::DebugFilter> debugFilters; // legacy filters based on VK_EXT_debug_report
54 QList<QVulkanInstance::DebugUtilsFilter> debugUtilsFilters; // the modern version based on VK_EXT_debug_utils
55};
56
57QT_END_NAMESPACE
58
59#endif // QT_CONFIG(vulkan)
60
61#endif // QVULKANINSTANCE_P_H
QDebug operator<<(QDebug dbg, const QFileInfo &fi)