diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index e4f2154..9a26a6d 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -4237,6 +4237,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors( case 0: return generateCommandResultWithErrors0Return( name, commandData, initialSkipCount, definition, raii ); case 1: return generateCommandResultSingleSuccessWithErrors1Return( name, commandData, initialSkipCount, definition, returnParams[0], raii ); case 2: return generateCommandResultSingleSuccessWithErrors2Return( name, commandData, initialSkipCount, definition, returnParams, raii ); + case 3: return generateCommandResultSingleSuccessWithErrors3Return( name, commandData, initialSkipCount, definition, returnParams, raii ); default: break; } return ""; @@ -4523,6 +4524,41 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors2Ret return ""; } +std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors3Return( std::string const & name, + CommandData const & commandData, + size_t initialSkipCount, + bool definition, + std::vector const & returnParams, + bool raii ) const +{ + if ( ( commandData.params[returnParams[0]].type.type != "void" ) && !isHandleType( commandData.params[returnParams[0]].type.type ) && + !isStructureChainAnchor( commandData.params[returnParams[0]].type.type ) && commandData.params[returnParams[0]].lenParams.empty() && + ( commandData.params[returnParams[1]].type.type == "size_t" ) && commandData.params[returnParams[1]].lenParams.empty() && + ( commandData.params[returnParams[2]].type.type == "void" ) && + ( commandData.params[returnParams[2]].lenExpression == commandData.params[returnParams[1]].name ) ) + { + std::map vectorParams = determineVectorParams( commandData.params ); + if ( vectorParams.size() == 1 ) + { + if ( ( returnParams[2] == vectorParams.begin()->first ) && ( returnParams[1] == vectorParams.begin()->second.lenParam ) ) + { + return generateCommandSetInclusive( name, + commandData, + initialSkipCount, + definition, + returnParams, + vectorParams, + false, + { CommandFlavourFlagBits::enhanced, CommandFlavourFlagBits::withAllocator }, + raii, + false, + { CommandFlavourFlagBits::enhanced } ); + } + } + } + return ""; +} + std::string VulkanHppGenerator::generateCommandResultWithErrors0Return( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const { diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index e10d01a..1329bda 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -612,6 +612,12 @@ private: bool definition, std::vector const & returnParamIndices, bool raii ) const; + std::string generateCommandResultSingleSuccessWithErrors3Return( std::string const & name, + CommandData const & commandData, + size_t initialSkipCount, + bool definition, + std::vector const & returnParamIndices, + bool raii ) const; std::string generateCommandResultWithErrors0Return( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const; std::string generateCommandSet( bool definition,