MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Hpp / parseSyncPipeline

Function parseSyncPipeline

generator/VkXMLParser.cpp:2334–2372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2332}
2333
2334SyncPipeline parseSyncPipeline( tinyxml2::XMLElement const * element )
2335{
2336 int const line = element->GetLineNum();
2337 std::map<std::string, std::string> attributes = getAttributes( element );
2338 checkAttributes( "vk.xml", line, attributes, { { "name", {} } }, { { "depends", {} } } );
2339 std::vector<tinyxml2::XMLElement const *> children = getChildElements( element );
2340 checkElements( "vk.xml", line, children, {}, { { "syncpipelinestage", MultipleAllowed::Yes } } );
2341
2342 SyncPipeline syncPipeline{ .xmlLine = line };
2343 for ( auto const & attribute : attributes )
2344 {
2345 if ( attribute.first == "depends" )
2346 {
2347 syncPipeline.depends = tokenize( attribute.second, "," );
2348 // CHECK: depends after extensions
2349 }
2350 else if ( attribute.first == "name" )
2351 {
2352 checkNoList( attribute.second, line );
2353 syncPipeline.name = attribute.second;
2354 }
2355 }
2356
2357 for ( auto const & child : children )
2358 {
2359 std::string value = child->Value();
2360 if ( value == "syncpipelinestage" )
2361 {
2362 SyncPipelineStage syncPipelineStage = parseSyncPipelineStage( child );
2363 checkForError( "vk.xml",
2364 !containsByName( syncPipeline.stages, syncPipelineStage.name ),
2365 syncPipelineStage.xmlLine,
2366 "syncpipelinestage <" + syncPipelineStage.name + "> already listed for syncpipeline <" + syncPipeline.name + ">" );
2367 syncPipeline.stages.push_back( std::move( syncPipelineStage ) );
2368 }
2369 }
2370
2371 return syncPipeline;
2372}
2373
2374SyncPipelineStage parseSyncPipelineStage( tinyxml2::XMLElement const * element )
2375{

Callers 1

parseSyncFunction · 0.85

Calls 9

getAttributesFunction · 0.85
checkAttributesFunction · 0.85
getChildElementsFunction · 0.85
checkElementsFunction · 0.85
tokenizeFunction · 0.85
checkNoListFunction · 0.85
parseSyncPipelineStageFunction · 0.85
checkForErrorFunction · 0.85
containsByNameFunction · 0.85

Tested by

no test coverage detected