Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
5.14.1
-
None
-
macOS 10.15.3
Description
I've compiled Qt from source to enable it to use MoltenVK, but whenever I launch any vulkan example (expect the QML's ones) it crashes with the following error:
Invalid VkSurfaceKHR Object 0x20000000002. The Vulkan spec states: surface must be a valid VkSurfaceKHR handle (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-parameter) Assertion failed: (object_table.contains(object)), function FindObject, file /tmp/macos-sdk-build/Vulkan-ValidationLayers/layers/generated/thread_safety.h, line 144.
I've compiled the source in the following way:
~/Qt/5.14.1/Src/configure -opensource -debug-and-release -confirm-license -vulkan -no-dbus -skip qtquickcontrols -skip qtquickcontrols2 -skip activeqt -skip qt3d -skip qtandroidextras -skip qtlottie -skip qtdeclarative -skip qtdatavis3d -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtpurchasing -skip qtquicktimeline -skip qtscript -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtxmlpatterns -skip qtcharts -skip qtvirtualkeyboard -skip qtwebglplugin -skip qtmultimedia -I $VULKAN_SDK/../MoltenVK/include -L $VULKAN_SDK/lib
and I have set up the following environment variables in my .zshcr:
export VULKAN_SDK="/Users/leonardoizzi/vulkansdk-macos-1.2.131.2/macOS" export PATH="$VULKAN_SDK/bin:$PATH" export DYLD_LIBRARY_PATH="$VULKAN_SDK/lib:$DYLD_LIBRARY_PATH" export VK_ICD_FILENAMES="$VULKAN_SDK/etc/vulkan/icd.d/MoltenVK_icd.json" export VK_LAYER_PATH="$VULKAN_SDK/etc/vulkan/explicit_layer.d" export VK_INSTANCE_LAYERS="VK_LAYER_KHRONOS_validation" export QT_VULKAN_LIB="$VULKAN_SDK/lib/libMoltenVK.dylib"
In attachment there's the full console output of Qt Creator.