From 65fe085b70e415873f8b995ecfe6640cc3b54e4e Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Fri, 11 Sep 2026 23:06:06 +0800 Subject: [PATCH] feat(khronos.vulkan-hpp): 1.4.357.1 follows compat.vulkan 1.4.357.3; the macOS note says how to get a device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit KHRONOS.VULKAN-HPP 1.4.357.1 -- the same Vulkan-Headers tarball, pinned to compat.vulkan 1.4.357.3, whose Windows artifact carries the loader DLL. A new version rather than a moved pin, because an installed copy records the pin it resolved with. `vulkan-hpp-module` moves to it. This is the half of #395 that could not be verified in #395 itself: the member redirects only the `khronos` namespace to this checkout, so `compat` came from the published index, which did not have 1.4.357.3 until #395 merged. Redirecting `compat` as well is still refused on mcpp 2026.9.11.2 ("≥2 project-level index repos is a known xlings resolution gap"), so the order had to be: merge #395, republish, then this. On #395's own `windows-2022` leg the member failed exactly as predicted (it resolved compat.vulkan 1.4.357.0 and died with 0xC0000135); this change is judged by that leg passing. COMPAT.VULKAN, macOS -- a comment, no behaviour change. The block said only that the ICD is MoltenVK. It now records what was measured on macos-15 (#396): nothing crashes without MoltenVK; a device enumerates when libMoltenVK.dylib and a relative-path manifest sit in /vulkan/icd.d, which the static loader searches first, and that layout survives being moved; or through VK_DRIVER_FILES; and in both cases only with portability enumeration enabled. What mcpp would need to place those files is mcpp-community/mcpp#615. Co-authored-by: sunrisepeak --- pkgs/c/compat.vulkan.lua | 21 ++++++++++++- pkgs/k/khronos.vulkan-hpp.lua | 35 +++++++++++++++++++++- tests/examples/vulkan-hpp-module/mcpp.toml | 2 +- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/pkgs/c/compat.vulkan.lua b/pkgs/c/compat.vulkan.lua index d656a7d..03d20c5 100644 --- a/pkgs/c/compat.vulkan.lua +++ b/pkgs/c/compat.vulkan.lua @@ -403,7 +403,26 @@ package = { ldflags = { "-framework", "CoreFoundation", "-lpthread", "-lm" }, runtime = { -- macOS has no native Vulkan; the ICD is MoltenVK, layered over - -- Metal. The loader loads it exactly like any other ICD. + -- Metal. Nothing here ships it, and without it nothing crashes: + -- vkCreateInstance returns VK_ERROR_INCOMPATIBLE_DRIVER and the + -- program sees zero devices (measured on macos-15, mcpp-index #396). + -- + -- HOW A PROGRAM GETS A DEVICE TODAY, both measured there: + -- * this static loader searches /vulkan/icd.d + -- first -- CoreFoundation's resources directory for an + -- unbundled executable is the executable's own directory -- so + -- libMoltenVK.dylib beside the executable and + -- vulkan/icd.d/MoltenVK_icd.json holding + -- "library_path": "../../libMoltenVK.dylib" enumerates the GPU, + -- and still does after the directory is copied elsewhere; + -- * or VK_DRIVER_FILES=/share/vulkan/icd.d/MoltenVK_icd.json. + -- Either way the instance must enable + -- VK_KHR_portability_enumeration and set + -- VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR, or the loader + -- hides a portability driver from vkEnumeratePhysicalDevices. + -- + -- mcpp cannot yet place those two files beside the executable: it + -- deploys *.dll only, flattened into bin/ (mcpp-community/mcpp#615). capabilities = { "vulkan.icd.driver" }, }, }, diff --git a/pkgs/k/khronos.vulkan-hpp.lua b/pkgs/k/khronos.vulkan-hpp.lua index f7dbf91..ff0e16d 100644 --- a/pkgs/k/khronos.vulkan-hpp.lua +++ b/pkgs/k/khronos.vulkan-hpp.lua @@ -159,6 +159,17 @@ package = { -- header, loader and bindings repositories together. xpm = { linux = { + -- 1.4.357.1: the same headers, pinned to compat.vulkan 1.4.357.3, whose + -- Windows artifact carries the loader DLL. A new version rather than a + -- moved pin, because an installed copy records the pin it resolved + -- with (see compat.vulkan 1.4.357.1). + ["1.4.357.1"] = { + url = { + GLOBAL = "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/vulkan-headers/releases/download/1.4.357.0/vulkan-headers-1.4.357.0.tar.gz", + }, + sha256 = "e87dce08116151f6b6d7de6b6faf41498e87e6cf848ff16fa3bd5402190ad4a3", + }, ["1.4.357.0"] = { url = { GLOBAL = "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz", @@ -168,6 +179,17 @@ package = { }, }, macosx = { + -- 1.4.357.1: the same headers, pinned to compat.vulkan 1.4.357.3, whose + -- Windows artifact carries the loader DLL. A new version rather than a + -- moved pin, because an installed copy records the pin it resolved + -- with (see compat.vulkan 1.4.357.1). + ["1.4.357.1"] = { + url = { + GLOBAL = "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/vulkan-headers/releases/download/1.4.357.0/vulkan-headers-1.4.357.0.tar.gz", + }, + sha256 = "e87dce08116151f6b6d7de6b6faf41498e87e6cf848ff16fa3bd5402190ad4a3", + }, ["1.4.357.0"] = { url = { GLOBAL = "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz", @@ -177,6 +199,17 @@ package = { }, }, windows = { + -- 1.4.357.1: the same headers, pinned to compat.vulkan 1.4.357.3, whose + -- Windows artifact carries the loader DLL. A new version rather than a + -- moved pin, because an installed copy records the pin it resolved + -- with (see compat.vulkan 1.4.357.1). + ["1.4.357.1"] = { + url = { + GLOBAL = "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/vulkan-headers/releases/download/1.4.357.0/vulkan-headers-1.4.357.0.tar.gz", + }, + sha256 = "e87dce08116151f6b6d7de6b6faf41498e87e6cf848ff16fa3bd5402190ad4a3", + }, ["1.4.357.0"] = { url = { GLOBAL = "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz", @@ -207,6 +240,6 @@ package = { targets = { ["vulkan_hpp"] = { kind = "lib" } }, -- The loader, for the static dispatcher's direct calls — and, through -- it, `compat.vulkan-headers` for the includes these units open. - deps = { ["compat.vulkan"] = "1.4.357.0" }, + deps = { ["compat.vulkan"] = "1.4.357.3" }, }, } diff --git a/tests/examples/vulkan-hpp-module/mcpp.toml b/tests/examples/vulkan-hpp-module/mcpp.toml index 285f196..5f849dc 100644 --- a/tests/examples/vulkan-hpp-module/mcpp.toml +++ b/tests/examples/vulkan-hpp-module/mcpp.toml @@ -21,7 +21,7 @@ name = "vulkan-hpp-module-tests" version = "0.1.0" [dependencies.khronos] -vulkan-hpp = "1.4.357.0" +vulkan-hpp = "1.4.357.1" # No [build] section, and no per-platform gating: unlike tests/examples/vulkan, # which had to publish its own HAVE_VULKAN_LOADER switch, nothing here is