From 90a2bf64fe0a315c82aaeb105f54cdd806d43875 Mon Sep 17 00:00:00 2001 From: cmspam Date: Tue, 21 Apr 2026 10:02:51 +0900 Subject: [PATCH] vkmark: drop stale vulkan-headers 1.4.333 patch --- .../fix-build-with-newer-vulkan-headers.patch | 73 ------------------- pkgs/by-name/vk/vkmark/package.nix | 6 -- 2 files changed, 79 deletions(-) delete mode 100644 pkgs/by-name/vk/vkmark/fix-build-with-newer-vulkan-headers.patch diff --git a/pkgs/by-name/vk/vkmark/fix-build-with-newer-vulkan-headers.patch b/pkgs/by-name/vk/vkmark/fix-build-with-newer-vulkan-headers.patch deleted file mode 100644 index 58a38b39cca1..000000000000 --- a/pkgs/by-name/vk/vkmark/fix-build-with-newer-vulkan-headers.patch +++ /dev/null @@ -1,73 +0,0 @@ -From abc5fc8495692df968636c29f44719e0999a73b5 Mon Sep 17 00:00:00 2001 -From: Philipp Zabel -Date: Wed, 10 Dec 2025 10:59:49 +0100 -Subject: [PATCH 1/2] core: Register custom dispatcher with isDispatchLoader - -Since Vulkan 1.4.333, custom dispatch loaders must be registered -with isDispatchLoader to be recognized. ---- - src/vulkan_state.cpp | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/vulkan_state.cpp b/src/vulkan_state.cpp -index a36b2994dbba3e74cb1fb378e4dbb054157ae516..847095147bf5e050e558065623921ac3f06eb7e7 100644 ---- a/src/vulkan_state.cpp -+++ b/src/vulkan_state.cpp -@@ -65,6 +65,18 @@ class DebugUtilsDispatcher - - } - -+#if VK_HEADER_VERSION >= 333 -+namespace vk::detail { -+ -+template <> -+struct isDispatchLoader<::DebugUtilsDispatcher> -+{ -+ static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; -+}; -+ -+} -+#endif -+ - VulkanState::VulkanState(VulkanWSI& vulkan_wsi, ChoosePhysicalDeviceStrategy const& pd_strategy, bool debug) - : debug_enabled(debug) - { - -From ab3f3d709e2f93859b528b1ace56423675940290 Mon Sep 17 00:00:00 2001 -From: Philipp Zabel -Date: Wed, 10 Dec 2025 10:59:49 +0100 -Subject: [PATCH 2/2] kms: Register custom dispatcher with isDispatchLoader - -Since Vulkan 1.4.333, custom dispatch loaders must be registered -with isDispatchLoader to be recognized. ---- - src/ws/kms_window_system.cpp | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/src/ws/kms_window_system.cpp b/src/ws/kms_window_system.cpp -index 4bf7838cee0512925ef084b641de3c2a11389c6d..1bc04581eee233f33ad3ea7a719ec4c3894b1104 100644 ---- a/src/ws/kms_window_system.cpp -+++ b/src/ws/kms_window_system.cpp -@@ -474,6 +474,22 @@ class GetFormatProperties2Dispatcher - PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR; - }; - -+} -+ -+#if VK_HEADER_VERSION >= 333 -+namespace vk::detail { -+ -+template <> -+struct isDispatchLoader<::GetFormatProperties2Dispatcher> -+{ -+ static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; -+}; -+ -+} -+#endif -+ -+namespace { -+ - std::vector vk_get_supported_mods_for_format(VulkanState& vulkan, - vk::Format format) - { diff --git a/pkgs/by-name/vk/vkmark/package.nix b/pkgs/by-name/vk/vkmark/package.nix index 3c35f06203ac..bba04b3ba4ad 100644 --- a/pkgs/by-name/vk/vkmark/package.nix +++ b/pkgs/by-name/vk/vkmark/package.nix @@ -28,12 +28,6 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-Rjpjqe7htwlhDdwELm74MvSzHzXLhRD/P8IES7nz/VY="; }; - patches = [ - # Fix build with vulkan-headers >= 1.4.333 - # Remove once https://github.com/vkmark/vkmark/pull/80 is included in a release - ./fix-build-with-newer-vulkan-headers.patch - ]; - postPatch = '' substituteInPlace src/meson.build \ --replace-fail "vulkan_dep.get_pkgconfig_variable('prefix')" "'${vulkan-headers}'"