Skip to content

Commit

Permalink
Fix command sequence for enumerating commands with just one success c…
Browse files Browse the repository at this point in the history
…ode.
  • Loading branch information
asuessenbach committed Jun 12, 2024
1 parent dc65014 commit 8856e60
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions VulkanHppGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3283,10 +3283,13 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const &
{
case 1:
{
assert( commandData.successCodes[0] == "VK_SUCCESS" );
std::string const callSequenceTemplate = R"(${dispatcher}${vkCommand}( ${firstCallArguments} );
${resizes}
${dispatcher}${vkCommand}( ${secondCallArguments} );
assert( ( commandData.successCodes[0] == "VK_SUCCESS" ) && !commandData.errorCodes.empty() );
std::string const callSequenceTemplate = R"(VULKAN_HPP_NAMESPACE::Result result = ${dispatcher}${vkCommand}( ${firstCallArguments} );
if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
{
${resizes}
${dispatcher}${vkCommand}( ${secondCallArguments} );
}
)";

return replaceWithMap( callSequenceTemplate,
Expand Down

0 comments on commit 8856e60

Please sign in to comment.