aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickgraphicsconfiguration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickgraphicsconfiguration.cpp')
-rw-r--r--src/quick/items/qquickgraphicsconfiguration.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/quick/items/qquickgraphicsconfiguration.cpp b/src/quick/items/qquickgraphicsconfiguration.cpp
index dcdd069d03..4d64cf0827 100644
--- a/src/quick/items/qquickgraphicsconfiguration.cpp
+++ b/src/quick/items/qquickgraphicsconfiguration.cpp
@@ -39,6 +39,10 @@
#include "qquickgraphicsconfiguration_p.h"
+#if QT_CONFIG(vulkan)
+#include <QtGui/private/qrhivulkan_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
/*!
@@ -139,6 +143,30 @@ QQuickGraphicsConfiguration::~QQuickGraphicsConfiguration()
}
/*!
+ \return the list of Vulkan instance extensions Qt Quick prefers to
+ have enabled on the VkInstance.
+
+ In most cases Qt Quick is responsible for creating a QVulkanInstance. This
+ function is not relevant then. On the other hand, when using
+ QQuickRenderControl in combination with Vulkan-based rendering, it is the
+ application's responsibility to create a QVulkanInstance and associate it
+ with the (offscreen) QQuickWindow. In this case, it is expected that the
+ application queries the list of instance extensions to enable, and passes
+ them to QVulkanInstance::setExtensions() before calling
+ QVulkanInstance::create().
+
+ \since 6.1
+ */
+QByteArrayList QQuickGraphicsConfiguration::preferredInstanceExtensions()
+{
+#if QT_CONFIG(vulkan)
+ return QRhiVulkanInitParams::preferredInstanceExtensions();
+#else
+ return {};
+#endif
+}
+
+/*!
Sets the list of additional \a extensions to enable on the graphics device
(such as, the \c VkDevice).