mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-10 04:18:48 -04:00
Add support for a new type of functions. (#1492)
This commit is contained in:
parent
6bae28a680
commit
db11b8b62b
@ -7070,16 +7070,33 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid( std::map<std::str
|
|||||||
{
|
{
|
||||||
case 0: return generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition );
|
case 0: return generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition );
|
||||||
case 1:
|
case 1:
|
||||||
|
if ( commandIt->second.params[returnParams[0]].type.type == "void" )
|
||||||
|
{
|
||||||
if ( commandIt->second.params[returnParams[0]].type.postfix == "**" )
|
if ( commandIt->second.params[returnParams[0]].type.postfix == "**" )
|
||||||
{
|
{
|
||||||
// get a pointer to something
|
// get a pointer to something
|
||||||
if ( commandIt->second.params[returnParams[0]].type.type == "void" )
|
|
||||||
{
|
|
||||||
if ( vectorParams.empty() )
|
if ( vectorParams.empty() )
|
||||||
{
|
{
|
||||||
return generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition );
|
return generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch ( vectorParams.size() )
|
||||||
|
{
|
||||||
|
case 0: return generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition );
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
auto returnVectorParamIt = vectorParams.find( returnParams[0] );
|
||||||
|
if ( returnVectorParamIt != vectorParams.end() )
|
||||||
|
{
|
||||||
|
return generateRAIIHandleCommandEnhanced(
|
||||||
|
commandIt, initialSkipCount, returnParams, vectorParams, definition, CommandFlavourFlagBits::singular );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( isHandleType( commandIt->second.params[returnParams[0]].type.type ) )
|
else if ( isHandleType( commandIt->second.params[returnParams[0]].type.type ) )
|
||||||
{
|
{
|
||||||
@ -7088,10 +7105,6 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid( std::map<std::str
|
|||||||
return generateRAIIHandleCommandFactory( commandIt, initialSkipCount, returnParams, vectorParams, definition );
|
return generateRAIIHandleCommandFactory( commandIt, initialSkipCount, returnParams, vectorParams, definition );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( commandIt->second.params[returnParams[0]].type.type == "void" )
|
|
||||||
{
|
|
||||||
return generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition, CommandFlavourFlagBits::singular );
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto returnVectorParamIt = vectorParams.find( returnParams[0] );
|
auto returnVectorParamIt = vectorParams.find( returnParams[0] );
|
||||||
@ -11706,7 +11719,8 @@ std::pair<VulkanHppGenerator::NameData, VulkanHppGenerator::TypeInfo> VulkanHppG
|
|||||||
( strcmp( child->NextSibling()->Value(), "]" ) == 0 ),
|
( strcmp( child->NextSibling()->Value(), "]" ) == 0 ),
|
||||||
line,
|
line,
|
||||||
std::string( "array specifiation is ill-formatted: <" ) + nameData.arraySizes.back() + ">" );
|
std::string( "array specifiation is ill-formatted: <" ) + nameData.arraySizes.back() + ">" );
|
||||||
checkForError( m_constants.find( nameData.arraySizes.back() ) != m_constants.end(), line, "using unknown enum value <" + nameData.arraySizes.back() + ">" );
|
checkForError(
|
||||||
|
m_constants.find( nameData.arraySizes.back() ) != m_constants.end(), line, "using unknown enum value <" + nameData.arraySizes.back() + ">" );
|
||||||
}
|
}
|
||||||
else if ( value == "name" )
|
else if ( value == "name" )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user