Skip to content

Switch Vulkan backends from ("deprecated") libvulkan-meta to (new) libvulkan-loader - #34

Open
helmesjo wants to merge 3 commits into
mainfrom
wip-new-vulkan-pkgs
Open

helmesjo wants to merge 3 commits into
mainfrom
wip-new-vulkan-pkgs

Conversation

@helmesjo

@helmesjo helmesjo commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

BEFORE MERGE: Branch currently have temporary queue/testing prerequisite in repositories.manifest (drop once the new libmoltenvk packages are in cppget.org).

libimgui-render-vulkan and libimgui-render-vulkan-docking now depend on libvulkan-loader ^1.4.359 and link lib{vulkan} on every platform, including macOS. The backend no longer picks an ICD. Direct-linking MoltenVK from it would pin a driver onto every consumer and collide with the loader's vk* exports.

macOS GLFW+Vulkan examples consume libmoltenvk ^1.4.2 themselves: libs{MoltenVK} is an adhoc (unlinked) prerequisite, lib{mvk-direct-util} dlopens it, and VK_LUNARG_direct_driver_loading hands it to the loader at vkCreateInstance.
They also call glfwInitVulkanLoader(vkGetInstanceProcAddr) so GLFW uses the linked Khronos loader. Exclusive direct driver loading cannot use glfwCreateWindowSurface (GLFW probes WSI on the loader before any ICD exists), so the examples create a CAMetalLayer and call vkCreateMetalSurfaceEXT (macos_surface.mm).
This (upstream-conventional) setup is all explained in the libmoltenvk/PACKAGE-README.md.

Packages that include Apple SDK headers pin cxx.std to 20 on macOS (latest elsewhere). Apple SDK headers currently reject C++23/26 enum arithmetic.

Also: docking null-backend test .gitignore fix.

Link lib{vulkan} on every platform, including macOS. Do not
direct-link MoltenVK from the backend (that pins an ICD onto every
consumer and collides with the loader's vk* exports).

GLFW+Vulkan examples adhoc-import libs{MoltenVK} and load it at
vkCreateInstance via VK_LUNARG_direct_driver_loading.
@helmesjo

Copy link
Copy Markdown
Contributor Author

FYI the failing build appears to have run on the last release (v1.92.3+3) and not this exact PR (specifically it mentions libvulkan-meta which is completely absent in this now).

@wroyca

wroyca commented Sep 10, 2026

Copy link
Copy Markdown
Member

FYI the failing build appears to have run on the last release (v1.92.3+3) and not this exact PR (specifically it mentions libvulkan-meta which is completely absent in this now).

BTW, feel free to take over as a maintainer :)

I don't have much time to spare for ImGui at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants