Cleanup work on enum value handling. (#1573)

This commit is contained in:
Andreas Süßenbach 2023-05-04 13:35:50 +02:00 committed by GitHub
parent 3a1d6cbcab
commit f618b6bd5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 108 additions and 48 deletions

View File

@ -2467,7 +2467,7 @@ std::string VulkanHppGenerator::generateBitmaskToString( std::map<std::string, B
VULKAN_HPP_INLINE std::string to_string( ${bitmaskName} value ) VULKAN_HPP_INLINE std::string to_string( ${bitmaskName} value )
{ {
if ( !value ) if ( !value )
return "{}"; return "${emptyValue}";
std::string result; std::string result;
${toStringChecks} ${toStringChecks}
@ -2475,20 +2475,27 @@ ${toStringChecks}
} }
)"; )";
std::string emptyValue = "{}";
std::string toStringChecks; std::string toStringChecks;
std::string previousEnter, previousLeave; std::string previousEnter, previousLeave;
for ( auto const & value : bitmaskBitsIt->second.values ) for ( auto const & value : bitmaskBitsIt->second.values )
{ {
auto [enter, leave] = generateProtection( value.protect );
std::string valueName = generateEnumValueName( bitmaskBitsIt->first, value.name, true ); std::string valueName = generateEnumValueName( bitmaskBitsIt->first, value.name, true );
if ( value.singleBit ) if ( value.value == "0" )
{ {
assert( emptyValue == "{}" );
emptyValue = valueName.substr( 1 );
}
else if ( !value.bitpos.empty() )
{
assert( value.alias.empty() );
auto [enter, leave] = generateProtection( value.protect );
toStringChecks += ( ( previousEnter != enter ) ? ( previousLeave + enter ) : "" ) + " if ( value & " + enumName + "::" + valueName + toStringChecks += ( ( previousEnter != enter ) ? ( previousLeave + enter ) : "" ) + " if ( value & " + enumName + "::" + valueName +
" ) result += \"" + valueName.substr( 1 ) + " | \";\n"; " ) result += \"" + valueName.substr( 1 ) + " | \";\n";
}
previousEnter = enter; previousEnter = enter;
previousLeave = leave; previousLeave = leave;
} }
}
if ( !previousLeave.empty() ) if ( !previousLeave.empty() )
{ {
assert( previousLeave.ends_with( "\n" ) ); assert( previousLeave.ends_with( "\n" ) );
@ -2496,7 +2503,7 @@ ${toStringChecks}
previousLeave.resize( previousLeave.size() - strlen( "\n" ) ); previousLeave.resize( previousLeave.size() - strlen( "\n" ) );
} }
str += replaceWithMap( bitmaskToStringTemplate, { { "bitmaskName", bitmaskName }, { "toStringChecks", toStringChecks } } ); str += replaceWithMap( bitmaskToStringTemplate, { { "bitmaskName", bitmaskName }, { "emptyValue", emptyValue }, { "toStringChecks", toStringChecks } } );
} }
return str; return str;
@ -11832,7 +11839,7 @@ void VulkanHppGenerator::readEnumsEnum( tinyxml2::XMLElement const * element, st
checkForError( name.starts_with( prefix ), line, "encountered enum value <" + name + "> that does not begin with expected prefix <" + prefix + ">" ); checkForError( name.starts_with( prefix ), line, "encountered enum value <" + name + "> that does not begin with expected prefix <" + prefix + ">" );
checkForError( bitpos.empty() ^ value.empty(), line, "both or none of \"bitpos\" and \"value\" are set for enum <" + name + "> which is invalid" ); checkForError( bitpos.empty() ^ value.empty(), line, "both or none of \"bitpos\" and \"value\" are set for enum <" + name + "> which is invalid" );
enumIt->second.addEnumValue( line, name, "", !bitpos.empty(), true ); enumIt->second.addEnumValue( line, name, "", bitpos, value, true );
} }
} }
@ -12669,7 +12676,7 @@ void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element,
auto enumIt = m_enums.find( extends ); auto enumIt = m_enums.find( extends );
assert( enumIt != m_enums.end() ); assert( enumIt != m_enums.end() );
enumIt->second.addEnumValue( line, name, protect, !bitpos.empty(), ( api.empty() || ( api == m_api ) ) && supported ); enumIt->second.addEnumValue( line, name, protect, bitpos + offset, value, ( api.empty() || ( api == m_api ) ) && supported );
} }
} }
else else
@ -13846,36 +13853,37 @@ void VulkanHppGenerator::EnumData::addEnumAlias( int line, std::string const & n
{ {
if ( supported ) if ( supported )
{ {
checkForError( ( valueIt->alias == alias ) && ( valueIt->protect == protect ) && !valueIt->singleBit, checkForError( ( valueIt->alias == alias ) && ( valueIt->protect == protect ) && valueIt->bitpos.empty() && valueIt->value.empty(),
line, line,
"enum alias <" + name + "> already specified with different attributes" ); "enum alias <" + name + "> already specified with different attributes" );
} }
else else
{ {
checkForWarning( ( valueIt->alias == alias ) && ( valueIt->protect == protect ) && !valueIt->singleBit, checkForWarning( ( valueIt->alias == alias ) && ( valueIt->protect == protect ) && valueIt->bitpos.empty() && valueIt->value.empty(),
line, line,
"enum alias <" + name + "> already specified with different attributes" ); "enum alias <" + name + "> already specified with different attributes" );
} }
} }
else else
{ {
valuesRef.push_back( { alias, name, protect, false, line } ); valuesRef.push_back( { alias, "", name, protect, "", line } );
} }
} }
void VulkanHppGenerator::EnumData::addEnumValue( int line, std::string const & name, std::string const & protect, bool singleBit, bool supported ) void VulkanHppGenerator::EnumData::addEnumValue(
int line, std::string const & name, std::string const & protect, std::string const & bitpos, std::string const & value, bool supported )
{ {
auto & valuesRef = supported ? values : unsupportedValues; auto & valuesRef = supported ? values : unsupportedValues;
auto valueIt = std::find_if( valuesRef.begin(), valuesRef.end(), [&name]( EnumValueData const & evd ) { return evd.name == name; } ); auto valueIt = std::find_if( valuesRef.begin(), valuesRef.end(), [&name]( EnumValueData const & evd ) { return evd.name == name; } );
if ( valueIt != valuesRef.end() ) if ( valueIt != valuesRef.end() )
{ {
checkForError( valueIt->alias.empty() && ( valueIt->protect == protect ) && ( valueIt->singleBit == singleBit ), checkForError( valueIt->alias.empty() && ( valueIt->protect == protect ) && ( valueIt->bitpos == bitpos ) && ( valueIt->value == value ),
line, line,
"enum value <" + name + "> already specified with different attributes" ); "enum value <" + name + "> already specified with different attributes" );
} }
else else
{ {
valuesRef.push_back( { "", name, protect, singleBit, line } ); valuesRef.push_back( { "", bitpos, name, protect, value, line } );
} }
} }

View File

@ -197,16 +197,18 @@ private:
struct EnumValueData struct EnumValueData
{ {
std::string alias = {}; std::string alias = {};
std::string bitpos = {};
std::string name = {}; std::string name = {};
std::string protect = {}; std::string protect = {};
bool singleBit = false; std::string value = {};
int xmlLine = {}; int xmlLine = {};
}; };
struct EnumData struct EnumData
{ {
void addEnumAlias( int line, std::string const & name, std::string const & alias, std::string const & protect, bool supported ); void addEnumAlias( int line, std::string const & name, std::string const & alias, std::string const & protect, bool supported );
void addEnumValue( int line, std::string const & valueName, std::string const & protect, bool singleBit, bool supported ); void addEnumValue(
int line, std::string const & valueName, std::string const & protect, std::string const & bitpos, std::string const & value, bool supported );
std::string bitwidth = {}; std::string bitwidth = {};
bool isBitmask = false; bool isBitmask = false;

View File

@ -6001,6 +6001,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_allocationCallbacks; return m_allocationCallbacks;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT
@ -6035,6 +6040,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_allocationCallbacks; return m_allocationCallbacks;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT
@ -6073,6 +6083,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_allocationCallbacks; return m_allocationCallbacks;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT
@ -6104,6 +6119,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_owner; return m_owner;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT
@ -6140,6 +6160,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_pool; return m_pool;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT

View File

@ -325,7 +325,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags value ) VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & PipelineStageFlagBits::eTopOfPipe ) if ( value & PipelineStageFlagBits::eTopOfPipe )
@ -392,7 +392,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( ImageAspectFlags value ) VULKAN_HPP_INLINE std::string to_string( ImageAspectFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & ImageAspectFlagBits::eColor ) if ( value & ImageAspectFlagBits::eColor )
@ -684,7 +684,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( CullModeFlags value ) VULKAN_HPP_INLINE std::string to_string( CullModeFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & CullModeFlagBits::eFront ) if ( value & CullModeFlagBits::eFront )
@ -962,7 +962,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( AccessFlags value ) VULKAN_HPP_INLINE std::string to_string( AccessFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & AccessFlagBits::eIndirectCommandRead ) if ( value & AccessFlagBits::eIndirectCommandRead )
@ -1434,7 +1434,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( ResolveModeFlags value ) VULKAN_HPP_INLINE std::string to_string( ResolveModeFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & ResolveModeFlagBits::eSampleZero ) if ( value & ResolveModeFlagBits::eSampleZero )
@ -1511,7 +1511,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags2 value ) VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags2 value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & PipelineStageFlagBits2::eTopOfPipe ) if ( value & PipelineStageFlagBits2::eTopOfPipe )
@ -1605,7 +1605,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( AccessFlags2 value ) VULKAN_HPP_INLINE std::string to_string( AccessFlags2 value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & AccessFlagBits2::eIndirectCommandRead ) if ( value & AccessFlagBits2::eIndirectCommandRead )
@ -2012,7 +2012,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( VideoCodecOperationFlagsKHR value ) VULKAN_HPP_INLINE std::string to_string( VideoCodecOperationFlagsKHR value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
@ -2032,7 +2032,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( VideoChromaSubsamplingFlagsKHR value ) VULKAN_HPP_INLINE std::string to_string( VideoChromaSubsamplingFlagsKHR value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Invalid";
std::string result; std::string result;
if ( value & VideoChromaSubsamplingFlagBitsKHR::eMonochrome ) if ( value & VideoChromaSubsamplingFlagBitsKHR::eMonochrome )
@ -2050,7 +2050,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( VideoComponentBitDepthFlagsKHR value ) VULKAN_HPP_INLINE std::string to_string( VideoComponentBitDepthFlagsKHR value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Invalid";
std::string result; std::string result;
if ( value & VideoComponentBitDepthFlagBitsKHR::e8 ) if ( value & VideoComponentBitDepthFlagBitsKHR::e8 )
@ -2141,7 +2141,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( VideoDecodeUsageFlagsKHR value ) VULKAN_HPP_INLINE std::string to_string( VideoDecodeUsageFlagsKHR value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Default";
std::string result; std::string result;
if ( value & VideoDecodeUsageFlagBitsKHR::eTranscoding ) if ( value & VideoDecodeUsageFlagBitsKHR::eTranscoding )
@ -2339,7 +2339,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264PictureLayoutFlagsKHR value ) VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264PictureLayoutFlagsKHR value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Progressive";
std::string result; std::string result;
if ( value & VideoDecodeH264PictureLayoutFlagBitsKHR::eInterlacedInterleavedLines ) if ( value & VideoDecodeH264PictureLayoutFlagBitsKHR::eInterlacedInterleavedLines )
@ -2817,7 +2817,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( VideoEncodeUsageFlagsKHR value ) VULKAN_HPP_INLINE std::string to_string( VideoEncodeUsageFlagsKHR value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Default";
std::string result; std::string result;
if ( value & VideoEncodeUsageFlagBitsKHR::eTranscoding ) if ( value & VideoEncodeUsageFlagBitsKHR::eTranscoding )
@ -2835,7 +2835,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( VideoEncodeContentFlagsKHR value ) VULKAN_HPP_INLINE std::string to_string( VideoEncodeContentFlagsKHR value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Default";
std::string result; std::string result;
if ( value & VideoEncodeContentFlagBitsKHR::eCamera ) if ( value & VideoEncodeContentFlagBitsKHR::eCamera )
@ -2856,7 +2856,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlModeFlagsKHR value ) VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlModeFlagsKHR value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Default";
std::string result; std::string result;
if ( value & VideoEncodeRateControlModeFlagBitsKHR::eDisabled ) if ( value & VideoEncodeRateControlModeFlagBitsKHR::eDisabled )
@ -2953,7 +2953,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( ImageCompressionFlagsEXT value ) VULKAN_HPP_INLINE std::string to_string( ImageCompressionFlagsEXT value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Default";
std::string result; std::string result;
if ( value & ImageCompressionFlagBitsEXT::eFixedRateDefault ) if ( value & ImageCompressionFlagBitsEXT::eFixedRateDefault )
@ -2969,7 +2969,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( ImageCompressionFixedRateFlagsEXT value ) VULKAN_HPP_INLINE std::string to_string( ImageCompressionFixedRateFlagsEXT value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & ImageCompressionFixedRateFlagBitsEXT::e1Bpc ) if ( value & ImageCompressionFixedRateFlagBitsEXT::e1Bpc )
@ -3141,7 +3141,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( OpticalFlowUsageFlagsNV value ) VULKAN_HPP_INLINE std::string to_string( OpticalFlowUsageFlagsNV value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Unknown";
std::string result; std::string result;
if ( value & OpticalFlowUsageFlagBitsNV::eInput ) if ( value & OpticalFlowUsageFlagBitsNV::eInput )
@ -3161,7 +3161,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( OpticalFlowGridSizeFlagsNV value ) VULKAN_HPP_INLINE std::string to_string( OpticalFlowGridSizeFlagsNV value )
{ {
if ( !value ) if ( !value )
return "{}"; return "Unknown";
std::string result; std::string result;
if ( value & OpticalFlowGridSizeFlagBitsNV::e1X1 ) if ( value & OpticalFlowGridSizeFlagBitsNV::e1X1 )

View File

@ -3552,6 +3552,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_allocationCallbacks; return m_allocationCallbacks;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT
@ -3586,6 +3591,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_allocationCallbacks; return m_allocationCallbacks;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT
@ -3624,6 +3634,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_allocationCallbacks; return m_allocationCallbacks;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT
@ -3655,6 +3670,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_owner; return m_owner;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT
@ -3691,6 +3711,11 @@ namespace VULKAN_HPP_NAMESPACE
return m_pool; return m_pool;
} }
Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT
{
return *m_dispatch;
}
protected: protected:
template <typename T> template <typename T>
void destroy( T t ) VULKAN_HPP_NOEXCEPT void destroy( T t ) VULKAN_HPP_NOEXCEPT

View File

@ -254,7 +254,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags value ) VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & PipelineStageFlagBits::eTopOfPipe ) if ( value & PipelineStageFlagBits::eTopOfPipe )
@ -305,7 +305,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( ImageAspectFlags value ) VULKAN_HPP_INLINE std::string to_string( ImageAspectFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & ImageAspectFlagBits::eColor ) if ( value & ImageAspectFlagBits::eColor )
@ -515,7 +515,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( CullModeFlags value ) VULKAN_HPP_INLINE std::string to_string( CullModeFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & CullModeFlagBits::eFront ) if ( value & CullModeFlagBits::eFront )
@ -671,7 +671,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( AccessFlags value ) VULKAN_HPP_INLINE std::string to_string( AccessFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & AccessFlagBits::eIndirectCommandRead ) if ( value & AccessFlagBits::eIndirectCommandRead )
@ -1076,7 +1076,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( ResolveModeFlags value ) VULKAN_HPP_INLINE std::string to_string( ResolveModeFlags value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & ResolveModeFlagBits::eSampleZero ) if ( value & ResolveModeFlagBits::eSampleZero )
@ -1149,7 +1149,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags2 value ) VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags2 value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & PipelineStageFlagBits2::eTopOfPipe ) if ( value & PipelineStageFlagBits2::eTopOfPipe )
@ -1225,7 +1225,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::string to_string( AccessFlags2 value ) VULKAN_HPP_INLINE std::string to_string( AccessFlags2 value )
{ {
if ( !value ) if ( !value )
return "{}"; return "None";
std::string result; std::string result;
if ( value & AccessFlagBits2::eIndirectCommandRead ) if ( value & AccessFlagBits2::eIndirectCommandRead )