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. Using QRhiWidget with a Vulkan backend on macOS

Using QRhiWidget with a Vulkan backend on macOS

Scheduled Pinned Locked Moved Unsolved General and Desktop
vulkanmacos
1 Posts 1 Posters 206 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.
  • D Offline
    D Offline
    dabu
    wrote on last edited by
    #1

    Hi all,

    I'm trying to use the new QRhiWidget with a Vulkan backend on macOS.
    My first step is to get the Simple RHI Widget example running on my machine:

    • I installed the Vulkan SDK which includes MoltenVK
    • I compiled Qt 6.7.1 myself to enable Vulkan support in Qt (somewhere in the configure output it mentions “Vulkan ...... Yes”)
    • As QRhiWidget uses Metal as the default backend on macOS, I added following line to the example code to ensure Vulkan is used (added to the constructor of ExampleRhiWidget):
    setApi(QRhiWidget::Api::Vulkan);
    
    • I set the QT_VULKAN_LIB environment variable to the location where libMoltenVK.dylib is located

    After these steps, I was hoping to successfully run the example application. However, the application hangs on startup. It's waiting for a Vulkan fence...
    I added a screenshot of the stacktrace below:
    Screenshot 2024-05-29 at 17.08.11.png

    When using Metal or OpenGL in the setAPI statement, the example runs fine.
    Next to that I tried to run the Hello Vulkan Cubes example to make sure my Vulkan/MoltenVK setup is working properly. This example (which isn't using QRhiWidget) is working fine.

    So I suspect something in the QRhiWidget is broken when used in combination with Vulkan on macOS. Can others confirm this? Or am I overlooking something?

    1 Reply Last reply
    1

    • Login

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