diff options
author | Mike Krus <mike.krus@kdab.com> | 2021-03-16 09:47:38 +0000 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2021-03-22 10:00:22 +0100 |
commit | 9a473a3c9b246f4895ae73d7060745b8b199a6c5 (patch) | |
tree | 0ab43b532afdea78f1f8e25223d80711d01508f2 /src/render/surfaces | |
parent | a536039d102f911677e5efec03cc6f3d701aceac (diff) | |
download | qt3d-9a473a3c9b246f4895ae73d7060745b8b199a6c5.tar.gz |
Fix detection of Vulkan
When Qt is built to enable Vulkan support, it is given the path to
the Vulkan header source. This then enables the vulkan feature.
Qt3D used this feature to decide if it could use Vulkan directly or
not, however, since it is now built separately, it has no idea where
to find the headers, so QVulkanInstance is not properly defined.
This caused an issue when using official installers of Qt since
those are configured to support Vulkan.
So we now do a separate config check to find Vulkan for Qt3D.
When building Qt3D, you need to make sure if can find Vulkan (the same
way you configure Qt itself)
Pick-to: 6.1
Task-number: QTBUG-90243
Change-Id: Ia05381597b4974d7b0914706ea2f607341dccacc
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/surfaces')
-rw-r--r-- | src/render/surfaces/vulkaninstance.cpp | 2 | ||||
-rw-r--r-- | src/render/surfaces/vulkaninstance_p.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/render/surfaces/vulkaninstance.cpp b/src/render/surfaces/vulkaninstance.cpp index a8de2fce8..24b1d55fa 100644 --- a/src/render/surfaces/vulkaninstance.cpp +++ b/src/render/surfaces/vulkaninstance.cpp @@ -39,7 +39,7 @@ #include "vulkaninstance_p.h" -#if QT_CONFIG(vulkan) +#if QT_CONFIG(qt3d_vulkan) #include <QVulkanInstance> diff --git a/src/render/surfaces/vulkaninstance_p.h b/src/render/surfaces/vulkaninstance_p.h index 67f52af6a..5d6203cfd 100644 --- a/src/render/surfaces/vulkaninstance_p.h +++ b/src/render/surfaces/vulkaninstance_p.h @@ -52,11 +52,12 @@ // #include <QtGui/qtguiglobal.h> +#include <Qt3DRender/qt3drender-config.h> #include <Qt3DRender/private/qt3drender_global_p.h> QT_BEGIN_NAMESPACE -#if QT_CONFIG(vulkan) +#if QT_CONFIG(qt3d_vulkan) class QVulkanInstance; namespace Qt3DRender { Q_3DRENDERSHARED_PRIVATE_EXPORT |