4#ifndef QVULKANINSTANCE_H
5#define QVULKANINSTANCE_H
7#include <QtGui/qtguiglobal.h>
10#pragma qt_no_master_include
11#pragma qt_sync_skip_header_check
14#if QT_CONFIG(vulkan) || defined(Q_QDOC)
16#ifndef VK_NO_PROTOTYPES
17#define VK_NO_PROTOTYPES
19#if !defined(Q_QDOC) && __has_include(<vulkan/vulkan.h>)
20#include <vulkan/vulkan.h>
28typedef void* PFN_vkVoidFunction;
34typedef void* VkInstance;
35typedef void* VkPhysicalDevice;
36typedef void* VkDevice;
40typedef int VkImageLayout;
41typedef int VkDebugReportFlagsEXT;
42typedef int VkDebugReportObjectTypeEXT;
48#if __has_include(<vulkan/vulkan.h>) || defined(Q_QDOC)
50#include <QtCore/qbytearraylist.h>
51#include <QtCore/qdebug.h>
52#include <QtCore/qhashfunctions.h>
53#include <QtCore/qlist.h>
54#include <QtCore/qscopedpointer.h>
55#include <QtCore/qversionnumber.h>
59class QVulkanInstancePrivate;
76 return lhs.name == rhs.name && lhs.version == rhs.version && lhs.specVersion == rhs.specVersion;
79{
return !(lhs == rhs); }
99 return lhs.name == rhs.name && lhs.version == rhs.version;
102{
return !(lhs == rhs); }
112#ifndef QT_NO_DEBUG_STREAM
122 return std::any_of(this->cbegin(), this->
cend(), [&](
const T &
entry) {
126 return std::any_of(this->cbegin(), this->
cend(), [&](
const T &
entry) {
138 NoDebugOutputRedirect = 0x01,
139 NoPortabilityDrivers = 0x02
152 void setVkInstance(VkInstance existingVkInstance);
161 bool isValid()
const;
162 VkResult errorCode()
const;
164 VkInstance vkInstance()
const;
171 PFN_vkVoidFunction getInstanceProcAddr(
const char *
name);
177 void resetDeviceFunctions(VkDevice
device);
181 bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
QWindow *
window);
186 typedef bool (*DebugFilter)(VkDebugReportFlagsEXT
flags, VkDebugReportObjectTypeEXT objectType, uint64_t
object,
187 size_t location, int32_t messageCode,
const char *pLayerPrefix,
const char *pMessage);
188 void installDebugOutputFilter(DebugFilter
filter);
189 void removeDebugOutputFilter(DebugFilter
filter);
191 enum DebugMessageSeverityFlag {
192 VerboseSeverity = 0x01,
194 WarningSeverity = 0x04,
199 enum DebugMessageTypeFlag {
200 GeneralMessage = 0x01,
201 ValidationMessage = 0x02,
202 PerformanceMessage = 0x04
206 using DebugUtilsFilter = std::function<bool(DebugMessageSeverityFlags
severity, DebugMessageTypeFlags
type,
const void *
message)>;
207 void installDebugOutputFilter(DebugUtilsFilter
filter);
208 void clearDebugOutputFilters();
211 friend class QVulkanInstancePrivate;
IOBluetoothDevice * device
The QVulkanDeviceFunctions class provides cross-platform access to the device level core Vulkan 1....
The QVulkanFunctions class provides cross-platform access to the instance level core Vulkan 1....
The QVulkanInstance class represents a native Vulkan instance, enabling Vulkan rendering onto a QSurf...
QHash< int, QWidget * > hash
[35multi]
const PluginKeyMapConstIterator cend
Combined button and popup list for selecting options.
constexpr bool operator!=(const timespec &t1, const timespec &t2)
const EGLAttrib EGLOutputLayerEXT * layers
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLuint64 GLenum void * handle
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLuint GLsizei const GLchar * message
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
unsigned long long quint64