mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Add support for command argument attribute "len" with value "1". (#1789)
This commit is contained in:
parent
fdf975364b
commit
6bdba3ef31
@ -2036,7 +2036,7 @@ std::map<size_t, VulkanHppGenerator::VectorParamData> VulkanHppGenerator::determ
|
|||||||
// look for the parameters whose len equals the name of an other parameter
|
// look for the parameters whose len equals the name of an other parameter
|
||||||
for ( size_t i = 0; i < params.size(); i++ )
|
for ( size_t i = 0; i < params.size(); i++ )
|
||||||
{
|
{
|
||||||
if ( !params[i].lenExpression.empty() && ( params[i].lenExpression != "null-terminated" ) )
|
if ( !params[i].lenExpression.empty() && ( params[i].lenExpression != "null-terminated" ) && ( params[i].lenExpression != "1" ) )
|
||||||
{
|
{
|
||||||
VectorParamData & vpd = vectorParams[i];
|
VectorParamData & vpd = vectorParams[i];
|
||||||
|
|
||||||
@ -2914,7 +2914,7 @@ std::string VulkanHppGenerator::generateCallArgumentEnhancedNonConstPointer( Par
|
|||||||
{
|
{
|
||||||
std::string argument;
|
std::string argument;
|
||||||
std::string name = startLowerCase( stripPrefix( param.name, "p" ) );
|
std::string name = startLowerCase( stripPrefix( param.name, "p" ) );
|
||||||
if ( param.lenExpression.empty() )
|
if ( param.lenExpression.empty() || ( param.lenExpression == "1" ) )
|
||||||
{
|
{
|
||||||
assert( param.arraySizes.empty() );
|
assert( param.arraySizes.empty() );
|
||||||
if ( param.type.type.starts_with( "Vk" ) )
|
if ( param.type.type.starts_with( "Vk" ) )
|
||||||
@ -12813,7 +12813,7 @@ std::pair<bool, VulkanHppGenerator::ParamData> VulkanHppGenerator::readCommandPa
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
checkForError( ( attribute.second == "null-terminated" ) || isLenByStructMember( attribute.second, params ),
|
checkForError( ( attribute.second == "null-terminated" ) || ( attribute.second == "1" ) || isLenByStructMember( attribute.second, params ),
|
||||||
line,
|
line,
|
||||||
"attribute <len> holds an unknown value <" + attribute.second + ">" );
|
"attribute <len> holds an unknown value <" + attribute.second + ">" );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user