summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2021-03-22 12:37:43 +0000
committerMike Krus <mike.krus@kdab.com>2021-04-20 08:57:28 +0000
commit634c09d162310504d047a2d8cfb94bdda2533094 (patch)
treeb3a8accc01955653f49ff4fcaa686d96a2662227 /tests
parentad46bc01a65955816c7e0fce1bb9c7ae9a2c00da (diff)
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) Task-number: QTBUG-90243 Change-Id: Ia05381597b4974d7b0914706ea2f607341dccacc Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 9a473a3c9b246f4895ae73d7060745b8b199a6c5)
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/rhi/simple-rhi-cpp/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/manual/rhi/simple-rhi-cpp/main.cpp b/tests/manual/rhi/simple-rhi-cpp/main.cpp
index f839012f2..021b72ef6 100644
--- a/tests/manual/rhi/simple-rhi-cpp/main.cpp
+++ b/tests/manual/rhi/simple-rhi-cpp/main.cpp
@@ -95,6 +95,7 @@
#include <Qt3DRender/QMaterial>
#include <Qt3DRender/QTexture>
#include <qmath.h>
+#include <Qt3DRender/qt3drender-config.h>
static const constexpr auto vertex_shader = R"_(#version 450
@@ -247,7 +248,7 @@ int main(int argc, char* argv[])
if (argv[1] == QByteArrayLiteral("--d3d11")) api = Qt3DRender::API::DirectX;
#endif
-#if QT_CONFIG(vulkan)
+#if QT_CONFIG(qt3d_vulkan)
if (argv[1] == QByteArrayLiteral("--vulkan")) api = Qt3DRender::API::Vulkan;
#endif