From c8cf030fe9a00493ff854910000c23ab645cc490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Tue, 10 Oct 2023 21:54:36 +0200 Subject: [PATCH] Add FlagBits type as required if it is not listed where the corresponding Flags type is required (#1689) --- VulkanHppGenerator.cpp | 64 ++++++++------ vulkan/vulkan.cppm | 24 +++-- vulkan/vulkan_enums.hpp | 160 +++++++++++++++++----------------- vulkan/vulkan_to_string.hpp | 96 ++++++++++---------- vulkan/vulkansc.cppm | 14 +-- vulkan/vulkansc_enums.hpp | 75 +++++++++------- vulkan/vulkansc_to_string.hpp | 45 +++++----- 7 files changed, 246 insertions(+), 232 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 094f05d..2b9b180 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -905,35 +905,43 @@ void VulkanHppGenerator::addMissingFlagBits( std::vector & requireD for ( auto const & type : require.types ) { auto bitmaskIt = m_bitmasks.find( type ); - if ( ( bitmaskIt != m_bitmasks.end() ) && bitmaskIt->second.require.empty() ) + if ( bitmaskIt != m_bitmasks.end() ) { - // generate the flagBits enum name out of the bitmask name: VkFooFlagsXXX -> VkFooFlagBitsXXX - size_t pos = bitmaskIt->first.find( "Flags" ); - assert( pos != std::string::npos ); - std::string flagBits = bitmaskIt->first.substr( 0, pos + 4 ) + "Bit" + bitmaskIt->first.substr( pos + 4 ); - - // as the bitmask's requirement is still empty, this flagBits should not be listed in the require list! - assert( std::none_of( require.types.begin(), require.types.end(), [&flagBits]( std::string const & type ) { return ( type == flagBits ); } ) ); - - bitmaskIt->second.require = flagBits; - - // some flagsBits are specified but never listed as required for any flags! - // so, even if this bitmask has no enum listed as required, it might still already exist in the enums list - auto enumIt = m_enums.find( flagBits ); - if ( enumIt == m_enums.end() ) + if ( bitmaskIt->second.require.empty() ) { - m_enums.insert( std::make_pair( flagBits, EnumData{ .isBitmask = true, .xmlLine = 0 } ) ); + // generate the flagBits enum name out of the bitmask name: VkFooFlagsXXX -> VkFooFlagBitsXXX + size_t pos = bitmaskIt->first.find( "Flags" ); + assert( pos != std::string::npos ); + std::string flagBits = bitmaskIt->first.substr( 0, pos + 4 ) + "Bit" + bitmaskIt->first.substr( pos + 4 ); - assert( !m_types.contains( flagBits ) ); - m_types.insert( std::make_pair( flagBits, TypeData{ TypeCategory::Bitmask, { requiredBy }, 0 } ) ); + // as the bitmask's requirement is still empty, this flagBits should not be listed in the require list! + assert( std::none_of( require.types.begin(), require.types.end(), [&flagBits]( std::string const & type ) { return ( type == flagBits ); } ) ); + + bitmaskIt->second.require = flagBits; + + // some flagsBits are specified but never listed as required for any flags! + // so, even if this bitmask has no enum listed as required, it might still already exist in the enums list + auto enumIt = m_enums.find( flagBits ); + if ( enumIt == m_enums.end() ) + { + m_enums.insert( std::make_pair( flagBits, EnumData{ .isBitmask = true, .xmlLine = 0 } ) ); + + assert( !m_types.contains( flagBits ) ); + m_types.insert( std::make_pair( flagBits, TypeData{ TypeCategory::Bitmask, { requiredBy }, 0 } ) ); + } + else + { + assert( m_types.contains( flagBits ) ); + enumIt->second.isBitmask = true; + } + + newTypes.push_back( flagBits ); } - else + else if ( std::find( require.types.begin(), require.types.end(), bitmaskIt->second.require ) == require.types.end() ) { - assert( m_types.contains( flagBits ) ); - enumIt->second.isBitmask = true; + // this bitmask requires a flags type that is not listed in here, so add it + newTypes.push_back( bitmaskIt->second.require ); } - - newTypes.push_back( flagBits ); } } // add all the newly created flagBits types to the require list as if they had been part of the vk.xml! @@ -5425,11 +5433,9 @@ std::string VulkanHppGenerator::generateCppModuleUsings() const )" }; auto const hardCodedTypes = std::array{ "ArrayWrapper1D", "ArrayWrapper2D", "FlagTraits", "Flags", "DispatchLoaderBase", "DispatchLoaderDynamic" }; - auto const hardCodedEnhancedModeTypes = - std::array{ "ArrayProxy", "ArrayProxyNoTemporaries", "StridedArrayProxy", "Optional", "StructureChain" }; - auto const hardCodedSmartHandleTypes = std::array{ "ObjectDestroy", "ObjectFree", "ObjectRelease", "PoolFree", - "ObjectDestroyShared", "ObjectFreeShared", "ObjectReleaseShared", "PoolFreeShared", - "SharedHandle", "UniqueHandle"}; + auto const hardCodedEnhancedModeTypes = std::array{ "ArrayProxy", "ArrayProxyNoTemporaries", "StridedArrayProxy", "Optional", "StructureChain" }; + auto const hardCodedSmartHandleTypes = std::array{ "ObjectDestroy", "ObjectFree", "ObjectRelease", "PoolFree", "ObjectDestroyShared", + "ObjectFreeShared", "ObjectReleaseShared", "PoolFreeShared", "SharedHandle", "UniqueHandle" }; auto usings = std::string{ R"( //===================================== //=== HARDCODED TYPEs AND FUNCTIONs === @@ -13903,7 +13909,7 @@ void VulkanHppGenerator::readRequireEnum( { bitpos = attribute.second; } - if ( attribute.first == "extends" ) + else if ( attribute.first == "extends" ) { extends = attribute.second; } diff --git a/vulkan/vulkan.cppm b/vulkan/vulkan.cppm index 0bab137..9a2cad5 100644 --- a/vulkan/vulkan.cppm +++ b/vulkan/vulkan.cppm @@ -118,6 +118,8 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::DescriptorType; using VULKAN_HPP_NAMESPACE::DeviceCreateFlagBits; using VULKAN_HPP_NAMESPACE::DeviceCreateFlags; + using VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlagBits; + using VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags; using VULKAN_HPP_NAMESPACE::DynamicState; using VULKAN_HPP_NAMESPACE::EventCreateFlagBits; using VULKAN_HPP_NAMESPACE::EventCreateFlags; @@ -156,13 +158,21 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::ObjectType; using VULKAN_HPP_NAMESPACE::PhysicalDeviceType; using VULKAN_HPP_NAMESPACE::PipelineBindPoint; + using VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlagBits; + using VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion; + using VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlagBits; + using VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineCreateFlagBits; using VULKAN_HPP_NAMESPACE::PipelineCreateFlags; + using VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlagBits; + using VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlagBits; using VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlagBits; using VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags; + using VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlagBits; + using VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlagBits; using VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlagBits; @@ -230,8 +240,6 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags; using VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType; using VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateTypeKHR; - using VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlagBits; - using VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags; using VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlagBits; using VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlagBitsKHR; using VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlags; @@ -677,10 +685,6 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagBitsEXT; using VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT; - //=== VK_EXT_pipeline_creation_cache_control === - using VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlagBits; - using VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags; - #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_KHR_video_encode_queue === using VULKAN_HPP_NAMESPACE::VideoEncodeCapabilityFlagBitsKHR; @@ -713,8 +717,6 @@ export namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_graphics_pipeline_library === using VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryFlagBitsEXT; using VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryFlagsEXT; - using VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlagBits; - using VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags; //=== VK_NV_fragment_shading_rate_enums === using VULKAN_HPP_NAMESPACE::FragmentShadingRateNV; @@ -794,12 +796,6 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::DirectDriverLoadingFlagsLUNARG; using VULKAN_HPP_NAMESPACE::DirectDriverLoadingModeLUNARG; - //=== VK_EXT_rasterization_order_attachment_access === - using VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlagBits; - using VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags; - using VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlagBits; - using VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags; - //=== VK_NV_optical_flow === using VULKAN_HPP_NAMESPACE::OpticalFlowExecuteFlagBitsNV; using VULKAN_HPP_NAMESPACE::OpticalFlowExecuteFlagsNV; diff --git a/vulkan/vulkan_enums.hpp b/vulkan/vulkan_enums.hpp index 04523a5..a918337 100644 --- a/vulkan/vulkan_enums.hpp +++ b/vulkan/vulkan_enums.hpp @@ -2080,6 +2080,20 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceCreateFlags allFlags = {}; }; + enum class DeviceQueueCreateFlagBits : VkDeviceQueueCreateFlags + { + eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT + }; + + using DeviceQueueCreateFlags = Flags; + + template <> + struct FlagTraits + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; + static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceQueueCreateFlags allFlags = DeviceQueueCreateFlagBits::eProtected; + }; + enum class PipelineStageFlagBits : VkPipelineStageFlags { eTopOfPipe = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, @@ -2543,6 +2557,21 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR ShaderModuleCreateFlags allFlags = {}; }; + enum class PipelineCacheCreateFlagBits : VkPipelineCacheCreateFlags + { + eExternallySynchronized = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, + eExternallySynchronizedEXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT + }; + + using PipelineCacheCreateFlags = Flags; + + template <> + struct FlagTraits + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; + static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCacheCreateFlags allFlags = PipelineCacheCreateFlagBits::eExternallySynchronized; + }; + enum class BlendFactor { eZero = VK_BLEND_FACTOR_ZERO, @@ -2957,6 +2986,41 @@ namespace VULKAN_HPP_NAMESPACE eInstance = VK_VERTEX_INPUT_RATE_INSTANCE }; + enum class PipelineColorBlendStateCreateFlagBits : VkPipelineColorBlendStateCreateFlags + { + eRasterizationOrderAttachmentAccessARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM, + eRasterizationOrderAttachmentAccessEXT = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT + }; + + using PipelineColorBlendStateCreateFlags = Flags; + + template <> + struct FlagTraits + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; + static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineColorBlendStateCreateFlags allFlags = + PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT; + }; + + enum class PipelineDepthStencilStateCreateFlagBits : VkPipelineDepthStencilStateCreateFlags + { + eRasterizationOrderAttachmentDepthAccessARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM, + eRasterizationOrderAttachmentStencilAccessARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM, + eRasterizationOrderAttachmentDepthAccessEXT = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, + eRasterizationOrderAttachmentStencilAccessEXT = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT + }; + + using PipelineDepthStencilStateCreateFlags = Flags; + + template <> + struct FlagTraits + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; + static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineDepthStencilStateCreateFlags allFlags = + PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT | + PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT; + }; + enum class PipelineDynamicStateCreateFlagBits : VkPipelineDynamicStateCreateFlags { }; @@ -2983,6 +3047,20 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineInputAssemblyStateCreateFlags allFlags = {}; }; + enum class PipelineLayoutCreateFlagBits : VkPipelineLayoutCreateFlags + { + eIndependentSetsEXT = VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT + }; + + using PipelineLayoutCreateFlags = Flags; + + template <> + struct FlagTraits + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; + static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineLayoutCreateFlags allFlags = PipelineLayoutCreateFlagBits::eIndependentSetsEXT; + }; + enum class PipelineMultisampleStateCreateFlagBits : VkPipelineMultisampleStateCreateFlags { }; @@ -3571,20 +3649,6 @@ namespace VULKAN_HPP_NAMESPACE }; using TessellationDomainOriginKHR = TessellationDomainOrigin; - enum class DeviceQueueCreateFlagBits : VkDeviceQueueCreateFlags - { - eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT - }; - - using DeviceQueueCreateFlags = Flags; - - template <> - struct FlagTraits - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceQueueCreateFlags allFlags = DeviceQueueCreateFlagBits::eProtected; - }; - enum class SamplerYcbcrModelConversion { eRgbIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, @@ -6157,23 +6221,6 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceMemoryReportFlagsEXT allFlags = {}; }; - //=== VK_EXT_pipeline_creation_cache_control === - - enum class PipelineCacheCreateFlagBits : VkPipelineCacheCreateFlags - { - eExternallySynchronized = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, - eExternallySynchronizedEXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT - }; - - using PipelineCacheCreateFlags = Flags; - - template <> - struct FlagTraits - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCacheCreateFlags allFlags = PipelineCacheCreateFlagBits::eExternallySynchronized; - }; - #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_KHR_video_encode_queue === @@ -6372,20 +6419,6 @@ namespace VULKAN_HPP_NAMESPACE GraphicsPipelineLibraryFlagBitsEXT::eFragmentShader | GraphicsPipelineLibraryFlagBitsEXT::eFragmentOutputInterface; }; - enum class PipelineLayoutCreateFlagBits : VkPipelineLayoutCreateFlags - { - eIndependentSetsEXT = VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT - }; - - using PipelineLayoutCreateFlags = Flags; - - template <> - struct FlagTraits - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineLayoutCreateFlags allFlags = PipelineLayoutCreateFlagBits::eIndependentSetsEXT; - }; - //=== VK_NV_fragment_shading_rate_enums === enum class FragmentShadingRateNV @@ -6777,43 +6810,6 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR DirectDriverLoadingFlagsLUNARG allFlags = {}; }; - //=== VK_EXT_rasterization_order_attachment_access === - - enum class PipelineColorBlendStateCreateFlagBits : VkPipelineColorBlendStateCreateFlags - { - eRasterizationOrderAttachmentAccessARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM, - eRasterizationOrderAttachmentAccessEXT = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT - }; - - using PipelineColorBlendStateCreateFlags = Flags; - - template <> - struct FlagTraits - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineColorBlendStateCreateFlags allFlags = - PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT; - }; - - enum class PipelineDepthStencilStateCreateFlagBits : VkPipelineDepthStencilStateCreateFlags - { - eRasterizationOrderAttachmentDepthAccessARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM, - eRasterizationOrderAttachmentStencilAccessARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM, - eRasterizationOrderAttachmentDepthAccessEXT = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, - eRasterizationOrderAttachmentStencilAccessEXT = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT - }; - - using PipelineDepthStencilStateCreateFlags = Flags; - - template <> - struct FlagTraits - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineDepthStencilStateCreateFlags allFlags = - PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT | - PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT; - }; - //=== VK_NV_optical_flow === enum class OpticalFlowUsageFlagBitsNV : VkOpticalFlowUsageFlagsNV diff --git a/vulkan/vulkan_to_string.hpp b/vulkan/vulkan_to_string.hpp index 2c25717..5b1e92d 100644 --- a/vulkan/vulkan_to_string.hpp +++ b/vulkan/vulkan_to_string.hpp @@ -5068,6 +5068,15 @@ namespace VULKAN_HPP_NAMESPACE return "(void)"; } + VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value ) + { + switch ( value ) + { + case DeviceQueueCreateFlagBits::eProtected: return "Protected"; + default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; + } + } + VULKAN_HPP_INLINE std::string to_string( PipelineStageFlagBits value ) { switch ( value ) @@ -5389,6 +5398,15 @@ namespace VULKAN_HPP_NAMESPACE return "(void)"; } + VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits value ) + { + switch ( value ) + { + case PipelineCacheCreateFlagBits::eExternallySynchronized: return "ExternallySynchronized"; + default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; + } + } + VULKAN_HPP_INLINE std::string to_string( BlendFactor value ) { switch ( value ) @@ -5763,6 +5781,25 @@ namespace VULKAN_HPP_NAMESPACE } } + VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlagBits value ) + { + switch ( value ) + { + case PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT: return "RasterizationOrderAttachmentAccessEXT"; + default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; + } + } + + VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlagBits value ) + { + switch ( value ) + { + case PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT: return "RasterizationOrderAttachmentDepthAccessEXT"; + case PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT: return "RasterizationOrderAttachmentStencilAccessEXT"; + default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; + } + } + VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlagBits ) { return "(void)"; @@ -5773,6 +5810,15 @@ namespace VULKAN_HPP_NAMESPACE return "(void)"; } + VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits value ) + { + switch ( value ) + { + case PipelineLayoutCreateFlagBits::eIndependentSetsEXT: return "IndependentSetsEXT"; + default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; + } + } + VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlagBits ) { return "(void)"; @@ -6208,15 +6254,6 @@ namespace VULKAN_HPP_NAMESPACE } } - VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value ) - { - switch ( value ) - { - case DeviceQueueCreateFlagBits::eProtected: return "Protected"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - VULKAN_HPP_INLINE std::string to_string( SamplerYcbcrModelConversion value ) { switch ( value ) @@ -8179,17 +8216,6 @@ namespace VULKAN_HPP_NAMESPACE return "(void)"; } - //=== VK_EXT_pipeline_creation_cache_control === - - VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits value ) - { - switch ( value ) - { - case PipelineCacheCreateFlagBits::eExternallySynchronized: return "ExternallySynchronized"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_KHR_video_encode_queue === @@ -8321,15 +8347,6 @@ namespace VULKAN_HPP_NAMESPACE } } - VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits value ) - { - switch ( value ) - { - case PipelineLayoutCreateFlagBits::eIndependentSetsEXT: return "IndependentSetsEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - //=== VK_NV_fragment_shading_rate_enums === VULKAN_HPP_INLINE std::string to_string( FragmentShadingRateNV value ) @@ -8674,27 +8691,6 @@ namespace VULKAN_HPP_NAMESPACE return "(void)"; } - //=== VK_EXT_rasterization_order_attachment_access === - - VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlagBits value ) - { - switch ( value ) - { - case PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT: return "RasterizationOrderAttachmentAccessEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - - VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlagBits value ) - { - switch ( value ) - { - case PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT: return "RasterizationOrderAttachmentDepthAccessEXT"; - case PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT: return "RasterizationOrderAttachmentStencilAccessEXT"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - //=== VK_NV_optical_flow === VULKAN_HPP_INLINE std::string to_string( OpticalFlowUsageFlagBitsNV value ) diff --git a/vulkan/vulkansc.cppm b/vulkan/vulkansc.cppm index b7c5aee..b0e5f2e 100644 --- a/vulkan/vulkansc.cppm +++ b/vulkan/vulkansc.cppm @@ -45,10 +45,8 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::ArrayProxy; using VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries; using VULKAN_HPP_NAMESPACE::Optional; - using VULKAN_HPP_NAMESPACE::SharedHandle; using VULKAN_HPP_NAMESPACE::StridedArrayProxy; using VULKAN_HPP_NAMESPACE::StructureChain; - using VULKAN_HPP_NAMESPACE::UniqueHandle; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if !defined( VULKAN_HPP_NO_SMART_HANDLE ) @@ -60,6 +58,8 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::ObjectReleaseShared; using VULKAN_HPP_NAMESPACE::PoolFree; using VULKAN_HPP_NAMESPACE::PoolFreeShared; + using VULKAN_HPP_NAMESPACE::SharedHandle; + using VULKAN_HPP_NAMESPACE::UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ //================== @@ -118,6 +118,8 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::DescriptorType; using VULKAN_HPP_NAMESPACE::DeviceCreateFlagBits; using VULKAN_HPP_NAMESPACE::DeviceCreateFlags; + using VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlagBits; + using VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags; using VULKAN_HPP_NAMESPACE::DynamicState; using VULKAN_HPP_NAMESPACE::EventCreateFlagBits; using VULKAN_HPP_NAMESPACE::EventCreateFlags; @@ -156,6 +158,8 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::ObjectType; using VULKAN_HPP_NAMESPACE::PhysicalDeviceType; using VULKAN_HPP_NAMESPACE::PipelineBindPoint; + using VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlagBits; + using VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion; using VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlagBits; using VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags; @@ -167,6 +171,8 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlagBits; using VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags; + using VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlagBits; + using VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlagBits; using VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlagBits; @@ -222,8 +228,6 @@ export namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_1 === using VULKAN_HPP_NAMESPACE::ChromaLocation; using VULKAN_HPP_NAMESPACE::ChromaLocationKHR; - using VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlagBits; - using VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags; using VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlagBits; using VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlagBitsKHR; using VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlags; @@ -314,8 +318,6 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::FaultLevel; using VULKAN_HPP_NAMESPACE::FaultQueryBehavior; using VULKAN_HPP_NAMESPACE::FaultType; - using VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlagBits; - using VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags; using VULKAN_HPP_NAMESPACE::PipelineCacheValidationVersion; using VULKAN_HPP_NAMESPACE::PipelineMatchControl; diff --git a/vulkan/vulkansc_enums.hpp b/vulkan/vulkansc_enums.hpp index 192c380..2009c7b 100644 --- a/vulkan/vulkansc_enums.hpp +++ b/vulkan/vulkansc_enums.hpp @@ -1225,6 +1225,20 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceCreateFlags allFlags = {}; }; + enum class DeviceQueueCreateFlagBits : VkDeviceQueueCreateFlags + { + eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT + }; + + using DeviceQueueCreateFlags = Flags; + + template <> + struct FlagTraits + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; + static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceQueueCreateFlags allFlags = DeviceQueueCreateFlagBits::eProtected; + }; + enum class PipelineStageFlagBits : VkPipelineStageFlags { eTopOfPipe = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, @@ -1543,6 +1557,23 @@ namespace VULKAN_HPP_NAMESPACE eCubeArray = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY }; + enum class PipelineCacheCreateFlagBits : VkPipelineCacheCreateFlags + { + eExternallySynchronized = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, + eReadOnly = VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT, + eUseApplicationStorage = VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT + }; + + using PipelineCacheCreateFlags = Flags; + + template <> + struct FlagTraits + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; + static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCacheCreateFlags allFlags = + PipelineCacheCreateFlagBits::eExternallySynchronized | PipelineCacheCreateFlagBits::eReadOnly | PipelineCacheCreateFlagBits::eUseApplicationStorage; + }; + enum class BlendFactor { eZero = VK_BLEND_FACTOR_ZERO, @@ -1901,6 +1932,19 @@ namespace VULKAN_HPP_NAMESPACE static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineInputAssemblyStateCreateFlags allFlags = {}; }; + enum class PipelineLayoutCreateFlagBits : VkPipelineLayoutCreateFlags + { + }; + + using PipelineLayoutCreateFlags = Flags; + + template <> + struct FlagTraits + { + static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; + static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineLayoutCreateFlags allFlags = {}; + }; + enum class PipelineMultisampleStateCreateFlagBits : VkPipelineMultisampleStateCreateFlags { }; @@ -2392,20 +2436,6 @@ namespace VULKAN_HPP_NAMESPACE }; using TessellationDomainOriginKHR = TessellationDomainOrigin; - enum class DeviceQueueCreateFlagBits : VkDeviceQueueCreateFlags - { - eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT - }; - - using DeviceQueueCreateFlags = Flags; - - template <> - struct FlagTraits - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceQueueCreateFlags allFlags = DeviceQueueCreateFlagBits::eProtected; - }; - enum class SamplerYcbcrModelConversion { eRgbIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, @@ -3039,23 +3069,6 @@ namespace VULKAN_HPP_NAMESPACE eApplicationUuidExactMatch = VK_PIPELINE_MATCH_CONTROL_APPLICATION_UUID_EXACT_MATCH }; - enum class PipelineCacheCreateFlagBits : VkPipelineCacheCreateFlags - { - eExternallySynchronized = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, - eReadOnly = VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT, - eUseApplicationStorage = VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT - }; - - using PipelineCacheCreateFlags = Flags; - - template <> - struct FlagTraits - { - static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; - static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCacheCreateFlags allFlags = - PipelineCacheCreateFlagBits::eExternallySynchronized | PipelineCacheCreateFlagBits::eReadOnly | PipelineCacheCreateFlagBits::eUseApplicationStorage; - }; - enum class PipelineCacheValidationVersion { eSafetyCriticalOne = VK_PIPELINE_CACHE_VALIDATION_VERSION_SAFETY_CRITICAL_ONE diff --git a/vulkan/vulkansc_to_string.hpp b/vulkan/vulkansc_to_string.hpp index ea2dce1..25fe4c8 100644 --- a/vulkan/vulkansc_to_string.hpp +++ b/vulkan/vulkansc_to_string.hpp @@ -2556,6 +2556,15 @@ namespace VULKAN_HPP_NAMESPACE return "(void)"; } + VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value ) + { + switch ( value ) + { + case DeviceQueueCreateFlagBits::eProtected: return "Protected"; + default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; + } + } + VULKAN_HPP_INLINE std::string to_string( PipelineStageFlagBits value ) { switch ( value ) @@ -2788,6 +2797,17 @@ namespace VULKAN_HPP_NAMESPACE } } + VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits value ) + { + switch ( value ) + { + case PipelineCacheCreateFlagBits::eExternallySynchronized: return "ExternallySynchronized"; + case PipelineCacheCreateFlagBits::eReadOnly: return "ReadOnly"; + case PipelineCacheCreateFlagBits::eUseApplicationStorage: return "UseApplicationStorage"; + default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; + } + } + VULKAN_HPP_INLINE std::string to_string( BlendFactor value ) { switch ( value ) @@ -3105,6 +3125,11 @@ namespace VULKAN_HPP_NAMESPACE return "(void)"; } + VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits ) + { + return "(void)"; + } + VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlagBits ) { return "(void)"; @@ -3476,15 +3501,6 @@ namespace VULKAN_HPP_NAMESPACE } } - VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value ) - { - switch ( value ) - { - case DeviceQueueCreateFlagBits::eProtected: return "Protected"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - VULKAN_HPP_INLINE std::string to_string( SamplerYcbcrModelConversion value ) { switch ( value ) @@ -3942,17 +3958,6 @@ namespace VULKAN_HPP_NAMESPACE } } - VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits value ) - { - switch ( value ) - { - case PipelineCacheCreateFlagBits::eExternallySynchronized: return "ExternallySynchronized"; - case PipelineCacheCreateFlagBits::eReadOnly: return "ReadOnly"; - case PipelineCacheCreateFlagBits::eUseApplicationStorage: return "UseApplicationStorage"; - default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; - } - } - VULKAN_HPP_INLINE std::string to_string( PipelineCacheValidationVersion value ) { switch ( value )