diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 7ee1d0f..179b65e 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -4719,25 +4719,62 @@ std::string VulkanHppGenerator::generateConstexprDefines() const )" }; auto const deprecatedAttribute = std::string{ R"(VULKAN_HPP_DEPRECATED("${reason}") )" }; - auto constexprDefines = std::string{ R"( - //========================================= - //=== CONSTEXPR CONSTANTs AND FUNCTIONs === - //========================================= -)" }; - // handle the value and callee macros first so they are visible for use in functions below. - // hardcoded constants. - for ( auto const & [macro, data] : m_constants ) - { - // make `macro` PascalCase, and strip the `Vk` prefix - auto const constName = stripPrefix( toCamelCase( macro ), "Vk" ); + auto constexprDefines = std::string{ R"( + //=========================== + //=== CONSTEXPR CONSTANTs === + //=========================== +)" }; - constexprDefines += - replaceWithMap( constexprValueTemplate, { { "type", data.type }, { "constName", constName }, { "deprecated", "" }, { "value", macro } } ); + { + auto const generateConstantsAndProtection = + [&constexprValueTemplate, this]( std::vector const & requireData, std::string const & title, std::set & listedConstants ) + { + auto constants = std::string{}; + for ( auto const & require : requireData ) + { + for ( auto const & constant : require.constants ) + { + if ( !listedConstants.contains( constant ) ) + { + auto constIt = m_constants.find( constant ); + if ( constIt == m_constants.end() ) + { + auto aliasIt = m_constantAliases.find( constant ); + assert( aliasIt != m_constantAliases.end() ); + constIt = m_constants.find( aliasIt->second.name ); + assert( constIt != m_constants.end() ); + } + constants += replaceWithMap( constexprValueTemplate, + { { "type", constIt->second.type }, + { "constName", stripPrefix( toCamelCase( constant ), "Vk" ) }, + { "deprecated", "" }, + { "value", constant } } ); + listedConstants.insert( constant ); + } + } + } + return addTitleAndProtection( title, constants ); + }; + + std::set listedConstants; + for ( auto const & feature : m_features ) + { + constexprDefines += generateConstantsAndProtection( feature.requireData, feature.name, listedConstants ); + } + for ( auto const & extension : m_extensions ) + { + constexprDefines += generateConstantsAndProtection( extension.requireData, extension.name, listedConstants ); + } } // values + constexprDefines += R"( + //======================== + //=== CONSTEXPR VALUEs === + //======================== +)"; for ( auto const & [macro, data] : m_definesPartition.values ) { auto const deprecated = data.deprecated ? replaceWithMap( deprecatedAttribute, { { "reason", data.deprecationReason } } ) : ""; @@ -4751,6 +4788,11 @@ std::string VulkanHppGenerator::generateConstexprDefines() const } // functions + constexprDefines += R"( + //========================= + //=== CONSTEXPR CALLEEs === + //========================= +)"; for ( auto const & [macro, data] : m_definesPartition.callees ) { auto const deprecated = data.deprecated ? replaceWithMap( deprecatedAttribute, { { "reason", data.deprecationReason } } ) : ""; @@ -4773,6 +4815,11 @@ std::string VulkanHppGenerator::generateConstexprDefines() const } // callers + constexprDefines += R"( + //========================= + //=== CONSTEXPR CALLERs === + //========================= +)"; for ( auto const & [macro, data] : m_definesPartition.callers ) { auto const deprecated = data.deprecated ? replaceWithMap( deprecatedAttribute, { { "reason", data.deprecationReason } } ) : ""; @@ -4800,9 +4847,9 @@ std::string VulkanHppGenerator::generateConstexprDefines() const std::string VulkanHppGenerator::generateConstexprUsings() const { auto constexprUsings = std::string{ R"( - //========================================= - //=== CONSTEXPR CONSTANTs AND FUNCTIONs === - //========================================= + //=========================== + //=== CONSTEXPR CONSTANTs === + //=========================== )" }; auto const constexprUsingTemplate = std::string{ R"( using VULKAN_HPP_NAMESPACE::${constName}; @@ -4812,14 +4859,50 @@ std::string VulkanHppGenerator::generateConstexprUsings() const auto const camelCasePrefixStrip = []( std::string const & macro ) { return startLowerCase( stripPrefix( toCamelCase( macro ), "Vk" ) ); }; // constants - for ( auto const & macro : m_constants ) { - // make `macro` PascalCase and strip the `Vk` prefix - auto const constName = pascalCasePrefixStrip( macro.first ); - constexprUsings += replaceWithMap( constexprUsingTemplate, { { "constName", constName } } ); + auto const generateConstantsAndProtection = + [&constexprUsingTemplate, this]( std::vector const & requireData, std::string const & title, std::set & listedConstants ) + { + auto constants = std::string{}; + for ( auto const & require : requireData ) + { + for ( auto const & constant : require.constants ) + { + if ( !listedConstants.contains( constant ) ) + { + auto constIt = m_constants.find( constant ); + if ( constIt == m_constants.end() ) + { + auto aliasIt = m_constantAliases.find( constant ); + assert( aliasIt != m_constantAliases.end() ); + constIt = m_constants.find( aliasIt->second.name ); + assert( constIt != m_constants.end() ); + } + constants += replaceWithMap( constexprUsingTemplate, { { "constName", stripPrefix( toCamelCase( constant ), "Vk" ) } } ); + listedConstants.insert( constant ); + } + } + } + return addTitleAndProtection( title, constants ); + }; + + std::set listedConstants; + for ( auto const & feature : m_features ) + { + constexprUsings += generateConstantsAndProtection( feature.requireData, feature.name, listedConstants ); + } + for ( auto const & extension : m_extensions ) + { + constexprUsings += generateConstantsAndProtection( extension.requireData, extension.name, listedConstants ); + } } // values + constexprUsings += R"( + //======================== + //=== CONSTEXPR VALUEs === + //======================== +)"; for ( auto const & macro : m_definesPartition.values ) { // make `macro` PascalCase and strip the `Vk` prefix @@ -4828,6 +4911,11 @@ std::string VulkanHppGenerator::generateConstexprUsings() const } // callees + constexprUsings += R"( + //========================= + //=== CONSTEXPR CALLEEs === + //========================= +)"; for ( auto const & macro : m_definesPartition.callees ) { // make `macro` camelCase and strip the `Vk` prefix @@ -4836,6 +4924,11 @@ std::string VulkanHppGenerator::generateConstexprUsings() const } // callers + constexprUsings += R"( + //========================== + //=== CONSTEXPR CALLERSs === + //========================== +)"; for ( auto const & macro : m_definesPartition.callers ) { // make `macro` PascalCase and strip the `Vk` prefix @@ -7460,7 +7553,7 @@ ${indexTypeTraits} indexTypeTraits += replaceWithMap( typeToEnumTemplate, { { "cppType", cppType }, { "valueName", valueName } } ); // from enum value to type - const std::string enumToTypeTemplate = R"( + const std::string enumToTypeTemplate = R"( template <> struct CppType { @@ -12604,7 +12697,7 @@ void VulkanHppGenerator::readExtensionRequire( tinyxml2::XMLElement const * elem } else if ( value == "enum" ) { - readRequireEnum( child, extensionData.name, extensionData.platform, extensionSupported && requireSupported ); + readRequireEnum( child, extensionData.name, extensionData.platform, extensionSupported && requireSupported, requireData ); } else if ( value == "type" ) { @@ -12895,7 +12988,7 @@ VulkanHppGenerator::RequireData } else if ( value == "enum" ) { - readRequireEnum( child, featureName, "", featureSupported ); + readRequireEnum( child, featureName, "", featureSupported, requireData ); } else if ( value == "type" ) { @@ -13308,7 +13401,8 @@ std::string VulkanHppGenerator::readRequireCommand( tinyxml2::XMLElement const * return name; } -void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element, std::string const & requiredBy, std::string const & platform, bool supported ) +void VulkanHppGenerator::readRequireEnum( + tinyxml2::XMLElement const * element, std::string const & requiredBy, std::string const & platform, bool supported, RequireData & requireData ) { int line = element->GetLineNum(); std::map attributes = getAttributes( element ); @@ -13408,10 +13502,6 @@ void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element, value = attribute.second; } } - if ( protect.empty() ) - { - protect = getProtectFromPlatform( platform ); - } if ( extends.empty() ) { @@ -13420,6 +13510,7 @@ void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element, auto typeIt = m_types.find( name ); checkForError( typeIt != m_types.end(), line, "unknown required enum <" + name + ">" ); typeIt->second.requiredBy.insert( requiredBy ); + requireData.constants.push_back( name ); } else { @@ -13443,7 +13534,8 @@ void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element, auto enumIt = m_enums.find( extends ); assert( enumIt != m_enums.end() ); - enumIt->second.addEnumValue( line, name, protect, bitpos + offset, value, ( api.empty() || ( api == m_api ) ) && supported ); + enumIt->second.addEnumValue( + line, name, protect.empty() ? getProtectFromPlatform( platform ) : protect, bitpos + offset, value, ( api.empty() || ( api == m_api ) ) && supported ); } } } diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 826fe53..ebd127e 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -202,10 +202,11 @@ private: struct RequireData { - std::vector depends = {}; - std::vector commands = {}; - std::vector types = {}; - int xmlLine = {}; + std::vector depends = {}; + std::vector commands = {}; + std::vector constants = {}; + std::vector types = {}; + int xmlLine = {}; }; struct ExtensionData @@ -940,48 +941,49 @@ private: void readPlatforms( tinyxml2::XMLElement const * element ); void readRegistry( tinyxml2::XMLElement const * element ); std::string readRequireCommand( tinyxml2::XMLElement const * element, std::string const & requiredBy ); - void readRequireEnum( tinyxml2::XMLElement const * element, std::string const & requiredBy, std::string const & platform, bool supported ); - std::string readRequireType( tinyxml2::XMLElement const * element, std::string const & requiredBy ); - void readSPIRVCapability( tinyxml2::XMLElement const * element ); - void readSPIRVCapabilityEnable( tinyxml2::XMLElement const * element ); - void readSPIRVCapabilities( tinyxml2::XMLElement const * element ); - void readSPIRVExtension( tinyxml2::XMLElement const * element ); - void readSPIRVExtensionEnable( tinyxml2::XMLElement const * element ); - void readSPIRVExtensions( tinyxml2::XMLElement const * element ); - void readStructMember( tinyxml2::XMLElement const * element, std::vector & members, bool isUnion ); - void readSync( tinyxml2::XMLElement const * element ); - void readSyncAccess( tinyxml2::XMLElement const * element, - std::map::const_iterator accessFlagBitsIt, - std::map::const_iterator accessFlagBits2It, - std::map::const_iterator stageFlagBits2It ); - void readSyncAccessEquivalent( tinyxml2::XMLElement const * element, std::map::const_iterator accessFlagBits2It ); - void readSyncAccessSupport( tinyxml2::XMLElement const * element, std::map::const_iterator stageFlagBits2It ); - void readSyncPipeline( tinyxml2::XMLElement const * element ); - void readSyncStage( tinyxml2::XMLElement const * element, - std::map::const_iterator stageFlagBitsIt, - std::map::const_iterator stageFlagBits2It ); - void readSyncStageEquivalent( tinyxml2::XMLElement const * element, std::map::const_iterator stageFlagBits2It ); - void readSyncStageSupport( tinyxml2::XMLElement const * element ); - void readTag( tinyxml2::XMLElement const * element ); - void readTags( tinyxml2::XMLElement const * element ); - void readTypeBasetype( tinyxml2::XMLElement const * element, std::map const & attributes ); - void readTypeBitmask( tinyxml2::XMLElement const * element, std::map const & attributes ); - DefinesPartition partitionDefines( std::map const & defines ); - void readTypeDefine( tinyxml2::XMLElement const * element, std::map const & attributes ); - void readTypeEnum( tinyxml2::XMLElement const * element, std::map const & attributes ); - void readTypeFuncpointer( tinyxml2::XMLElement const * element, std::map const & attributes ); - void readTypeHandle( tinyxml2::XMLElement const * element, std::map const & attributes ); - void readTypeInclude( tinyxml2::XMLElement const * element, std::map const & attributes ); - void readTypeRequires( tinyxml2::XMLElement const * element, std::map const & attributes ); - void readTypeStruct( tinyxml2::XMLElement const * element, bool isUnion, std::map const & attributes ); - void readTypes( tinyxml2::XMLElement const * element ); - void readTypesType( tinyxml2::XMLElement const * element ); - TypeInfo readTypeInfo( tinyxml2::XMLElement const * element ) const; - void registerDeleter( std::string const & commandName, CommandData const & commandData ); - void rescheduleRAIIHandle( std::string & str, - std::pair const & handle, - std::set & listedHandles, - std::set const & specialFunctions ) const; + void readRequireEnum( + tinyxml2::XMLElement const * element, std::string const & requiredBy, std::string const & platform, bool supported, RequireData & requireData ); + std::string readRequireType( tinyxml2::XMLElement const * element, std::string const & requiredBy ); + void readSPIRVCapability( tinyxml2::XMLElement const * element ); + void readSPIRVCapabilityEnable( tinyxml2::XMLElement const * element ); + void readSPIRVCapabilities( tinyxml2::XMLElement const * element ); + void readSPIRVExtension( tinyxml2::XMLElement const * element ); + void readSPIRVExtensionEnable( tinyxml2::XMLElement const * element ); + void readSPIRVExtensions( tinyxml2::XMLElement const * element ); + void readStructMember( tinyxml2::XMLElement const * element, std::vector & members, bool isUnion ); + void readSync( tinyxml2::XMLElement const * element ); + void readSyncAccess( tinyxml2::XMLElement const * element, + std::map::const_iterator accessFlagBitsIt, + std::map::const_iterator accessFlagBits2It, + std::map::const_iterator stageFlagBits2It ); + void readSyncAccessEquivalent( tinyxml2::XMLElement const * element, std::map::const_iterator accessFlagBits2It ); + void readSyncAccessSupport( tinyxml2::XMLElement const * element, std::map::const_iterator stageFlagBits2It ); + void readSyncPipeline( tinyxml2::XMLElement const * element ); + void readSyncStage( tinyxml2::XMLElement const * element, + std::map::const_iterator stageFlagBitsIt, + std::map::const_iterator stageFlagBits2It ); + void readSyncStageEquivalent( tinyxml2::XMLElement const * element, std::map::const_iterator stageFlagBits2It ); + void readSyncStageSupport( tinyxml2::XMLElement const * element ); + void readTag( tinyxml2::XMLElement const * element ); + void readTags( tinyxml2::XMLElement const * element ); + void readTypeBasetype( tinyxml2::XMLElement const * element, std::map const & attributes ); + void readTypeBitmask( tinyxml2::XMLElement const * element, std::map const & attributes ); + DefinesPartition partitionDefines( std::map const & defines ); + void readTypeDefine( tinyxml2::XMLElement const * element, std::map const & attributes ); + void readTypeEnum( tinyxml2::XMLElement const * element, std::map const & attributes ); + void readTypeFuncpointer( tinyxml2::XMLElement const * element, std::map const & attributes ); + void readTypeHandle( tinyxml2::XMLElement const * element, std::map const & attributes ); + void readTypeInclude( tinyxml2::XMLElement const * element, std::map const & attributes ); + void readTypeRequires( tinyxml2::XMLElement const * element, std::map const & attributes ); + void readTypeStruct( tinyxml2::XMLElement const * element, bool isUnion, std::map const & attributes ); + void readTypes( tinyxml2::XMLElement const * element ); + void readTypesType( tinyxml2::XMLElement const * element ); + TypeInfo readTypeInfo( tinyxml2::XMLElement const * element ) const; + void registerDeleter( std::string const & commandName, CommandData const & commandData ); + void rescheduleRAIIHandle( std::string & str, + std::pair const & handle, + std::set & listedHandles, + std::set const & specialFunctions ) const; std::vector selectCommandsByHandle( std::vector const & requireData, std::set const & handleCommands, std::set & listedCommands ) const; diff --git a/vulkan/vulkan.cppm b/vulkan/vulkan.cppm index e5bd813..be00ce9 100644 --- a/vulkan/vulkan.cppm +++ b/vulkan/vulkan.cppm @@ -888,50 +888,94 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::ResultValue; using VULKAN_HPP_NAMESPACE::ResultValueType; - //========================================= - //=== CONSTEXPR CONSTANTs AND FUNCTIONs === - //========================================= + //=========================== + //=== CONSTEXPR CONSTANTs === + //=========================== + + //=== VK_VERSION_1_0 === + using VULKAN_HPP_NAMESPACE::AttachmentUnused; + using VULKAN_HPP_NAMESPACE::False; + using VULKAN_HPP_NAMESPACE::LodClampNone; + using VULKAN_HPP_NAMESPACE::MaxDescriptionSize; + using VULKAN_HPP_NAMESPACE::MaxExtensionNameSize; + using VULKAN_HPP_NAMESPACE::MaxMemoryHeaps; + using VULKAN_HPP_NAMESPACE::MaxMemoryTypes; + using VULKAN_HPP_NAMESPACE::MaxPhysicalDeviceNameSize; + using VULKAN_HPP_NAMESPACE::QueueFamilyIgnored; + using VULKAN_HPP_NAMESPACE::RemainingArrayLayers; + using VULKAN_HPP_NAMESPACE::RemainingMipLevels; + using VULKAN_HPP_NAMESPACE::SubpassExternal; + using VULKAN_HPP_NAMESPACE::True; + using VULKAN_HPP_NAMESPACE::UuidSize; + using VULKAN_HPP_NAMESPACE::WholeSize; + + //=== VK_VERSION_1_1 === + using VULKAN_HPP_NAMESPACE::LuidSize; + using VULKAN_HPP_NAMESPACE::MaxDeviceGroupSize; + using VULKAN_HPP_NAMESPACE::QueueFamilyExternal; + + //=== VK_VERSION_1_2 === + using VULKAN_HPP_NAMESPACE::MaxDriverInfoSize; + using VULKAN_HPP_NAMESPACE::MaxDriverNameSize; + + //=== VK_KHR_device_group_creation === + using VULKAN_HPP_NAMESPACE::MaxDeviceGroupSizeKhr; + + //=== VK_KHR_external_memory_capabilities === + using VULKAN_HPP_NAMESPACE::LuidSizeKhr; + + //=== VK_KHR_external_memory === + using VULKAN_HPP_NAMESPACE::QueueFamilyExternalKhr; + + //=== VK_KHR_ray_tracing_pipeline === + using VULKAN_HPP_NAMESPACE::ShaderUnusedKhr; + + //=== VK_NV_ray_tracing === + using VULKAN_HPP_NAMESPACE::ShaderUnusedNv; + + //=== VK_KHR_global_priority === + using VULKAN_HPP_NAMESPACE::MaxGlobalPrioritySizeKhr; + + //=== VK_KHR_driver_properties === + using VULKAN_HPP_NAMESPACE::MaxDriverInfoSizeKhr; + using VULKAN_HPP_NAMESPACE::MaxDriverNameSizeKhr; + + //=== VK_EXT_global_priority_query === + using VULKAN_HPP_NAMESPACE::MaxGlobalPrioritySizeExt; + + //=== VK_EXT_image_sliced_view_of_3d === + using VULKAN_HPP_NAMESPACE::Remaining3DSlicesExt; + + //=== VK_EXT_shader_module_identifier === + using VULKAN_HPP_NAMESPACE::MaxShaderModuleIdentifierSizeExt; + + //======================== + //=== CONSTEXPR VALUEs === + //======================== + using VULKAN_HPP_NAMESPACE::HeaderVersion; + + //========================= + //=== CONSTEXPR CALLEEs === + //========================= + using VULKAN_HPP_NAMESPACE::apiVersionMajor; + using VULKAN_HPP_NAMESPACE::apiVersionMinor; + using VULKAN_HPP_NAMESPACE::apiVersionPatch; + using VULKAN_HPP_NAMESPACE::apiVersionVariant; + using VULKAN_HPP_NAMESPACE::makeApiVersion; + using VULKAN_HPP_NAMESPACE::makeVersion; + using VULKAN_HPP_NAMESPACE::versionMajor; + using VULKAN_HPP_NAMESPACE::versionMinor; + using VULKAN_HPP_NAMESPACE::versionPatch; + + //========================== + //=== CONSTEXPR CALLERSs === + //========================== using VULKAN_HPP_NAMESPACE::ApiVersion; using VULKAN_HPP_NAMESPACE::ApiVersion10; using VULKAN_HPP_NAMESPACE::ApiVersion11; using VULKAN_HPP_NAMESPACE::ApiVersion12; using VULKAN_HPP_NAMESPACE::ApiVersion13; - using VULKAN_HPP_NAMESPACE::apiVersionMajor; - using VULKAN_HPP_NAMESPACE::apiVersionMinor; - using VULKAN_HPP_NAMESPACE::apiVersionPatch; - using VULKAN_HPP_NAMESPACE::apiVersionVariant; - using VULKAN_HPP_NAMESPACE::AttachmentUnused; - using VULKAN_HPP_NAMESPACE::False; - using VULKAN_HPP_NAMESPACE::HeaderVersion; using VULKAN_HPP_NAMESPACE::HeaderVersionComplete; - using VULKAN_HPP_NAMESPACE::LodClampNone; - using VULKAN_HPP_NAMESPACE::LuidSize; - using VULKAN_HPP_NAMESPACE::makeApiVersion; - using VULKAN_HPP_NAMESPACE::makeVersion; - using VULKAN_HPP_NAMESPACE::MaxDescriptionSize; - using VULKAN_HPP_NAMESPACE::MaxDeviceGroupSize; - using VULKAN_HPP_NAMESPACE::MaxDriverInfoSize; - using VULKAN_HPP_NAMESPACE::MaxDriverNameSize; - using VULKAN_HPP_NAMESPACE::MaxExtensionNameSize; - using VULKAN_HPP_NAMESPACE::MaxGlobalPrioritySizeKhr; - using VULKAN_HPP_NAMESPACE::MaxMemoryHeaps; - using VULKAN_HPP_NAMESPACE::MaxMemoryTypes; - using VULKAN_HPP_NAMESPACE::MaxPhysicalDeviceNameSize; - using VULKAN_HPP_NAMESPACE::MaxShaderModuleIdentifierSizeExt; - using VULKAN_HPP_NAMESPACE::QueueFamilyExternal; - using VULKAN_HPP_NAMESPACE::QueueFamilyForeignExt; - using VULKAN_HPP_NAMESPACE::QueueFamilyIgnored; - using VULKAN_HPP_NAMESPACE::Remaining3DSlicesExt; - using VULKAN_HPP_NAMESPACE::RemainingArrayLayers; - using VULKAN_HPP_NAMESPACE::RemainingMipLevels; - using VULKAN_HPP_NAMESPACE::ShaderUnusedKhr; - using VULKAN_HPP_NAMESPACE::SubpassExternal; - using VULKAN_HPP_NAMESPACE::True; - using VULKAN_HPP_NAMESPACE::UuidSize; - using VULKAN_HPP_NAMESPACE::versionMajor; - using VULKAN_HPP_NAMESPACE::versionMinor; - using VULKAN_HPP_NAMESPACE::versionPatch; - using VULKAN_HPP_NAMESPACE::WholeSize; //=============== //=== STRUCTs === diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 34b52a7..d9f2295 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -6976,36 +6976,75 @@ namespace VULKAN_HPP_NAMESPACE #endif } - //========================================= - //=== CONSTEXPR CONSTANTs AND FUNCTIONs === - //========================================= - VULKAN_HPP_CONSTEXPR_INLINE uint32_t AttachmentUnused = VK_ATTACHMENT_UNUSED; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t False = VK_FALSE; - VULKAN_HPP_CONSTEXPR_INLINE float LodClampNone = VK_LOD_CLAMP_NONE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t LuidSize = VK_LUID_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDescriptionSize = VK_MAX_DESCRIPTION_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDeviceGroupSize = VK_MAX_DEVICE_GROUP_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverInfoSize = VK_MAX_DRIVER_INFO_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverNameSize = VK_MAX_DRIVER_NAME_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxExtensionNameSize = VK_MAX_EXTENSION_NAME_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxGlobalPrioritySizeKhr = VK_MAX_GLOBAL_PRIORITY_SIZE_KHR; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryHeaps = VK_MAX_MEMORY_HEAPS; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryTypes = VK_MAX_MEMORY_TYPES; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxPhysicalDeviceNameSize = VK_MAX_PHYSICAL_DEVICE_NAME_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxShaderModuleIdentifierSizeExt = VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyExternal = VK_QUEUE_FAMILY_EXTERNAL; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyForeignExt = VK_QUEUE_FAMILY_FOREIGN_EXT; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyIgnored = VK_QUEUE_FAMILY_IGNORED; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t Remaining3DSlicesExt = VK_REMAINING_3D_SLICES_EXT; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingArrayLayers = VK_REMAINING_ARRAY_LAYERS; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingMipLevels = VK_REMAINING_MIP_LEVELS; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t ShaderUnusedKhr = VK_SHADER_UNUSED_KHR; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t SubpassExternal = VK_SUBPASS_EXTERNAL; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t True = VK_TRUE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t UuidSize = VK_UUID_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint64_t WholeSize = VK_WHOLE_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t HeaderVersion = VK_HEADER_VERSION; + //=========================== + //=== CONSTEXPR CONSTANTs === + //=========================== + //=== VK_VERSION_1_0 === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t AttachmentUnused = VK_ATTACHMENT_UNUSED; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t False = VK_FALSE; + VULKAN_HPP_CONSTEXPR_INLINE float LodClampNone = VK_LOD_CLAMP_NONE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyIgnored = VK_QUEUE_FAMILY_IGNORED; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingArrayLayers = VK_REMAINING_ARRAY_LAYERS; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingMipLevels = VK_REMAINING_MIP_LEVELS; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t SubpassExternal = VK_SUBPASS_EXTERNAL; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t True = VK_TRUE; + VULKAN_HPP_CONSTEXPR_INLINE uint64_t WholeSize = VK_WHOLE_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryTypes = VK_MAX_MEMORY_TYPES; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxPhysicalDeviceNameSize = VK_MAX_PHYSICAL_DEVICE_NAME_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t UuidSize = VK_UUID_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxExtensionNameSize = VK_MAX_EXTENSION_NAME_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDescriptionSize = VK_MAX_DESCRIPTION_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryHeaps = VK_MAX_MEMORY_HEAPS; + + //=== VK_VERSION_1_1 === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDeviceGroupSize = VK_MAX_DEVICE_GROUP_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t LuidSize = VK_LUID_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyExternal = VK_QUEUE_FAMILY_EXTERNAL; + + //=== VK_VERSION_1_2 === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverNameSize = VK_MAX_DRIVER_NAME_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverInfoSize = VK_MAX_DRIVER_INFO_SIZE; + + //=== VK_KHR_device_group_creation === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDeviceGroupSizeKhr = VK_MAX_DEVICE_GROUP_SIZE_KHR; + + //=== VK_KHR_external_memory_capabilities === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t LuidSizeKhr = VK_LUID_SIZE_KHR; + + //=== VK_KHR_external_memory === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyExternalKhr = VK_QUEUE_FAMILY_EXTERNAL_KHR; + + //=== VK_KHR_ray_tracing_pipeline === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t ShaderUnusedKhr = VK_SHADER_UNUSED_KHR; + + //=== VK_NV_ray_tracing === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t ShaderUnusedNv = VK_SHADER_UNUSED_NV; + + //=== VK_KHR_global_priority === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxGlobalPrioritySizeKhr = VK_MAX_GLOBAL_PRIORITY_SIZE_KHR; + + //=== VK_KHR_driver_properties === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverNameSizeKhr = VK_MAX_DRIVER_NAME_SIZE_KHR; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverInfoSizeKhr = VK_MAX_DRIVER_INFO_SIZE_KHR; + + //=== VK_EXT_global_priority_query === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxGlobalPrioritySizeExt = VK_MAX_GLOBAL_PRIORITY_SIZE_EXT; + + //=== VK_EXT_image_sliced_view_of_3d === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t Remaining3DSlicesExt = VK_REMAINING_3D_SLICES_EXT; + + //=== VK_EXT_shader_module_identifier === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxShaderModuleIdentifierSizeExt = VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT; + + //======================== + //=== CONSTEXPR VALUEs === + //======================== + VULKAN_HPP_CONSTEXPR_INLINE uint32_t HeaderVersion = VK_HEADER_VERSION; + + //========================= + //=== CONSTEXPR CALLEEs === + //========================= template ::value>::type> VULKAN_HPP_CONSTEXPR uint32_t apiVersionMajor( T const version ) { @@ -7064,6 +7103,9 @@ namespace VULKAN_HPP_NAMESPACE return ( (uint32_t)(version)&0xFFFU ); } + //========================= + //=== CONSTEXPR CALLERs === + //========================= VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion = makeApiVersion( 0, 1, 0, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion10 = makeApiVersion( 0, 1, 0, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion11 = makeApiVersion( 0, 1, 1, 0 ); @@ -13933,7 +13975,7 @@ namespace VULKAN_HPP_NAMESPACE # elif defined( __APPLE__ ) m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); # elif defined( _WIN32 ) - m_library = ::LoadLibraryA( "vulkan-1.dll" ); + m_library = ::LoadLibraryA( "vulkan-1.dll" ); # else # error unsupported platform # endif diff --git a/vulkan/vulkansc.cppm b/vulkan/vulkansc.cppm index 27fd58c..3dccf13 100644 --- a/vulkan/vulkansc.cppm +++ b/vulkan/vulkansc.cppm @@ -462,50 +462,63 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::ResultValue; using VULKAN_HPP_NAMESPACE::ResultValueType; - //========================================= - //=== CONSTEXPR CONSTANTs AND FUNCTIONs === - //========================================= + //=========================== + //=== CONSTEXPR CONSTANTs === + //=========================== + + //=== VK_VERSION_1_0 === + using VULKAN_HPP_NAMESPACE::AttachmentUnused; + using VULKAN_HPP_NAMESPACE::False; + using VULKAN_HPP_NAMESPACE::LodClampNone; + using VULKAN_HPP_NAMESPACE::MaxDescriptionSize; + using VULKAN_HPP_NAMESPACE::MaxExtensionNameSize; + using VULKAN_HPP_NAMESPACE::MaxMemoryHeaps; + using VULKAN_HPP_NAMESPACE::MaxMemoryTypes; + using VULKAN_HPP_NAMESPACE::MaxPhysicalDeviceNameSize; + using VULKAN_HPP_NAMESPACE::QueueFamilyIgnored; + using VULKAN_HPP_NAMESPACE::RemainingArrayLayers; + using VULKAN_HPP_NAMESPACE::RemainingMipLevels; + using VULKAN_HPP_NAMESPACE::SubpassExternal; + using VULKAN_HPP_NAMESPACE::True; + using VULKAN_HPP_NAMESPACE::UuidSize; + using VULKAN_HPP_NAMESPACE::WholeSize; + + //=== VK_VERSION_1_1 === + using VULKAN_HPP_NAMESPACE::LuidSize; + using VULKAN_HPP_NAMESPACE::MaxDeviceGroupSize; + using VULKAN_HPP_NAMESPACE::QueueFamilyExternal; + + //=== VK_VERSION_1_2 === + using VULKAN_HPP_NAMESPACE::MaxDriverInfoSize; + using VULKAN_HPP_NAMESPACE::MaxDriverNameSize; + + //======================== + //=== CONSTEXPR VALUEs === + //======================== + using VULKAN_HPP_NAMESPACE::HeaderVersion; + + //========================= + //=== CONSTEXPR CALLEEs === + //========================= + using VULKAN_HPP_NAMESPACE::apiVersionMajor; + using VULKAN_HPP_NAMESPACE::apiVersionMinor; + using VULKAN_HPP_NAMESPACE::apiVersionPatch; + using VULKAN_HPP_NAMESPACE::apiVersionVariant; + using VULKAN_HPP_NAMESPACE::makeApiVersion; + using VULKAN_HPP_NAMESPACE::makeVersion; + using VULKAN_HPP_NAMESPACE::versionMajor; + using VULKAN_HPP_NAMESPACE::versionMinor; + using VULKAN_HPP_NAMESPACE::versionPatch; + + //========================== + //=== CONSTEXPR CALLERSs === + //========================== using VULKAN_HPP_NAMESPACE::ApiVersion; using VULKAN_HPP_NAMESPACE::ApiVersion10; using VULKAN_HPP_NAMESPACE::ApiVersion11; using VULKAN_HPP_NAMESPACE::ApiVersion12; using VULKAN_HPP_NAMESPACE::ApiVersion13; - using VULKAN_HPP_NAMESPACE::apiVersionMajor; - using VULKAN_HPP_NAMESPACE::apiVersionMinor; - using VULKAN_HPP_NAMESPACE::apiVersionPatch; - using VULKAN_HPP_NAMESPACE::apiVersionVariant; - using VULKAN_HPP_NAMESPACE::AttachmentUnused; - using VULKAN_HPP_NAMESPACE::False; - using VULKAN_HPP_NAMESPACE::HeaderVersion; using VULKAN_HPP_NAMESPACE::HeaderVersionComplete; - using VULKAN_HPP_NAMESPACE::LodClampNone; - using VULKAN_HPP_NAMESPACE::LuidSize; - using VULKAN_HPP_NAMESPACE::makeApiVersion; - using VULKAN_HPP_NAMESPACE::makeVersion; - using VULKAN_HPP_NAMESPACE::MaxDescriptionSize; - using VULKAN_HPP_NAMESPACE::MaxDeviceGroupSize; - using VULKAN_HPP_NAMESPACE::MaxDriverInfoSize; - using VULKAN_HPP_NAMESPACE::MaxDriverNameSize; - using VULKAN_HPP_NAMESPACE::MaxExtensionNameSize; - using VULKAN_HPP_NAMESPACE::MaxGlobalPrioritySizeKhr; - using VULKAN_HPP_NAMESPACE::MaxMemoryHeaps; - using VULKAN_HPP_NAMESPACE::MaxMemoryTypes; - using VULKAN_HPP_NAMESPACE::MaxPhysicalDeviceNameSize; - using VULKAN_HPP_NAMESPACE::MaxShaderModuleIdentifierSizeExt; - using VULKAN_HPP_NAMESPACE::QueueFamilyExternal; - using VULKAN_HPP_NAMESPACE::QueueFamilyForeignExt; - using VULKAN_HPP_NAMESPACE::QueueFamilyIgnored; - using VULKAN_HPP_NAMESPACE::Remaining3DSlicesExt; - using VULKAN_HPP_NAMESPACE::RemainingArrayLayers; - using VULKAN_HPP_NAMESPACE::RemainingMipLevels; - using VULKAN_HPP_NAMESPACE::ShaderUnusedKhr; - using VULKAN_HPP_NAMESPACE::SubpassExternal; - using VULKAN_HPP_NAMESPACE::True; - using VULKAN_HPP_NAMESPACE::UuidSize; - using VULKAN_HPP_NAMESPACE::versionMajor; - using VULKAN_HPP_NAMESPACE::versionMinor; - using VULKAN_HPP_NAMESPACE::versionPatch; - using VULKAN_HPP_NAMESPACE::WholeSize; //=============== //=== STRUCTs === diff --git a/vulkan/vulkansc.hpp b/vulkan/vulkansc.hpp index 3337f98..4ef149a 100644 --- a/vulkan/vulkansc.hpp +++ b/vulkan/vulkansc.hpp @@ -4325,36 +4325,44 @@ namespace VULKAN_HPP_NAMESPACE #endif } - //========================================= - //=== CONSTEXPR CONSTANTs AND FUNCTIONs === - //========================================= - VULKAN_HPP_CONSTEXPR_INLINE uint32_t AttachmentUnused = VK_ATTACHMENT_UNUSED; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t False = VK_FALSE; - VULKAN_HPP_CONSTEXPR_INLINE float LodClampNone = VK_LOD_CLAMP_NONE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t LuidSize = VK_LUID_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDescriptionSize = VK_MAX_DESCRIPTION_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDeviceGroupSize = VK_MAX_DEVICE_GROUP_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverInfoSize = VK_MAX_DRIVER_INFO_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverNameSize = VK_MAX_DRIVER_NAME_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxExtensionNameSize = VK_MAX_EXTENSION_NAME_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxGlobalPrioritySizeKhr = VK_MAX_GLOBAL_PRIORITY_SIZE_KHR; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryHeaps = VK_MAX_MEMORY_HEAPS; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryTypes = VK_MAX_MEMORY_TYPES; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxPhysicalDeviceNameSize = VK_MAX_PHYSICAL_DEVICE_NAME_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxShaderModuleIdentifierSizeExt = VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyExternal = VK_QUEUE_FAMILY_EXTERNAL; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyForeignExt = VK_QUEUE_FAMILY_FOREIGN_EXT; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyIgnored = VK_QUEUE_FAMILY_IGNORED; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t Remaining3DSlicesExt = VK_REMAINING_3D_SLICES_EXT; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingArrayLayers = VK_REMAINING_ARRAY_LAYERS; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingMipLevels = VK_REMAINING_MIP_LEVELS; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t ShaderUnusedKhr = VK_SHADER_UNUSED_KHR; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t SubpassExternal = VK_SUBPASS_EXTERNAL; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t True = VK_TRUE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t UuidSize = VK_UUID_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint64_t WholeSize = VK_WHOLE_SIZE; - VULKAN_HPP_CONSTEXPR_INLINE uint32_t HeaderVersion = VK_HEADER_VERSION; + //=========================== + //=== CONSTEXPR CONSTANTs === + //=========================== + //=== VK_VERSION_1_0 === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t AttachmentUnused = VK_ATTACHMENT_UNUSED; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t False = VK_FALSE; + VULKAN_HPP_CONSTEXPR_INLINE float LodClampNone = VK_LOD_CLAMP_NONE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyIgnored = VK_QUEUE_FAMILY_IGNORED; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingArrayLayers = VK_REMAINING_ARRAY_LAYERS; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingMipLevels = VK_REMAINING_MIP_LEVELS; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t SubpassExternal = VK_SUBPASS_EXTERNAL; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t True = VK_TRUE; + VULKAN_HPP_CONSTEXPR_INLINE uint64_t WholeSize = VK_WHOLE_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryTypes = VK_MAX_MEMORY_TYPES; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxPhysicalDeviceNameSize = VK_MAX_PHYSICAL_DEVICE_NAME_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t UuidSize = VK_UUID_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxExtensionNameSize = VK_MAX_EXTENSION_NAME_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDescriptionSize = VK_MAX_DESCRIPTION_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryHeaps = VK_MAX_MEMORY_HEAPS; + + //=== VK_VERSION_1_1 === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDeviceGroupSize = VK_MAX_DEVICE_GROUP_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t LuidSize = VK_LUID_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyExternal = VK_QUEUE_FAMILY_EXTERNAL; + + //=== VK_VERSION_1_2 === + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverNameSize = VK_MAX_DRIVER_NAME_SIZE; + VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverInfoSize = VK_MAX_DRIVER_INFO_SIZE; + + //======================== + //=== CONSTEXPR VALUEs === + //======================== + VULKAN_HPP_CONSTEXPR_INLINE uint32_t HeaderVersion = VK_HEADER_VERSION; + + //========================= + //=== CONSTEXPR CALLEEs === + //========================= template ::value>::type> VULKAN_HPP_CONSTEXPR uint32_t apiVersionMajor( T const version ) { @@ -4413,6 +4421,9 @@ namespace VULKAN_HPP_NAMESPACE return ( (uint32_t)(version)&0xFFFU ); } + //========================= + //=== CONSTEXPR CALLERs === + //========================= VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion = makeApiVersion( 0, 1, 0, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion10 = makeApiVersion( 0, 1, 0, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion11 = makeApiVersion( 0, 1, 1, 0 ); @@ -7028,7 +7039,7 @@ namespace VULKAN_HPP_NAMESPACE # elif defined( __APPLE__ ) m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); # elif defined( _WIN32 ) - m_library = ::LoadLibraryA( "vulkan-1.dll" ); + m_library = ::LoadLibraryA( "vulkan-1.dll" ); # else # error unsupported platform # endif