Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

No Vulkan support in macOS Qt 5.12.0 dmg file?



  • Hello,

    I suspect that the macOS binary dmg file for 5.12.0 is not built with Vulkan support. Is that intended?

    That's my only question. The rest of this message is just my investigation around that issue:

    I downloaded and installed the macOS binary for 5.12.0 from https://download.qt.io/archive/qt/5.12/5.12.0/qt-opensource-mac-x64-5.12.0.dmg

    I already have the Vulkan SDK 1.1.92.0 installed and I have the environment variable VULKAN_SDK pointing to it. I have macOS 10.14.2 and XCode 10 on a mid-2012 MacBook Pro. I already have some Vulkan code that I can build and run on this machine (without the use of Qt). For run time, I define the environment variable VK_ICD_FILENAMES to point to MoltenVK_icd.json and VK_LAYER_PATH to point to explicit_layer.d.

    When I try to build the Vulkan examples, I get this kind of error from the compiler:

    ../../../Qt5.12.0/Examples/Qt-5.12.0/vulkan/hellovulkanwindow/hellovulkanwindow.h:54:31: error: unknown class name 'QVulkanWindowRenderer'; did you mean 'VulkanRenderer'?
    class VulkanRenderer : public QVulkanWindowRenderer
    

    I also tried to write some code myself, I use #include <QVulkanInstance>. The inclusion of the header file does not give any error but as soon as it reaches a line of code using a QVulkanInstance object, I get a similar error:

    unknown type name 'QVulkanInstance'
    

    In the install tree, in 5.12.0/clang_64/lib/QtGui.framework/Versions/5/Headers/qvulkaninstance.h there is a statement like this:

    #if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
    

    I tried a similar thing in my own code:

    #if QT_CONFIG(vulkan)
    #pragma message "Qt with Vulkan"
    #else
    #pragma message "Qt without Vulkan"
    #endif
    

    This leads the compiler to print out the message: "Qt without Vulkan"

    Best,


  • Lifetime Qt Champion

    Hi,

    I think this blog post will answer your question on how to use Vulka on macOS.



  • Hi,

    I know about this blog post about building Qt from sources. I was trying to avoid to build it myself as it takes forever to complete.

    My question is: why is the dmg binary not including Vulkan support? Is that a bug or is it intended? If it is intended, what is the rational?

    Best,


  • Lifetime Qt Champion

    It's likely related to QTQAINFRA-1187. There's currently no mention of the macOS platform.

    You should comment there to get some more information.

    In between, one thing you can try, is to build only the QPA plugin from sources.


Log in to reply