| 2332 | } |
| 2333 | |
| 2334 | SyncPipeline 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 | |
| 2374 | SyncPipelineStage parseSyncPipelineStage( tinyxml2::XMLElement const * element ) |
| 2375 | { |
no test coverage detected