Merge pull request #973 from asuessenbach/cleanup

Cleanup on usage of generateProtection().
This commit is contained in:
Andreas Süßenbach 2021-05-27 15:31:17 +02:00 committed by GitHub
commit 5a8b054ca2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 149 additions and 213 deletions

View File

@ -924,13 +924,7 @@ void VulkanHppGenerator::appendBitmasks( std::string & str ) const
std::string enter, leave;
std::tie( enter, leave ) =
generateProtection( bitmaskIts.front()->first, !bitmaskIts.front()->second.alias.empty() );
if ( !enter.empty() )
{
enter = "\n" + enter;
assert( endsWith( enter, "\n" ) );
enter.resize( enter.size() - strlen( "\n" ) );
}
str += enter + "\n //=== " + extIt.second->first + " ===\n";
str += "\n" + enter + " //=== " + extIt.second->first + " ===\n";
for ( auto bitmaskIt : bitmaskIts )
{
assert( listedBitmasks.find( bitmaskIt->first ) == listedBitmasks.end() );
@ -1009,23 +1003,19 @@ void VulkanHppGenerator::appendBitmask( std::string & str,
for ( auto const & value : enumValues )
{
std::string enter, leave;
if ( !value.extension.empty() )
{
std::tie( enter, leave ) = generateProtection( value.extension );
if ( !leave.empty() )
{
assert( leave.back() );
leave.pop_back();
leave = "\n" + leave;
}
}
allFlags += ( ( previousEnter != enter ) ? ( previousLeave + "\n" + enter ) : "\n" ) + " " +
std::tie( enter, leave ) = generateProtection( value.extension );
allFlags += ( ( previousEnter != enter ) ? ( "\n" + previousLeave + enter ) : "\n" ) + " " +
( encounteredFlag ? "| " : " " ) + bitmaskType + "( " + enumName + "::" + value.vkValue + " )";
encounteredFlag = true;
previousEnter = enter;
previousLeave = leave;
}
allFlags += previousLeave;
if ( !previousLeave.empty() )
{
assert( endsWith( previousLeave, "\n" ) );
previousLeave.resize( previousLeave.size() - strlen( "\n" ) );
allFlags += "\n" + previousLeave;
}
static const std::string bitmaskOperatorsTemplate = R"(
template <> struct FlagTraits<${enumName}>
@ -1093,29 +1083,19 @@ void VulkanHppGenerator::appendBitmaskToStringFunction( std::string &
{
// 'or' together all the bits in the value
str +=
" if ( !value ) return \"{}\";\n"
" if ( !value ) return \"{}\";\n\n"
" std::string result;\n";
for ( auto const & evd : enumValues )
{
if ( evd.singleBit )
{
std::string enter, leave;
if ( !evd.extension.empty() )
{
std::tie( enter, leave ) = generateProtection( evd.extension );
if ( !leave.empty() )
{
leave = "\n" + leave;
leave.pop_back();
}
}
str += "\n" + enter + " if ( value & " + enumName + "::" + evd.vkValue + " ) result += \"" +
evd.vkValue.substr( 1 ) + " | \";" + leave;
std::tie( enter, leave ) = generateProtection( evd.extension );
str += enter + " if ( value & " + enumName + "::" + evd.vkValue + " ) result += \"" +
evd.vkValue.substr( 1 ) + " | \";\n" + leave;
}
}
str +=
"\n"
" return \"{ \" + result.substr(0, result.size() - 3) + \" }\";\n";
str += " return \"{ \" + result.substr(0, result.size() - 3) + \" }\";\n";
}
str += " }\n";
@ -2306,13 +2286,7 @@ void VulkanHppGenerator::appendDispatchLoaderStatic( std::string & str )
std::string enter, leave;
std::tie( enter, leave ) = generateProtection( referencedIn );
if ( !enter.empty() )
{
enter = "\n" + enter;
assert( endsWith( enter, "\n" ) );
enter.resize( enter.size() - strlen( "\n" ) );
}
str += enter + "\n //=== " + extIt.second->first + " ===\n";
str += "\n" + enter + " //=== " + extIt.second->first + " ===\n";
for ( auto const & commandName : extIt.second->second.commands )
{
// some commands are listed for multiple extensions !
@ -2670,23 +2644,18 @@ void VulkanHppGenerator::appendEnum( std::string & str, std::pair<std::string, E
for ( auto const & value : enumData.second.values )
{
std::string enter, leave;
if ( !value.extension.empty() )
std::tie( enter, leave ) = generateProtection( value.extension );
if ( previousEnter != enter )
{
std::tie( enter, leave ) = generateProtection( value.extension );
enumList += previousLeave + enter;
}
if ( !leave.empty() )
{
assert( leave.back() == '\n' );
leave.pop_back();
leave = "\n" + leave;
}
enumList += ( ( previousEnter != enter ) ? ( previousLeave + "\n" + enter ) : "\n" ) + " " + value.vkValue +
" = " + value.vulkanValue + ",";
enumList += " " + value.vkValue + " = " + value.vulkanValue + ",\n";
previousEnter = enter;
previousLeave = leave;
}
enumList += previousLeave;
for ( auto const & alias : enumData.second.aliases )
{
// make sure to only list alias values that differ from all non-alias values
@ -2712,18 +2681,21 @@ void VulkanHppGenerator::appendEnum( std::string & str, std::pair<std::string, E
assert( enumIt != enumData.second.values.end() );
assert( enumIt->extension.empty() || generateProtection( enumIt->extension ).first.empty() );
#endif
enumList += "\n " + alias.second.vkValue + " = " + alias.first + ",";
enumList += " " + alias.second.vkValue + " = " + alias.first + ",\n";
}
}
if ( !enumList.empty() )
if ( enumList.empty() )
{
str += "\n {};\n";
}
else
{
size_t pos = enumList.rfind( ',' );
assert( pos != std::string::npos );
enumList.erase( pos, 1 );
str += "\n {\n" + enumList + " };\n";
}
str += "\n {" + enumList + "\n };\n";
if ( !enumData.second.alias.empty() )
{
str +=
@ -2784,13 +2756,7 @@ void VulkanHppGenerator::appendEnums( std::string & str ) const
{
std::string enter, leave;
std::tie( enter, leave ) = generateProtection( enumIts.front()->first, !enumIts.front()->second.alias.empty() );
if ( !enter.empty() )
{
enter = "\n" + enter;
assert( endsWith( enter, "\n" ) );
enter.resize( enter.size() - strlen( "\n" ) );
}
str += enter + "\n //=== " + extIt.second->first + " ===\n";
str += "\n" + enter + " //=== " + extIt.second->first + " ===\n";
for ( auto enumIt : enumIts )
{
str += "\n";
@ -2863,12 +2829,12 @@ void VulkanHppGenerator::appendEnumToString( std::string &
for ( auto const & value : enumData.second.values )
{
std::string enter, leave;
if ( !value.extension.empty() )
std::tie( enter, leave ) = generateProtection( value.extension );
if ( previousEnter != enter )
{
std::tie( enter, leave ) = generateProtection( value.extension );
str += previousLeave + enter;
}
str += ( ( previousEnter != enter ) ? ( previousLeave + enter ) : "" ) + " case " + enumName +
"::" + value.vkValue + " : return \"" + value.vkValue.substr( 1 ) + "\";\n";
str += " case " + enumName + "::" + value.vkValue + " : return \"" + value.vkValue.substr( 1 ) + "\";\n";
previousEnter = enter;
previousLeave = leave;
}
@ -3224,14 +3190,7 @@ void VulkanHppGenerator::appendHandle( std::string & str, std::pair<std::string,
{
std::string enter, leave;
std::tie( enter, leave ) = generateProtection( extIt.second->first );
if ( !enter.empty() )
{
enter = "\n" + enter;
assert( endsWith( enter, "\n" ) );
enter.resize( enter.size() - strlen( "\n" ) );
}
commands += enter + "\n //=== " + extIt.second->first + " ===\n";
commands += "\n" + enter + " //=== " + extIt.second->first + " ===\n";
for ( auto const & command : commandNames )
{
auto commandIt = m_commands.find( command );
@ -3337,7 +3296,7 @@ ${CppTypeFromDebugReportObjectTypeEXT}
{
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
};
)";
${usingAlias}${leave})";
std::string className = stripPrefix( handleData.first, "Vk" );
@ -3370,6 +3329,12 @@ ${CppTypeFromDebugReportObjectTypeEXT}
[&handleData]( EnumValueData const & evd )
{ return evd.vulkanValue == handleData.second.objTypeEnum; } );
assert( valueIt != enumIt->second.values.end() );
std::string usingAlias;
if ( !handleData.second.alias.empty() )
{
usingAlias += " using " + stripPrefix( handleData.second.alias, "Vk" ) + " = " +
stripPrefix( handleData.first, "Vk" ) + ";\n";
}
str += replaceWithMap( templateString,
{ { "className", className },
@ -3377,15 +3342,10 @@ ${CppTypeFromDebugReportObjectTypeEXT}
{ "CppTypeFromDebugReportObjectTypeEXT", cppTypeFromDebugReportObjectTypeEXT },
{ "debugReportObjectType", debugReportObjectType },
{ "enter", enter },
{ "leave", leave },
{ "memberName", startLowerCase( stripPrefix( handleData.first, "Vk" ) ) },
{ "objTypeEnum", valueIt->vkValue } } );
if ( !handleData.second.alias.empty() )
{
str += " using " + stripPrefix( handleData.second.alias, "Vk" ) + " = " + stripPrefix( handleData.first, "Vk" ) +
";\n";
}
str += leave;
{ "objTypeEnum", valueIt->vkValue },
{ "usingAlias", usingAlias } } );
}
m_listingTypes.erase( handleData.first );
@ -3434,13 +3394,7 @@ void VulkanHppGenerator::appendHandlesCommandDefinitions( std::string & str ) co
{
std::string enter, leave;
std::tie( enter, leave ) = generateProtection( extIt.second->first );
if ( !enter.empty() )
{
enter = "\n" + enter;
assert( endsWith( enter, "\n" ) );
enter.resize( enter.size() - strlen( "\n" ) );
}
str += enter + "\n //=== " + extIt.second->first + " ===\n";
str += "\n" + enter + " //=== " + extIt.second->first + " ===\n";
for ( auto const & command : extIt.second->second.commands )
{
if ( listedCommands.find( command ) == listedCommands.end() )
@ -3458,14 +3412,16 @@ void VulkanHppGenerator::appendHandlesCommandDefinitions( std::string & str ) co
void VulkanHppGenerator::appendHashStructures( std::string & str ) const
{
const std::string hashTemplate = R"( template <> struct hash<VULKAN_HPP_NAMESPACE::${type}>
const std::string hashTemplate = R"(
${enter} template <> struct hash<VULKAN_HPP_NAMESPACE::${type}>
{
std::size_t operator()(VULKAN_HPP_NAMESPACE::${type} const & ${name}) const VULKAN_HPP_NOEXCEPT
{
return std::hash<Vk${type}>{}(static_cast<Vk${type}>(${name}));
}
};
)";
${leave})";
for ( auto handle : m_handles )
{
if ( !handle.first.empty() )
@ -3473,11 +3429,10 @@ void VulkanHppGenerator::appendHashStructures( std::string & str ) const
std::string enter, leave;
std::tie( enter, leave ) = generateProtection( handle.first, !handle.second.alias.empty() );
str += "\n" + enter;
std::string type = stripPrefix( handle.first, "Vk" );
std::string name = startLowerCase( type );
str += replaceWithMap( hashTemplate, { { "name", name }, { "type", type } } );
str += leave;
str +=
replaceWithMap( hashTemplate, { { "enter", enter }, { "leave", leave }, { "name", name }, { "type", type } } );
}
}
}
@ -3521,13 +3476,7 @@ void VulkanHppGenerator::appendRAIICommands( std::string & str, std::set<std::st
{
std::string enter, leave;
std::tie( enter, leave ) = generateProtection( extIt.second->first );
if ( !enter.empty() )
{
enter = "\n" + enter;
assert( endsWith( enter, "\n" ) );
enter.resize( enter.size() - strlen( "\n" ) );
}
str += enter + "\n //=== " + extIt.second->first + " ===\n";
str += "\n" + enter + " //=== " + extIt.second->first + " ===\n";
for ( auto const & command : commands )
{
str +=
@ -3686,10 +3635,7 @@ ${leave})";
if ( beginsWith( value.vkValue, "eError" ) )
{
std::string enter, leave;
if ( !value.extension.empty() )
{
std::tie( enter, leave ) = generateProtection( value.extension );
}
std::tie( enter, leave ) = generateProtection( value.extension );
str += replaceWithMap( templateString,
{ { "className", stripPrefix( value.vkValue, "eError" ) + "Error" },
{ "enter", enter },
@ -9398,14 +9344,8 @@ std::string VulkanHppGenerator::constructRAIIHandleMemberFunctionDeclarations(
if ( extIt.second->first != m_types.find( handle.first )->second.referencedIn )
{
std::tie( enter, leave ) = generateProtection( extIt.second->first );
if ( !enter.empty() )
{
enter = "\n" + enter;
assert( endsWith( enter, "\n" ) );
enter.resize( enter.size() - strlen( "\n" ) );
}
}
functionDeclarations += enter + "\n //=== " + extIt.second->first + " ===\n";
functionDeclarations += "\n" + enter + " //=== " + extIt.second->first + " ===\n";
for ( auto const & command : firstLevelCommands )
{
functionDeclarations +=
@ -10918,11 +10858,7 @@ void VulkanHppGenerator::appendThrowExceptions( std::string & str ) const
if ( beginsWith( value.vkValue, "eError" ) )
{
std::string enter, leave;
if ( !value.extension.empty() )
{
std::tie( enter, leave ) = generateProtection( value.extension );
}
std::tie( enter, leave ) = generateProtection( value.extension );
str += enter + " case Result::" + value.vkValue + ": throw " + stripPrefix( value.vkValue, "eError" ) +
"Error( message );\n" + leave;
}

View File

@ -13025,8 +13025,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & FormatFeatureFlagBits::eSampledImage )
result += "SampledImage | ";
if ( value & FormatFeatureFlagBits::eStorageImage )
@ -13147,8 +13147,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ImageCreateFlagBits::eSparseBinding )
result += "SparseBinding | ";
if ( value & ImageCreateFlagBits::eSparseResidency )
@ -13234,8 +13234,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ImageUsageFlagBits::eTransferSrc )
result += "TransferSrc | ";
if ( value & ImageUsageFlagBits::eTransferDst )
@ -13328,8 +13328,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & MemoryHeapFlagBits::eDeviceLocal )
result += "DeviceLocal | ";
if ( value & MemoryHeapFlagBits::eMultiInstance )
@ -13380,8 +13380,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & MemoryPropertyFlagBits::eDeviceLocal )
result += "DeviceLocal | ";
if ( value & MemoryPropertyFlagBits::eHostVisible )
@ -13444,8 +13444,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & QueueFlagBits::eGraphics )
result += "Graphics | ";
if ( value & QueueFlagBits::eCompute )
@ -13508,8 +13508,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SampleCountFlagBits::e1 )
result += "1 | ";
if ( value & SampleCountFlagBits::e2 )
@ -13573,8 +13573,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DeviceQueueCreateFlagBits::eProtected )
result += "Protected | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -13634,8 +13634,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & PipelineStageFlagBits::eTopOfPipe )
result += "TopOfPipe | ";
if ( value & PipelineStageFlagBits::eDrawIndirect )
@ -13750,8 +13750,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ImageAspectFlagBits::eColor )
result += "Color | ";
if ( value & ImageAspectFlagBits::eDepth )
@ -13818,8 +13818,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SparseImageFormatFlagBits::eSingleMiptail )
result += "SingleMiptail | ";
if ( value & SparseImageFormatFlagBits::eAlignedMipSize )
@ -13868,8 +13868,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SparseMemoryBindFlagBits::eMetadata )
result += "Metadata | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -13913,8 +13913,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & FenceCreateFlagBits::eSignaled )
result += "Signaled | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -13974,8 +13974,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & EventCreateFlagBits::eDeviceOnlyKHR )
result += "DeviceOnlyKHR | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -14030,8 +14030,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & QueryPipelineStatisticFlagBits::eInputAssemblyVertices )
result += "InputAssemblyVertices | ";
if ( value & QueryPipelineStatisticFlagBits::eInputAssemblyPrimitives )
@ -14106,8 +14106,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & QueryResultFlagBits::e64 )
result += "64 | ";
if ( value & QueryResultFlagBits::eWait )
@ -14163,8 +14163,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & BufferCreateFlagBits::eSparseBinding )
result += "SparseBinding | ";
if ( value & BufferCreateFlagBits::eSparseResidency )
@ -14233,8 +14233,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & BufferUsageFlagBits::eTransferSrc )
result += "TransferSrc | ";
if ( value & BufferUsageFlagBits::eTransferDst )
@ -14342,8 +14342,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT )
result += "FragmentDensityMapDynamicEXT | ";
if ( value & ImageViewCreateFlagBits::eFragmentDensityMapDeferredEXT )
@ -14397,8 +14397,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & PipelineCacheCreateFlagBits::eExternallySynchronizedEXT )
result += "ExternallySynchronizedEXT | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -14444,8 +14444,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ColorComponentFlagBits::eR )
result += "R | ";
if ( value & ColorComponentFlagBits::eG )
@ -14496,8 +14496,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & CullModeFlagBits::eFront )
result += "Front | ";
if ( value & CullModeFlagBits::eBack )
@ -14575,8 +14575,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & PipelineCreateFlagBits::eDisableOptimization )
result += "DisableOptimization | ";
if ( value & PipelineCreateFlagBits::eAllowDerivatives )
@ -14754,8 +14754,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSizeEXT )
result += "AllowVaryingSubgroupSizeEXT | ";
if ( value & PipelineShaderStageCreateFlagBits::eRequireFullSubgroupsEXT )
@ -14856,8 +14856,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ShaderStageFlagBits::eVertex )
result += "Vertex | ";
if ( value & ShaderStageFlagBits::eTessellationControl )
@ -14928,8 +14928,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SamplerCreateFlagBits::eSubsampledEXT )
result += "SubsampledEXT | ";
if ( value & SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT )
@ -14978,8 +14978,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DescriptorPoolCreateFlagBits::eFreeDescriptorSet )
result += "FreeDescriptorSet | ";
if ( value & DescriptorPoolCreateFlagBits::eUpdateAfterBind )
@ -15046,8 +15046,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool )
result += "UpdateAfterBindPool | ";
if ( value & DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR )
@ -15114,8 +15114,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & AccessFlagBits::eIndirectCommandRead )
result += "IndirectCommandRead | ";
if ( value & AccessFlagBits::eIndexRead )
@ -15214,8 +15214,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & AttachmentDescriptionFlagBits::eMayAlias )
result += "MayAlias | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -15260,8 +15260,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DependencyFlagBits::eByRegion )
result += "ByRegion | ";
if ( value & DependencyFlagBits::eDeviceGroup )
@ -15310,8 +15310,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & FramebufferCreateFlagBits::eImageless )
result += "Imageless | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -15356,8 +15356,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & RenderPassCreateFlagBits::eTransformQCOM )
result += "TransformQCOM | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -15405,8 +15405,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SubpassDescriptionFlagBits::ePerViewAttributesNVX )
result += "PerViewAttributesNVX | ";
if ( value & SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX )
@ -15459,8 +15459,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & CommandPoolCreateFlagBits::eTransient )
result += "Transient | ";
if ( value & CommandPoolCreateFlagBits::eResetCommandBuffer )
@ -15509,8 +15509,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & CommandPoolResetFlagBits::eReleaseResources )
result += "ReleaseResources | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -15555,8 +15555,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & CommandBufferResetFlagBits::eReleaseResources )
result += "ReleaseResources | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -15603,8 +15603,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & CommandBufferUsageFlagBits::eOneTimeSubmit )
result += "OneTimeSubmit | ";
if ( value & CommandBufferUsageFlagBits::eRenderPassContinue )
@ -15652,8 +15652,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & QueryControlFlagBits::ePrecise )
result += "Precise | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -15698,8 +15698,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & StencilFaceFlagBits::eFront )
result += "Front | ";
if ( value & StencilFaceFlagBits::eBack )
@ -15752,8 +15752,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SubgroupFeatureFlagBits::eBasic )
result += "Basic | ";
if ( value & SubgroupFeatureFlagBits::eVote )
@ -15817,8 +15817,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & PeerMemoryFeatureFlagBits::eCopySrc )
result += "CopySrc | ";
if ( value & PeerMemoryFeatureFlagBits::eCopyDst )
@ -15872,8 +15872,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & MemoryAllocateFlagBits::eDeviceMask )
result += "DeviceMask | ";
if ( value & MemoryAllocateFlagBits::eDeviceAddress )
@ -15975,8 +15975,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ExternalMemoryHandleTypeFlagBits::eOpaqueFd )
result += "OpaqueFd | ";
if ( value & ExternalMemoryHandleTypeFlagBits::eOpaqueWin32 )
@ -16051,8 +16051,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ExternalMemoryFeatureFlagBits::eDedicatedOnly )
result += "DedicatedOnly | ";
if ( value & ExternalMemoryFeatureFlagBits::eExportable )
@ -16106,8 +16106,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ExternalFenceHandleTypeFlagBits::eOpaqueFd )
result += "OpaqueFd | ";
if ( value & ExternalFenceHandleTypeFlagBits::eOpaqueWin32 )
@ -16161,8 +16161,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ExternalFenceFeatureFlagBits::eExportable )
result += "Exportable | ";
if ( value & ExternalFenceFeatureFlagBits::eImportable )
@ -16210,8 +16210,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & FenceImportFlagBits::eTemporary )
result += "Temporary | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -16258,8 +16258,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SemaphoreImportFlagBits::eTemporary )
result += "Temporary | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -16313,8 +16313,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd )
result += "OpaqueFd | ";
if ( value & ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32 )
@ -16374,8 +16374,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ExternalSemaphoreFeatureFlagBits::eExportable )
result += "Exportable | ";
if ( value & ExternalSemaphoreFeatureFlagBits::eImportable )
@ -16429,8 +16429,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DescriptorBindingFlagBits::eUpdateAfterBind )
result += "UpdateAfterBind | ";
if ( value & DescriptorBindingFlagBits::eUpdateUnusedWhilePending )
@ -16484,8 +16484,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ResolveModeFlagBits::eSampleZero )
result += "SampleZero | ";
if ( value & ResolveModeFlagBits::eAverage )
@ -16537,8 +16537,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SemaphoreWaitFlagBits::eAny )
result += "Any | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -16586,8 +16586,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & CompositeAlphaFlagBitsKHR::eOpaque )
result += "Opaque | ";
if ( value & CompositeAlphaFlagBitsKHR::ePreMultiplied )
@ -16642,8 +16642,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions )
result += "SplitInstanceBindRegions | ";
if ( value & SwapchainCreateFlagBitsKHR::eProtected )
@ -16695,8 +16695,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DeviceGroupPresentModeFlagBitsKHR::eLocal )
result += "Local | ";
if ( value & DeviceGroupPresentModeFlagBitsKHR::eRemote )
@ -16767,8 +16767,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DisplayPlaneAlphaFlagBitsKHR::eOpaque )
result += "Opaque | ";
if ( value & DisplayPlaneAlphaFlagBitsKHR::eGlobal )
@ -16842,8 +16842,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SurfaceTransformFlagBitsKHR::eIdentity )
result += "Identity | ";
if ( value & SurfaceTransformFlagBitsKHR::eRotate90 )
@ -17008,8 +17008,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DebugReportFlagBitsEXT::eInformation )
result += "Information | ";
if ( value & DebugReportFlagBitsEXT::eWarning )
@ -17070,8 +17070,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
# if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & VideoCodecOperationFlagBitsKHR::eEncodeH264EXT )
result += "EncodeH264EXT | ";
@ -17129,8 +17129,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoChromaSubsamplingFlagBitsKHR::eMonochrome )
result += "Monochrome | ";
if ( value & VideoChromaSubsamplingFlagBitsKHR::e420 )
@ -17183,8 +17183,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoComponentBitDepthFlagBitsKHR::e8 )
result += "8 | ";
if ( value & VideoComponentBitDepthFlagBitsKHR::e10 )
@ -17234,8 +17234,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoCapabilitiesFlagBitsKHR::eProtectedContent )
result += "ProtectedContent | ";
if ( value & VideoCapabilitiesFlagBitsKHR::eSeparateReferenceImages )
@ -17283,8 +17283,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoSessionCreateFlagBitsKHR::eProtectedContent )
result += "ProtectedContent | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -17361,8 +17361,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoCodingControlFlagBitsKHR::eReset )
result += "Reset | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -17410,8 +17410,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoCodingQualityPresetFlagBitsKHR::eNormal )
result += "Normal | ";
if ( value & VideoCodingQualityPresetFlagBitsKHR::ePower )
@ -17464,8 +17464,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoDecodeFlagBitsKHR::eReserved0 )
result += "Reserved0 | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -17543,8 +17543,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityCabac )
result += "VkVideoEncodeH264CapabilityCabac | ";
if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityCavlc )
@ -17611,8 +17611,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeFrame )
result += "VkVideoEncodeH264InputModeFrame | ";
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeSlice )
@ -17663,8 +17663,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeFrame )
result += "VkVideoEncodeH264OutputModeFrame | ";
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeSlice )
@ -17714,8 +17714,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoEncodeH264CreateFlagBitsEXT::eVkVideoEncodeH264CreateReserved0 )
result += "VkVideoEncodeH264CreateReserved0 | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -17766,8 +17766,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264FieldLayoutLineInterlacedPlane )
result += "VkVideoDecodeH264FieldLayoutLineInterlacedPlane | ";
if ( value & VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264FieldLayoutSeparateInterlacedPlane )
@ -17856,8 +17856,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32 )
result += "OpaqueWin32 | ";
if ( value & ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt )
@ -17910,8 +17910,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly )
result += "DedicatedOnly | ";
if ( value & ExternalMemoryFeatureFlagBitsNV::eExportable )
@ -17982,8 +17982,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ConditionalRenderingFlagBitsEXT::eInverted )
result += "Inverted | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -18030,8 +18030,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SurfaceCounterFlagBitsEXT::eVblank )
result += "Vblank | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -18152,8 +18152,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting )
result += "PerformanceImpacting | ";
if ( value & PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted )
@ -18252,8 +18252,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eVerbose )
result += "Verbose | ";
if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eInfo )
@ -18306,8 +18306,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DebugUtilsMessageTypeFlagBitsEXT::eGeneral )
result += "General | ";
if ( value & DebugUtilsMessageTypeFlagBitsEXT::eValidation )
@ -18409,8 +18409,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & GeometryFlagBitsKHR::eOpaque )
result += "Opaque | ";
if ( value & GeometryFlagBitsKHR::eNoDuplicateAnyHitInvocation )
@ -18462,8 +18462,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable )
result += "TriangleFacingCullDisable | ";
if ( value & GeometryInstanceFlagBitsKHR::eTriangleFrontCounterclockwise )
@ -18520,8 +18520,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowUpdate )
result += "AllowUpdate | ";
if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowCompaction )
@ -18574,8 +18574,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & AccelerationStructureCreateFlagBitsKHR::eDeviceAddressCaptureReplay )
result += "DeviceAddressCaptureReplay | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -18689,8 +18689,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & PipelineCreationFeedbackFlagBitsEXT::eValid )
result += "Valid | ";
if ( value & PipelineCreationFeedbackFlagBitsEXT::eApplicationPipelineCacheHit )
@ -18793,8 +18793,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & ToolPurposeFlagBitsEXT::eValidation )
result += "Validation | ";
if ( value & ToolPurposeFlagBitsEXT::eProfiling )
@ -18889,8 +18889,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & IndirectStateFlagBitsNV::eFlagFrontface )
result += "FlagFrontface | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -18937,8 +18937,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eExplicitPreprocess )
result += "ExplicitPreprocess | ";
if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eIndexedSequences )
@ -19017,8 +19017,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoEncodeFlagBitsKHR::eReserved0 )
result += "Reserved0 | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -19064,8 +19064,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & VideoEncodeRateControlFlagBitsKHR::eReset )
result += "Reset | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
@ -19112,8 +19112,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@ -19161,8 +19161,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderDebugInfo )
result += "EnableShaderDebugInfo | ";
if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableResourceTracking )
@ -19242,8 +19242,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & PipelineStageFlagBits2KHR::eTopOfPipe )
result += "TopOfPipe | ";
if ( value & PipelineStageFlagBits2KHR::eDrawIndirect )
@ -19385,8 +19385,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & AccessFlagBits2KHR::eIndirectCommandRead )
result += "IndirectCommandRead | ";
if ( value & AccessFlagBits2KHR::eIndexRead )
@ -19506,8 +19506,8 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( !value )
return "{}";
std::string result;
std::string result;
if ( value & SubmitFlagBitsKHR::eProtected )
result += "Protected | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";