Draft: macos: Add Vulkan support
Add Vulkan support to GTK on macOS via MoltenVK.
At this moment the demo app renders and looks pretty okay-ish.
Install
- Install molten-vk from homebrew or install the latest Vulkan SDK.
-
meson setup -Dmoltenvk-dir=<path to sdk root> ...
. For homebrew use-Dmoltenvk-dir=$(brew --prefix molten-vk)
- build and run the gtk4-demo app
Open issues
-
After a while complains about swapchain mismatches: (gtk4-demo:34539): Gdk-WARNING **: 14:12:37.064: vkAcquireNextImageKHR(): A swapchain no longer matches the surface properties exactly, but can still be used to present to the surface successfully. (VK_SUBOPTIMAL_KHR) (1000001003)
-
Doesn't run on secondary monitor. -
Window starts flickering sometimes (sync issue?) -
Doesn't scale when moved from one monitor to another (different scale factor) -
Some click events are not handled (e.g. click on Run button in gtk4-demo)
Help is appreciated since I have no experience with Vulkan and Metal.
Edited by Arjan Molenaar