diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 63fc7d2..f89c133 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -1961,6 +1961,22 @@ bool VulkanHppGenerator::containsArray( std::string const & type ) const return found; } +bool VulkanHppGenerator::containsFuncPointer( std::string const & type ) const +{ + // a simple recursive check if a type contains a funcpointer + auto structureIt = m_structures.find( type ); + bool found = false; + if ( structureIt != m_structures.end() ) + { + for ( auto memberIt = structureIt->second.members.begin(); memberIt != structureIt->second.members.end() && !found; ++memberIt ) + { + found = ( m_funcPointers.find( memberIt->type.type ) != m_funcPointers.end() ) || + ( ( memberIt->type.type != type ) && containsFuncPointer( memberIt->type.type ) ); + } + } + return found; +} + bool VulkanHppGenerator::containsFloatingPoints( std::vector const & members ) const { for ( auto const & m : members ) @@ -9842,9 +9858,10 @@ std::string VulkanHppGenerator::generateStructCompareOperators( std::pair const & structData ) const diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index eb8495d..81fd32a 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -402,6 +402,7 @@ private: bool enumerating, std::vector const & dataTypes ) const; bool containsArray( std::string const & type ) const; + bool containsFuncPointer( std::string const & type ) const; bool containsFloatingPoints( std::vector const & members ) const; bool containsUnion( std::string const & type ) const; std::vector determineConstPointerParams( std::vector const & params ) const; diff --git a/vulkan/vulkan_structs.hpp b/vulkan/vulkan_structs.hpp index 161782a..e3572cb 100644 --- a/vulkan/vulkan_structs.hpp +++ b/vulkan/vulkan_structs.hpp @@ -4006,24 +4006,20 @@ namespace VULKAN_HPP_NAMESPACE } #endif -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( AllocationCallbacks const & ) const = default; -#else bool operator==( AllocationCallbacks const & rhs ) const VULKAN_HPP_NOEXCEPT { -# if defined( VULKAN_HPP_USE_REFLECT ) +#if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); -# else +#else return ( pUserData == rhs.pUserData ) && ( pfnAllocation == rhs.pfnAllocation ) && ( pfnReallocation == rhs.pfnReallocation ) && ( pfnFree == rhs.pfnFree ) && ( pfnInternalAllocation == rhs.pfnInternalAllocation ) && ( pfnInternalFree == rhs.pfnInternalFree ); -# endif +#endif } bool operator!=( AllocationCallbacks const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } -#endif public: void * pUserData = {}; @@ -17685,23 +17681,19 @@ namespace VULKAN_HPP_NAMESPACE } #endif -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugReportCallbackCreateInfoEXT const & ) const = default; -#else bool operator==( DebugReportCallbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { -# if defined( VULKAN_HPP_USE_REFLECT ) +#if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); -# else +#else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pfnCallback == rhs.pfnCallback ) && ( pUserData == rhs.pUserData ); -# endif +#endif } bool operator!=( DebugReportCallbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } -#endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugReportCallbackCreateInfoEXT; @@ -18364,24 +18356,20 @@ namespace VULKAN_HPP_NAMESPACE } #endif -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DebugUtilsMessengerCreateInfoEXT const & ) const = default; -#else bool operator==( DebugUtilsMessengerCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { -# if defined( VULKAN_HPP_USE_REFLECT ) +#if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); -# else +#else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( messageSeverity == rhs.messageSeverity ) && ( messageType == rhs.messageType ) && ( pfnUserCallback == rhs.pfnUserCallback ) && ( pUserData == rhs.pUserData ); -# endif +#endif } bool operator!=( DebugUtilsMessengerCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } -#endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsMessengerCreateInfoEXT; @@ -22930,24 +22918,20 @@ namespace VULKAN_HPP_NAMESPACE } #endif -#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) - auto operator<=>( DeviceDeviceMemoryReportCreateInfoEXT const & ) const = default; -#else bool operator==( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { -# if defined( VULKAN_HPP_USE_REFLECT ) +#if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); -# else +#else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pfnUserCallback == rhs.pfnUserCallback ) && ( pUserData == rhs.pUserData ); -# endif +#endif } bool operator!=( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } -#endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceDeviceMemoryReportCreateInfoEXT;