mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #1368 from asuessenbach/function
Add support for functions returning void, that get you a some data behind a void *.
This commit is contained in:
commit
0fbe74f6fc
@ -36,7 +36,7 @@ std::string decodeDriverVersion( uint32_t driverVersion, uint32_t vendorID )
|
||||
{
|
||||
switch ( vendorID )
|
||||
{
|
||||
case 4318:
|
||||
case 0x10DE:
|
||||
return std::to_string( ( driverVersion >> 22 ) & 0x3FF ) + "." + std::to_string( ( driverVersion >> 14 ) & 0xFF ) + "." +
|
||||
std::to_string( ( driverVersion >> 6 ) & 0xFF ) + "." + std::to_string( driverVersion & 0x3F );
|
||||
case 0x8086: return std::to_string( ( driverVersion >> 14 ) & 0x3FFFF ) + "." + std::to_string( ( driverVersion & 0x3FFF ) );
|
||||
|
@ -4710,18 +4710,25 @@ std::string VulkanHppGenerator::generateCommandVoid1Return(
|
||||
}
|
||||
else if ( commandData.params[returnParam].type.type == "void" )
|
||||
{
|
||||
if ( vectorParams.size() == 1 )
|
||||
switch ( vectorParams.size() )
|
||||
{
|
||||
if ( returnParam == vectorParams.begin()->first )
|
||||
{
|
||||
if ( name == stripPluralS( name ) )
|
||||
case 0:
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandEnhanced( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false, false ) );
|
||||
case 1:
|
||||
if ( returnParam == vectorParams.begin()->first )
|
||||
{
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandEnhanced( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false, false ) );
|
||||
if ( name == stripPluralS( name ) )
|
||||
{
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandEnhanced( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -7057,15 +7064,18 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid( std::map<std::str
|
||||
}
|
||||
else if ( commandIt->second.params[returnParams[0]].type.type == "void" )
|
||||
{
|
||||
if ( vectorParams.size() == 1 )
|
||||
switch ( vectorParams.size() )
|
||||
{
|
||||
if ( returnParams[0] == vectorParams.begin()->first )
|
||||
{
|
||||
if ( commandIt->first == stripPluralS( commandIt->first ) )
|
||||
case 0: str = generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition, false, false ); break;
|
||||
case 1:
|
||||
if ( returnParams[0] == vectorParams.begin()->first )
|
||||
{
|
||||
str = generateRAIIHandleCommandVoid1ReturnVoidVectorSingular( commandIt, initialSkipCount, vectorParams, returnParams[0], definition );
|
||||
if ( commandIt->first == stripPluralS( commandIt->first ) )
|
||||
{
|
||||
str = generateRAIIHandleCommandVoid1ReturnVoidVectorSingular( commandIt, initialSkipCount, vectorParams, returnParams[0], definition );
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user