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