summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2021-03-16 09:47:38 +0000
committerPaul Lemire <paul.lemire@kdab.com>2021-03-22 10:00:22 +0100
commit9a473a3c9b246f4895ae73d7060745b8b199a6c5 (patch)
tree0ab43b532afdea78f1f8e25223d80711d01508f2 /tests/manual/rhi
parenta536039d102f911677e5efec03cc6f3d701aceac (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) Pick-to: 6.1 Task-number: QTBUG-90243 Change-Id: Ia05381597b4974d7b0914706ea2f607341dccacc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/manual/rhi')
-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