From 29a6a0bf60625c052c481444e967e3d902290308 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Wed, 3 Dec 2025 00:33:56 +0200 Subject: [PATCH 1/2] Update vulkan_state.cpp ./src/vulkan_state.cpp: In member function 'void VulkanState::create_instance(VulkanWSI&)': ../src/vulkan_state.cpp:203:32: warning: 'vk::DebugUtilsMessengerCreateInfoEXT& vk::DebugUtilsMessengerCreateInfoEXT::setPfnUserCallback(PFN_vkDebugUtilsMessengerCallbackEXT)' is deprecated: This setter is deprecated. Use the one taking a function pointer type from the vk-namespace instead. [-Wdeprecated-declarations] 195 | auto const debug_create_info = vk::DebugUtilsMessengerCreateInfoEXT{} | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 196 | .setMessageSeverity(vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 197 | vk::DebugUtilsMessageSeverityFlagBitsEXT::eInfo | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 198 | vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 | vk::DebugUtilsMessageSeverityFlagBitsEXT::eError) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 200 | .setMessageType(vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 201 | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 202 | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 203 | .setPfnUserCallback(debug_callback); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ In file included from /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan.hpp:9625, from ../src/pch/cpp_pch.h:1: /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_structs.hpp:32331:40: note: declared here 32331 | DebugUtilsMessengerCreateInfoEXT & setPfnUserCallback( PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ ) VULKAN_HPP_NOEXCEPT | ^~~~~~~~~~~~~~~~~~ ../src/vulkan_state.cpp:207:52: error: no matching function for call to 'vk::Instance::createDebugUtilsMessengerEXT(const vk::DebugUtilsMessengerCreateInfoEXT&, std::nullptr_t, const {anonymous}::DebugUtilsDispatcher&) const' 207 | instance().createDebugUtilsMessengerEXT(debug_create_info, nullptr, dud), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan.hpp:9624: /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:21526:33: note: candidate: 'template::value, bool>::type > vk::Result vk::Instance::createDebugUtilsMessengerEXT(const vk::DebugUtilsMessengerCreateInfoEXT*, const vk::AllocationCallbacks*, vk::DebugUtilsMessengerEXT*, const Dispatch&) const' 21526 | VULKAN_HPP_NODISCARD Result createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT * pCreateInfo, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:21526:33: note: template argument deduction/substitution failed: ../src/vulkan_state.cpp:207:81: note: cannot convert 'dud' (type 'const {anonymous}::DebugUtilsDispatcher') to type 'vk::DebugUtilsMessengerEXT*' 207 | instance().createDebugUtilsMessengerEXT(debug_create_info, nullptr, dud), | ^~~ /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:21535:7: note: candidate: 'template::value, bool>::type > vk::ResultValueType::type vk::Instance::createDebugUtilsMessengerEXT(const vk::DebugUtilsMessengerCreateInfoEXT&, vk::Optional, const Dispatch&) const' 21535 | createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT & createInfo, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:21535:7: note: template argument deduction/substitution failed: /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:21533:152: error: no type named 'type' in 'struct std::enable_if' 21533 | template ::value, bool>::type = true> | ^~~~ ../src/vulkan_state.cpp:208:95: error: no matching function for call to 'ManagedResource::ManagedResource()' 208 | [this, dud] (auto& d) {instance().destroyDebugUtilsMessengerEXT(d, nullptr, dud);}}; | ^ In file included from ../src/vulkan_state.h:28, from ../src/vulkan_state.cpp:23: ../src/managed_resource.h:40:5: note: candidate: 'ManagedResource::ManagedResource(ManagedResource&&) [with T = vk::DebugUtilsMessengerEXT]' 40 | ManagedResource(ManagedResource&& rhs) | ^~~~~~~~~~~~~~~ ../src/managed_resource.h:40:5: note: candidate expects 1 argument, 2 provided ../src/managed_resource.h:34:5: note: candidate: 'ManagedResource::ManagedResource(T&&, Destructor&&) [with T = vk::DebugUtilsMessengerEXT; Destructor = std::function]' 34 | ManagedResource(T&& raw, Destructor&& destructor) | ^~~~~~~~~~~~~~~ ../src/managed_resource.h:34:5: note: conversion of argument 1 would be ill-formed: ../src/managed_resource.h:32:5: note: candidate: 'constexpr ManagedResource::ManagedResource() [with T = vk::DebugUtilsMessengerEXT]' 32 | ManagedResource() = default; | ^~~~~~~~~~~~~~~ ../src/managed_resource.h:32:5: note: candidate expects 0 arguments, 2 provided ninja: build stopped: subcommand failed. --- src/vulkan_state.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vulkan_state.cpp b/src/vulkan_state.cpp index a36b299..05c7e21 100644 --- a/src/vulkan_state.cpp +++ b/src/vulkan_state.cpp @@ -192,6 +192,7 @@ void VulkanState::create_instance(VulkanWSI& vulkan_wsi) if (have_debug_extensions) { +/* auto const debug_create_info = vk::DebugUtilsMessengerCreateInfoEXT{} .setMessageSeverity(vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose | vk::DebugUtilsMessageSeverityFlagBitsEXT::eInfo | @@ -206,6 +207,8 @@ void VulkanState::create_instance(VulkanWSI& vulkan_wsi) debug_messenger = ManagedResource{ instance().createDebugUtilsMessengerEXT(debug_create_info, nullptr, dud), [this, dud] (auto& d) {instance().destroyDebugUtilsMessengerEXT(d, nullptr, dud);}}; +*/ + Log::debug("VK_LAYER_KHRONOS_validation is deprecated or need to fix\n"); } else { From e21efd9b44dbaa9d256f335215ae106b69749d04 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Wed, 3 Dec 2025 00:36:00 +0200 Subject: [PATCH 2/2] Update kms_window_system.cpp ./src/ws/kms_window_system.cpp: In function 'std::vector {anonymous}::vk_get_supported_mods_for_format(VulkanState&, vk::Format)': ../src/ws/kms_window_system.cpp:489:53: error: no matching function for call to 'vk::PhysicalDevice::getFormatProperties2KHR(vk::Format&, vk::FormatProperties2*, const {anonymous}::GetFormatProperties2Dispatcher&) const' 489 | vulkan.physical_device().getFormatProperties2KHR(format, &props, dispatch); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan.hpp:9624, from ../src/ws/kms_window_system.h:29, from ../src/ws/kms_window_system.cpp:23: /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:19854:10: note: candidate: 'template::value, bool>::type > void vk::PhysicalDevice::getFormatProperties2KHR(vk::Format, vk::FormatProperties2*, const Dispatch&) const' 19854 | void getFormatProperties2KHR( Format format, | ^~~~~~~~~~~~~~~~~~~~~~~ /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:19854:10: note: template argument deduction/substitution failed: /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:19853:152: error: no type named 'type' in 'struct std::enable_if' 19853 | template ::value, bool>::type = true> | ^~~~ /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:19861:44: note: candidate: 'template::value, bool>::type > vk::FormatProperties2 vk::PhysicalDevice::getFormatProperties2KHR(vk::Format, const Dispatch&) const' 19861 | VULKAN_HPP_NODISCARD FormatProperties2 getFormatProperties2KHR( Format format, | ^~~~~~~~~~~~~~~~~~~~~~~ /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:19861:44: note: candidate expects 2 arguments, 3 provided /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:19871:26: note: candidate: 'template::value, bool>::type > vk::StructureChain vk::PhysicalDevice::getFormatProperties2KHR(vk::Format, const Dispatch&) const' 19871 | getFormatProperties2KHR( Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; | ^~~~~~~~~~~~~~~~~~~~~~~ /home/root-stas/distribution/build.ROCKNIX-H700.aarch64/toolchain/aarch64-rocknix-linux-gnu/sysroot/usr/include/vulkan/vulkan_handles.hpp:19871:26: note: candidate expects 2 arguments, 3 provided ninja: build stopped: subcommand failed. --- src/ws/kms_window_system.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ws/kms_window_system.cpp b/src/ws/kms_window_system.cpp index 4bf7838..37236ca 100644 --- a/src/ws/kms_window_system.cpp +++ b/src/ws/kms_window_system.cpp @@ -484,9 +484,9 @@ std::vector vk_get_supported_mods_for_format(VulkanState& vulkan, auto mod_props_list = vk::DrmFormatModifierPropertiesListEXT{}; mod_props_list.drmFormatModifierCount = 256; mod_props_list.pDrmFormatModifierProperties = mod_props; - auto props = vk::FormatProperties2KHR{}; + auto props = vk::FormatProperties2{}; props.pNext = &mod_props_list; - vulkan.physical_device().getFormatProperties2KHR(format, &props, dispatch); + vulkan.physical_device().getFormatProperties2KHR(format, &props); for (uint32_t i = 0; i < mod_props_list.drmFormatModifierCount; ++i) mods.push_back(mod_props_list.pDrmFormatModifierProperties[i].drmFormatModifier);