Skip to content

Commit 819b710

Browse files
committed
Add raii-standard implementations for functions getting some externally sized void-data
1 parent 24a864e commit 819b710

File tree

2 files changed

+207
-0
lines changed

2 files changed

+207
-0
lines changed

VulkanHppGenerator.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4310,6 +4310,16 @@ std::string VulkanHppGenerator::generateCommandSetInclusive( std::string const &
43104310
}
43114311
else
43124312
{
4313+
if ( std::ranges::any_of( vectorParams,
4314+
[&commandData, &returnParams]( std::pair<size_t, VectorParamData> const & vpd )
4315+
{
4316+
return ( commandData.params[vpd.first].type.type == "void" ) &&
4317+
std::ranges::none_of( returnParams, [&vpd]( size_t returnParam ) { return vpd.second.lenParam == returnParam; } );
4318+
} ) )
4319+
{
4320+
// Functions taking a vector with data type void and the len for that data is not returned (no enumeration) need the standard implementation as well
4321+
raiiCommands = generateRAIIHandleCommandStandard( name, commandData, initialSkipCount, definition, raii );
4322+
}
43134323
for ( auto flag : raiiFlags )
43144324
{
43154325
bool const noReturn = flag & CommandFlavourFlagBits::noReturn;

0 commit comments

Comments
 (0)