Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to configure for Vulkan?

How to configure for Vulkan?

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 6 Posters 12.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 26 Feb 2018, 11:24 last edited by
    #4

    PATH is for application discovery, it has nothing to do with header files.

    You can use the -I option of configure to add additional search paths. Beware that contrary to the compiler option, you need to leave a space between the option and the path you want to give. You'll likely also need to use the -L option in order to find the Vulkan libraries.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    3
    • N Offline
      N Offline
      nikitablack
      wrote on 26 Feb 2018, 15:56 last edited by nikitablack
      #5

      @SGaist thank you, you're right and I need to read help more carefully.

      So I successfully configured and output gives me:

      Qt Gui:
        Vulkan ................................. yes
      

      I build the library with make, next installed it with make install but still can't make it work. This time it tells me

      /usr/local/Qt-5.10.1/include/QtGui/QVulkanFunctions:1: error: qvulkanfunctions.h: No such file or directory
      

      Indeed this file is not there. But why? For example, qvulkanwindow.h was installed, and QVulkanFunctions too. But what's wrong with qvulkanfunctions.h?

      Upd: I manually copied this header to installation folder and finally was able to compile the example. Looks like somebody forgot to add this header to installation file list.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 26 Feb 2018, 16:36 last edited by
        #6

        Did you re-run configure from a clean state ?

        What I recommend is to use out of source builds so if you need to start over you just nuke the folder you use and start from fresh. That way you keep the sources clean.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        2
        • N Offline
          N Offline
          nikitablack
          wrote on 27 Feb 2018, 07:46 last edited by
          #7

          Yes, did it twice. Looks like an error in generated make file. Anyway, everything working now, thank you.

          1 Reply Last reply
          1
          • J Offline
            J Offline
            JoseLMO
            wrote on 21 Mar 2018, 09:51 last edited by
            #8

            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.

            1 Reply Last reply
            0
            • N Offline
              N Offline
              nikitablack
              wrote on 21 Mar 2018, 09:55 last edited by
              #9

              You need to tell configure where the sdk is. Please read the comment from SGaist.

              J 1 Reply Last reply 25 Apr 2018, 08:29
              0
              • N nikitablack
                21 Mar 2018, 09:55

                You need to tell configure where the sdk is. Please read the comment from SGaist.

                J Offline
                J Offline
                JoseLMO
                wrote on 25 Apr 2018, 08:29 last edited by
                #10

                @nikitablack How? I don't use QT before.

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  nikitablack
                  wrote on 25 Apr 2018, 10:04 last edited by
                  #11

                  You need to run configure and pass arguments, for example:

                  configure -I $VULKAN_SDK/include -L $VULKAN_SDK/lib -v -feature-vulkan
                  
                  1 Reply Last reply
                  1
                  • J Offline
                    J Offline
                    JoseLMO
                    wrote on 26 Apr 2018, 16:26 last edited by
                    #12

                    The bash said:

                    ERROR: Feature 'vulkan' was enabled, but the pre-condition 'libs.vulkan' failed.

                    And $VULKAN_SDK is correct folder.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      Tadinu
                      wrote on 28 Oct 2020, 00:10 last edited by Tadinu
                      #13

                      @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.

                      Pablo J. RoginaP 1 Reply Last reply 4 Nov 2020, 13:33
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 28 Oct 2020, 20:45 last edited by
                        #14

                        From your error message do you have the Vulcan dependencies installed on your system ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          Tadinu
                          wrote on 29 Oct 2020, 05:43 last edited by Tadinu
                          #15

                          Yeap, this is my vulkaninfo command output and I also have VULKAN_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 |
                          +-----------------------------------------------------------------------------+
                          
                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 29 Oct 2020, 18:03 last edited by
                            #16

                            What did you install on your system for the Vulkan part ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              Tadinu
                              wrote on 31 Oct 2020, 13:21 last edited by
                              #17

                              I just have the Vulkan SDK in a local folder and install this NVIDIA driver Linux 455.26.02, which supports VK_KHR_ray_tracing extension from this link:
                              https://developer.nvidia.com/vulkan-driver

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 31 Oct 2020, 14:45 last edited by
                                #18

                                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.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  Tadinu
                                  wrote on 3 Nov 2020, 05:28 last edited by
                                  #19

                                  Yeah, so my Vulkan SDK version is 1.2.154.0 from their official page:
                                  https://vulkan.lunarg.com/sdk/home#linux

                                  I 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 proprietary 455 and the Beta one 455.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.

                                  1 Reply Last reply
                                  0
                                  • T Tadinu
                                    28 Oct 2020, 00:10

                                    @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.

                                    Pablo J. RoginaP Offline
                                    Pablo J. RoginaP Offline
                                    Pablo J. Rogina
                                    wrote on 4 Nov 2020, 13:33 last edited by
                                    #20

                                    @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)?

                                    Upvote the answer(s) that helped you solve the issue
                                    Use "Topic Tools" button to mark your post as Solved
                                    Add screenshots via postimage.org
                                    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                                    1 Reply Last reply
                                    0
                                    • T Offline
                                      T Offline
                                      Tadinu
                                      wrote on 8 Nov 2020, 12:29 last edited by Tadinu 11 Aug 2020, 12:30
                                      #21

                                      Yeah, I would normally avoid updating LD_LIBRARY_PATH. So I added this to ~/QT/Examples/Qt-5.15.1/vulkan/hellovulkancubes/hellovulkancubes.pro file:

                                      LIBS += -lvulkan -L<PATH_TO_VULKAN_SDK>/1.2.154.0/x86_64/lib
                                      

                                      And it works!

                                      Thanks for your advice!

                                      1 Reply Last reply
                                      0
                                      • J Offline
                                        J Offline
                                        JackLiu
                                        wrote on 23 Jan 2024, 15:23 last edited by
                                        #22

                                        I found an interesting piece of information that

                                        -recheck-all
                                        

                                        is needed if it has been configured before.

                                        1 Reply Last reply
                                        0

                                        • Login

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Users
                                        • Groups
                                        • Search
                                        • Get Qt Extensions
                                        • Unsolved