mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Fix command sequence for enumerating commands with just one success code. (#1900)
This commit is contained in:
parent
235b1a2f85
commit
66af8942cb
@ -3282,13 +3282,31 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const &
|
|||||||
switch ( commandData.successCodes.size() )
|
switch ( commandData.successCodes.size() )
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
assert( commandData.successCodes[0] == "VK_SUCCESS" );
|
||||||
|
if ( commandData.errorCodes.empty() )
|
||||||
{
|
{
|
||||||
assert( commandData.successCodes[0] == "VK_SUCCESS" );
|
|
||||||
std::string const callSequenceTemplate = R"(${dispatcher}${vkCommand}( ${firstCallArguments} );
|
std::string const callSequenceTemplate = R"(${dispatcher}${vkCommand}( ${firstCallArguments} );
|
||||||
${resizes}
|
${resizes}
|
||||||
${dispatcher}${vkCommand}( ${secondCallArguments} );
|
${dispatcher}${vkCommand}( ${secondCallArguments} );
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
return replaceWithMap( callSequenceTemplate,
|
||||||
|
{ { "dispatcher", dispatcher },
|
||||||
|
{ "firstCallArguments", firstCallArguments },
|
||||||
|
{ "secondCallArguments", secondCallArguments },
|
||||||
|
{ "resizes", resizes },
|
||||||
|
{ "vkCommand", name } } );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::string const callSequenceTemplate = R"(VULKAN_HPP_NAMESPACE::Result result = ${dispatcher}${vkCommand}( ${firstCallArguments} );
|
||||||
|
if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess )
|
||||||
|
{
|
||||||
|
${resizes}
|
||||||
|
result = ${dispatcher}${vkCommand}( ${secondCallArguments} );
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
|
||||||
return replaceWithMap( callSequenceTemplate,
|
return replaceWithMap( callSequenceTemplate,
|
||||||
{ { "dispatcher", dispatcher },
|
{ { "dispatcher", dispatcher },
|
||||||
{ "firstCallArguments", firstCallArguments },
|
{ "firstCallArguments", firstCallArguments },
|
||||||
|
Loading…
Reference in New Issue
Block a user