How to configure for Vulkan?
-
Hi, I have same problem, I don't know how to enable vulkan in QT GUI.
When run configurate said:
Qt Gui: Vulkan ................................. no
Also, when I run the test (/usr/local/Qt/5.10.1/Src/config.tests/qpa/vulkan) compiling good, but throw core exception the ./vulkan generate.
I have install Vulkan sdk in /usr/local/VulkanSDK/1.0.68.0/x86_64 and enviroment:
VULKAN_SDK=/usr/local/VulkanSDK/1.0.68.0/x86_64 VK_LAYER_PATH=/usr/local/VulkanSDK/1.0.68.0/x86_64/etc/explicit_layer.d PATH=/usr/local/VulkanSDK/1.0.68.0/x86_64/bin:/home/jose/bin:/home/jose/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/VulkanSDK/1.0.68.0/x86_64:/snap/bin
And when I open the Samples in QT (/usr/local/Qt/Examples/Qt-5.10.1/vulkan/hellovulkanwindow) build error in:
/usr/local/Qt/Examples/Qt-5.10.1/vulkan/hellovulkanwindow/hellovulkanwindow.cpp:51: In file included from ../../vulkan/hellovulkanwindow/hellovulkanwindow.cpp:51:0: Line 51 is: #include "hellovulkanwindow.h"
Thank.
-
You need to tell configure where the sdk is. Please read the comment from SGaist.
-
You need to tell configure where the sdk is. Please read the comment from SGaist.
@nikitablack How? I don't use QT before.
-
You need to run
configure
and pass arguments, for example:configure -I $VULKAN_SDK/include -L $VULKAN_SDK/lib -v -feature-vulkan
-
@SGaist Since I tried to run the example project
Hello Vulkan Cubes
but it just signaled this error:Failed to load vulkan: Cannot load library vulkan: (vulkan: cannot open shared object file: No such file or directory) initInstance: No Vulkan library available Failed to create platform Vulkan instance Failed to create Vulkan instance: 0
Regarding the latest status of Vulkan feature supporting in the prebuilt version for Linux, do we have it already enabled for Qt 5.15?
Thank you.
-
From your error message do you have the Vulcan dependencies installed on your system ?
-
Yeap, this is my
vulkaninfo
command output and I also haveVULKAN_SDK
set in QtCreator environment variables, thus I could build the example fine, but it just failed at runtime:
https://drive.google.com/file/d/1pd9AGdC88KiN03e7bZzonkifd2jsRlZx/view?usp=sharing
This is my graphics card info:+-----------------------------------------------------------------------------+ | NVIDIA-SMI 455.26.02 Driver Version: 455.26.02 CUDA Version: 11.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 GeForce RTX 208... Off | 00000000:01:00.0 On | N/A | | 35% 32C P8 24W / 260W | 1209MiB / 11016MiB | 6% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 2256 G /usr/lib/xorg/Xorg 568MiB | | 0 N/A N/A 2579 G /usr/bin/gnome-shell 155MiB | | 0 N/A N/A 3404 G ...AAAAAAAAA= --shared-files 88MiB | | 0 N/A N/A 3553 G ...AAAAAAAAA= --shared-files 390MiB | | 0 N/A N/A 5623 G ...s/QtCreator/bin/qtcreator 3MiB | +-----------------------------------------------------------------------------+
-
What did you install on your system for the Vulkan part ?
-
I just have the Vulkan SDK in a local folder and install this NVIDIA driver
Linux 455.26.02
, which supportsVK_KHR_ray_tracing
extension from this link:
https://developer.nvidia.com/vulkan-driver -
It would be nice to have more details about the SDK like the version you have, the way you got it and installed it, etc.
-
Yeah, so my Vulkan SDK version is
1.2.154.0
from their official page:
https://vulkan.lunarg.com/sdk/home#linuxI just extracted to a folder then set
VULKAN_SDK
to its path.
I actually tried with two of my latest current Linux NVIDIA driver as the proprietary455
and the Beta one455.26.2
.So I doubt that in order to run Vulkan examples by Qt, should I install the Vulkan using
sudo apt install vulkan-sdk
, which I might dread will conflict with the NVIDIA driver. I remember having some bad experience with it. -
@SGaist Since I tried to run the example project
Hello Vulkan Cubes
but it just signaled this error:Failed to load vulkan: Cannot load library vulkan: (vulkan: cannot open shared object file: No such file or directory) initInstance: No Vulkan library available Failed to create platform Vulkan instance Failed to create Vulkan instance: 0
Regarding the latest status of Vulkan feature supporting in the prebuilt version for Linux, do we have it already enabled for Qt 5.15?
Thank you.
@Tadinu said in How to configure for Vulkan?:
Failed to load vulkan: Cannot load library vulkan: (vulkan: cannot open shared object file: No such file or directory)
Have you try setting updating LD_LIBRARY_PATH variable to reflect the proper location of the Vulkan library(ies)?
-