~ruther/guix-local

ref: version-1.5.0 guix-local/gnu/packages/patches/qtbase-patch-libvulkan.patch -rw-r--r-- 1.3 KiB
2ae3c696 — Hilton Chain import: crate: Generate comments with ‘TODO REVIEW:’ prefix. 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Add the full name for libvulkan.so.1 so that we can patch it in the 'build phase.
Not sent upstream.

diff --git a/src/gui/vulkan/qbasicvulkanplatforminstance.cpp b/src/gui/vulkan/qbasicvulkanplatforminstance.cpp
index 47d9a7e9..80c929e5 100644
--- a/src/gui/vulkan/qbasicvulkanplatforminstance.cpp
+++ b/src/gui/vulkan/qbasicvulkanplatforminstance.cpp
@@ -45,7 +45,7 @@ QBasicPlatformVulkanInstance::~QBasicPlatformVulkanInstance()
 
 void QBasicPlatformVulkanInstance::loadVulkanLibrary(const QString &defaultLibraryName, int defaultLibraryVersion)
 {
-    QVarLengthArray<std::pair<QString, int>, 3> loadList;
+    QVarLengthArray<std::pair<QString, int>, 4> loadList;
 
     // First in the list of libraries to try is the manual override, relevant on
     // embedded systems without a Vulkan loader and possibly with custom vendor
@@ -63,6 +63,11 @@ void QBasicPlatformVulkanInstance::loadVulkanLibrary(const QString &defaultLibra
     if (defaultLibraryVersion >= 0)
         loadList.append({ defaultLibraryName, -1 });
 
+#ifdef __linux__
+    // As a fallback we append to the list the full default name of libvulkan.
+    loadList.append({ QString::fromUtf8("libvulkan.so.1"), -1 });
+#endif
+
     bool ok = false;
     for (const auto &lib : loadList) {
         m_vulkanLib.reset(new QLibrary);