mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-27 06:10:08 +00:00
Merge pull request #1272 from asuessenbach/function
Combine two types of commands into one generation function.
This commit is contained in:
commit
94dd2f6e02
@ -2263,6 +2263,32 @@ std::vector<VulkanHppGenerator::MemberData>::const_iterator VulkanHppGenerator::
|
||||
return std::find_if( memberData.begin(), memberData.end(), [&type]( MemberData const & md ) { return md.type.type == type; } );
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateAllocatorTemplates( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
bool definition,
|
||||
bool singular ) const
|
||||
{
|
||||
std::string allocatorTemplates;
|
||||
if ( !singular )
|
||||
{
|
||||
for ( auto returnParam : returnParams )
|
||||
{
|
||||
if ( vectorParams.find( returnParam ) != vectorParams.end() )
|
||||
{
|
||||
std::string elementType = stripPrefix( commandData.params[returnParam].type.type, "Vk" );
|
||||
allocatorTemplates += "typename " + elementType + "Allocator";
|
||||
if ( !definition )
|
||||
{
|
||||
allocatorTemplates += " = std::allocator<" + elementType + ">";
|
||||
}
|
||||
allocatorTemplates += ", ";
|
||||
}
|
||||
}
|
||||
}
|
||||
return allocatorTemplates;
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateArgumentListEnhanced( std::vector<ParamData> const & params,
|
||||
std::set<size_t> const & skippedParams,
|
||||
std::set<size_t> const & singularParams,
|
||||
@ -3617,17 +3643,17 @@ std::string VulkanHppGenerator::generateCommandResultGetVector( std::string cons
|
||||
std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags );
|
||||
std::string nodiscard = generateNoDiscard( true, 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
||||
std::string dataType = stripPrefix( commandData.params[*templatedParams.begin()].name, "p" ) + "Type";
|
||||
std::string returnType = generateReturnType( commandData, { returnParam }, false, "std::vector<" + dataType + ", Allocator>" );
|
||||
std::string returnType = generateReturnType( commandData, { returnParam }, vectorParams, false, false, false, dataType );
|
||||
|
||||
if ( definition )
|
||||
{
|
||||
std::string const functionTemplate =
|
||||
R"( template <typename ${dataType}, typename Allocator, typename Dispatch>
|
||||
R"( template <typename ${dataType}, typename ${dataType}Allocator, typename Dispatch>
|
||||
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
VULKAN_HPP_ASSERT( ${dataSize} % sizeof( ${dataType} ) == 0 );
|
||||
std::vector<${dataType},Allocator> ${dataName}( ${dataSize} / sizeof( ${dataType} ) );
|
||||
std::vector<${dataType},${dataType}Allocator> ${dataName}( ${dataSize} / sizeof( ${dataType} ) );
|
||||
Result result = static_cast<Result>( d.${vkCommand}( ${callArguments} ) );
|
||||
return createResultValue( result, ${dataName}, VULKAN_HPP_NAMESPACE_STRING "::${className}${classSeparator}${commandName}"${successCodeList} );
|
||||
})";
|
||||
@ -3649,7 +3675,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVector( std::string cons
|
||||
else
|
||||
{
|
||||
std::string const functionTemplate =
|
||||
R"( template <typename ${dataType}, typename Allocator = std::allocator<${dataType}>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
R"( template <typename ${dataType}, typename ${dataType}Allocator = std::allocator<${dataType}>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
${nodiscard}${returnType} ${commandName}( ${argumentList} ) const;)";
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
@ -3680,7 +3706,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorAndValue( std::str
|
||||
std::string argumentList = generateArgumentListEnhanced( commandData.params, skippedParams, {}, {}, definition, withAllocator, false, true );
|
||||
std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags );
|
||||
std::string nodiscard = generateNoDiscard( !returnParams.empty(), 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
||||
std::string returnType = generateReturnType( commandData, returnParams, false, "std::vector<T, Allocator>" );
|
||||
std::string returnType = generateReturnType( commandData, returnParams, vectorParams, false, false, false, "T" );
|
||||
std::string vectorElementType = stripPostfix( commandData.params[returnParams[0]].type.compose( "VULKAN_HPP_NAMESPACE" ), " *" );
|
||||
std::string allocatorType = startUpperCase( vectorElementType ) + "Allocator";
|
||||
std::string valueType = stripPostfix( commandData.params[returnParams[1]].type.compose( "VULKAN_HPP_NAMESPACE" ), " *" );
|
||||
@ -3741,77 +3767,6 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorAndValue( std::str
|
||||
}
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesOrValues( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
bool definition,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
size_t returnParam,
|
||||
bool withAllocator ) const
|
||||
{
|
||||
assert( commandData.returnType == "VkResult" );
|
||||
|
||||
std::set<size_t> skippedParams = determineSkippedParams( commandData.params, initialSkipCount, vectorParams, { returnParam }, false );
|
||||
std::string argumentList = generateArgumentListEnhanced( commandData.params, skippedParams, {}, {}, definition, withAllocator, false, true );
|
||||
std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags );
|
||||
std::string nodiscard = generateNoDiscard( true, 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
||||
assert( beginsWith( commandData.params[returnParam].type.type, "Vk" ) );
|
||||
std::string elementType = stripPrefix( commandData.params[returnParam].type.type, "Vk" );
|
||||
std::string returnType =
|
||||
generateReturnType( commandData, { returnParam }, false, "std::vector<VULKAN_HPP_NAMESPACE::" + elementType + ", " + elementType + "Allocator>" );
|
||||
|
||||
if ( definition )
|
||||
{
|
||||
std::string const functionTemplate =
|
||||
R"( template <typename ${elementType}Allocator, typename Dispatch${typenameCheck}>
|
||||
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
std::vector<VULKAN_HPP_NAMESPACE::${elementType}, ${elementType}Allocator> ${vectorName}( ${vectorSize}${vectorAllocator} );
|
||||
Result result = static_cast<Result>( d.${vkCommand}( ${callArguments} ) );
|
||||
return createResultValue( result, ${vectorName}, VULKAN_HPP_NAMESPACE_STRING "::${className}${classSeparator}${commandName}"${successCodeList} );
|
||||
})";
|
||||
|
||||
std::string typenameCheck =
|
||||
withAllocator ? ( ", typename B, typename std::enable_if<std::is_same<typename B::value_type, " + elementType + ">::value, int>::type " ) : "";
|
||||
std::string vectorName = startLowerCase( stripPrefix( commandData.params[returnParam].name, "p" ) );
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
{ { "argumentList", argumentList },
|
||||
{ "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, {}, false ) },
|
||||
{ "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" },
|
||||
{ "classSeparator", commandData.handle.empty() ? "" : "::" },
|
||||
{ "commandName", commandName },
|
||||
{ "elementType", elementType },
|
||||
{ "nodiscard", nodiscard },
|
||||
{ "returnType", returnType },
|
||||
{ "typenameCheck", typenameCheck },
|
||||
{ "successCodeList", generateSuccessCodeList( commandData.successCodes ) },
|
||||
{ "vectorAllocator", withAllocator ? ( ", " + startLowerCase( elementType ) + "Allocator" ) : "" },
|
||||
{ "vectorName", vectorName },
|
||||
{ "vectorSize", getVectorSize( commandData.params, vectorParams, returnParam ) },
|
||||
{ "vkCommand", name } } );
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string const functionTemplate =
|
||||
R"( template <typename ${elementType}Allocator = std::allocator<${elementType}>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${typenameCheck}>
|
||||
${nodiscard}${returnType} ${commandName}( ${argumentList} ) const;)";
|
||||
|
||||
std::string typenameCheck = withAllocator ? ( ", typename B = " + elementType + "Allocator, typename std::enable_if<std::is_same<typename B::value_type, " +
|
||||
elementType + ">::value, int>::type = 0" )
|
||||
: "";
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
{ { "argumentList", argumentList },
|
||||
{ "commandName", commandName },
|
||||
{ "elementType", elementType },
|
||||
{ "nodiscard", nodiscard },
|
||||
{ "returnType", returnType },
|
||||
{ "typenameCheck", typenameCheck } } );
|
||||
}
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesUnique( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
@ -3827,8 +3782,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesUnique( s
|
||||
std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags );
|
||||
std::string nodiscard = generateNoDiscard( true, 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
||||
std::string handleType = stripPrefix( commandData.params[returnParam].type.type, "Vk" );
|
||||
std::string returnType =
|
||||
generateReturnType( commandData, { returnParam }, false, "std::vector<UniqueHandle<" + handleType + ", Dispatch>, " + handleType + "Allocator>" );
|
||||
std::string returnType = generateReturnType( commandData, { returnParam }, vectorParams, false, true, false, handleType );
|
||||
|
||||
if ( definition )
|
||||
{
|
||||
@ -3935,7 +3889,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesUniqueSin
|
||||
std::string commandName = stripPluralS( generateCommandName( name, commandData.params, initialSkipCount, m_tags ) );
|
||||
std::string nodiscard = generateNoDiscard( true, 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
||||
std::string handleType = stripPrefix( commandData.params[returnParam].type.type, "Vk" );
|
||||
std::string returnType = generateReturnType( commandData, { returnParam }, false, "UniqueHandle<" + handleType + ", Dispatch>" );
|
||||
std::string returnType = generateReturnType( commandData, { returnParam }, vectorParams, true, true, false, handleType );
|
||||
|
||||
if ( definition )
|
||||
{
|
||||
@ -4005,7 +3959,7 @@ std::string VulkanHppGenerator::generateCommandResultMultiSuccessNoErrors0Return
|
||||
if ( constPointerParams.empty() )
|
||||
{
|
||||
return generateCommandSetStandardOrEnhanced( generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, {}, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, {}, false, false, false ) );
|
||||
}
|
||||
}
|
||||
return "";
|
||||
@ -4074,7 +4028,7 @@ std::string VulkanHppGenerator::generateCommandResultMultiSuccessWithErrors1Retu
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultGetVector( name, commandData, initialSkipCount, definition, vectorParams, returnParam ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4095,9 +4049,9 @@ std::string VulkanHppGenerator::generateCommandResultMultiSuccessWithErrors1Retu
|
||||
return generateCommandSetStandardEnhancedWithAllocatorSingularUnique(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultGetVectorOfHandlesOrValues( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
||||
generateCommandResultGetVectorOfHandlesOrValues( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, true, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false ),
|
||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
||||
generateCommandResultGetVectorOfHandlesUniqueSingular( name, commandData, initialSkipCount, definition, vectorParams, returnParam ) );
|
||||
@ -4115,7 +4069,7 @@ std::string VulkanHppGenerator::generateCommandResultMultiSuccessWithErrors1Retu
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ) );
|
||||
}
|
||||
}
|
||||
return "";
|
||||
@ -4179,7 +4133,7 @@ std::string VulkanHppGenerator::generateCommandResultMultiSuccessWithErrors2Retu
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, returnParams, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, returnParams, false, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4240,7 +4194,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessNoErrors( std:
|
||||
if ( constPointerParams.empty() )
|
||||
{
|
||||
return generateCommandSetStandardOrEnhanced( generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, {}, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, {}, false, false, false ) );
|
||||
}
|
||||
}
|
||||
else if ( vectorParams.size() == 1 )
|
||||
@ -4249,9 +4203,10 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessNoErrors( std:
|
||||
{
|
||||
if ( isHandleType( commandData.params[vectorParams.begin()->first].type.type ) )
|
||||
{
|
||||
return generateCommandSetStandardEnhanced( definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, {}, false, false ) );
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, {}, false, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4304,7 +4259,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
return generateCommandSetStandardEnhancedChained(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ),
|
||||
generateCommandResultGetChain( name, commandData, initialSkipCount, definition, returnParam ) );
|
||||
}
|
||||
return "";
|
||||
@ -4320,7 +4275,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
return generateCommandSetStandardEnhancedUnique(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ),
|
||||
generateCommandResultGetHandleUnique( name, commandData, initialSkipCount, definition, returnParam ) );
|
||||
break;
|
||||
case 1:
|
||||
@ -4348,8 +4303,8 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
return generateCommandSetStandardEnhancedWithAllocatorUnique(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultGetVectorOfHandlesOrValues( name, commandData, initialSkipCount, definition, { vectorParamIndex }, returnParam, false ),
|
||||
generateCommandResultGetVectorOfHandlesOrValues( name, commandData, initialSkipCount, definition, { vectorParamIndex }, returnParam, true ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, { vectorParamIndex }, { returnParam }, false, false, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, { vectorParamIndex }, { returnParam }, false, true, false ),
|
||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, { vectorParamIndex }, returnParam, false ),
|
||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, { vectorParamIndex }, returnParam, true ) );
|
||||
}
|
||||
@ -4375,9 +4330,9 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
return generateCommandSetStandardEnhancedWithAllocatorSingularUnique(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultGetVectorOfHandlesOrValues( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
||||
generateCommandResultGetVectorOfHandlesOrValues( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, true, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false ),
|
||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
||||
generateCommandResultGetVectorOfHandlesUniqueSingular( name, commandData, initialSkipCount, definition, vectorParams, returnParam ) );
|
||||
@ -4398,7 +4353,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ) );
|
||||
case 2:
|
||||
return generateCommandResultSingleSuccessWithErrors1ReturnValue2Vectors( name, commandData, initialSkipCount, definition, returnParam, vectorParams );
|
||||
break;
|
||||
@ -4426,9 +4381,9 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
return generateCommandSetStandardEnhancedWithAllocatorSingular(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultGetVectorOfHandlesOrValues( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
||||
generateCommandResultGetVectorOfHandlesOrValues( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, true, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4446,7 +4401,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ) );
|
||||
break;
|
||||
case 1:
|
||||
if ( returnParam == vectorParams.begin()->first )
|
||||
@ -4457,7 +4412,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultGetVector( name, commandData, initialSkipCount, definition, vectorParams, returnParam ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -4476,7 +4431,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultGetVector( name, commandData, initialSkipCount, definition, vectorParams, returnParam ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4537,14 +4492,16 @@ std::string VulkanHppGenerator::generateCommandResultWithErrors0Return( std::str
|
||||
std::map<size_t, size_t> vectorParams = determineVectorParams( commandData.params );
|
||||
if ( vectorParams.empty() && determineConstPointerParams( commandData.params ).empty() )
|
||||
{
|
||||
return generateCommandSetStandardOrEnhanced( generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, {}, false, false ) );
|
||||
return generateCommandSetStandardOrEnhanced(
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, {}, false, false, false ) );
|
||||
}
|
||||
else if ( allVectorSizesSupported( commandData.params, vectorParams ) )
|
||||
{
|
||||
return generateCommandSetStandardEnhanced( definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, {}, false, false ) );
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, {}, false, false, false ) );
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@ -4785,6 +4742,7 @@ std::string VulkanHppGenerator::generateCommandSingle( std::string const &
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
std::vector<size_t> const & returnParams,
|
||||
bool singular,
|
||||
bool withAllocator,
|
||||
bool chained ) const
|
||||
{
|
||||
assert( returnParams.size() <= 2 );
|
||||
@ -4797,14 +4755,15 @@ std::string VulkanHppGenerator::generateCommandSingle( std::string const &
|
||||
// special handling for vkGetMemoryHostPointerPropertiesEXT: here, we really need to stick with the const void * parameter !
|
||||
std::set<size_t> templatedParams = ( name == "vkGetMemoryHostPointerPropertiesEXT" ) ? std::set<size_t>() : determineVoidPointerParams( commandData.params );
|
||||
std::set<size_t> singularParams = singular ? determineSingularParams( returnParams[0], vectorParams ) : std::set<size_t>();
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandData.params, vectorParams, singularParams );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck =
|
||||
needsVectorSizeCheck( commandData.params, vectorParams, returnParams, singularParams );
|
||||
|
||||
std::vector<std::string> dataTypes;
|
||||
for ( auto rp : returnParams )
|
||||
{
|
||||
dataTypes.push_back( ( templatedParams.find( rp ) != templatedParams.end() )
|
||||
? ( stripPrefix( commandData.params[rp].name, "p" ) + "Type" )
|
||||
: stripPostfix( commandData.params[rp].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" ) );
|
||||
: trimEnd( stripPostfix( commandData.params[rp].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" ) ) );
|
||||
}
|
||||
std::string dataType;
|
||||
switch ( dataTypes.size() )
|
||||
@ -4815,19 +4774,22 @@ std::string VulkanHppGenerator::generateCommandSingle( std::string const &
|
||||
default: assert( false ); break;
|
||||
}
|
||||
|
||||
std::string argumentTemplates = generateArgumentTemplates( commandData.params, templatedParams, false );
|
||||
std::string chainTemplates = chained ? "typename X, typename Y, typename... Z, " : "";
|
||||
std::string nodiscard = generateNoDiscard( !returnParams.empty(), 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
||||
std::string returnType = generateReturnType( commandData, returnParams, chained, dataType );
|
||||
std::string className = initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "";
|
||||
std::string classSeparator = commandData.handle.empty() ? "" : "::";
|
||||
std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags );
|
||||
std::string argumentTemplates = generateArgumentTemplates( commandData.params, templatedParams, false );
|
||||
std::string chainTemplates = chained ? "typename X, typename Y, typename... Z, " : "";
|
||||
std::string allocatorTemplates = generateAllocatorTemplates( commandData, returnParams, vectorParams, definition, singular );
|
||||
std::string typenameCheck = generateTypenameCheck( commandData, returnParams, vectorParams, definition, false, withAllocator );
|
||||
std::string nodiscard = generateNoDiscard( !returnParams.empty(), 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
||||
std::string returnType = generateReturnType( commandData, returnParams, vectorParams, singular, false, chained, dataType );
|
||||
std::string className = initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "";
|
||||
std::string classSeparator = commandData.handle.empty() ? "" : "::";
|
||||
std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags );
|
||||
if ( singular )
|
||||
{
|
||||
commandName = stripPluralS( commandName );
|
||||
}
|
||||
std::string argumentList = generateArgumentListEnhanced( commandData.params, skippedParams, singularParams, templatedParams, definition, false, false, true );
|
||||
std::string constString = commandData.handle.empty() ? "" : " const";
|
||||
std::string argumentList =
|
||||
generateArgumentListEnhanced( commandData.params, skippedParams, singularParams, templatedParams, definition, withAllocator, chained, true );
|
||||
std::string constString = commandData.handle.empty() ? "" : " const";
|
||||
std::string noexceptString =
|
||||
commandData.errorCodes.empty() ? ( vectorSizeCheck.first ? " VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS" : " VULKAN_HPP_NOEXCEPT" ) : "";
|
||||
|
||||
@ -4835,15 +4797,16 @@ std::string VulkanHppGenerator::generateCommandSingle( std::string const &
|
||||
{
|
||||
std::string vectorSizeCheckString =
|
||||
vectorSizeCheck.first ? generateVectorSizeCheck( name, commandData, initialSkipCount, vectorSizeCheck.second, skippedParams, false ) : "";
|
||||
std::string returnVariable = generateReturnVariable( commandData, returnParams, chained, singular );
|
||||
std::string dataDeclarations = generateDataDeclarations( commandData, returnParams, chained, dataTypes, returnType, returnVariable );
|
||||
std::string returnVariable = generateReturnVariable( commandData, returnParams, chained, singular );
|
||||
std::string dataDeclarations =
|
||||
generateDataDeclarations( commandData, returnParams, vectorParams, singular, withAllocator, chained, dataTypes, returnType, returnVariable );
|
||||
std::string resultAssignment = generateResultAssignment( commandData );
|
||||
std::string callArguments = generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParams, templatedParams, false );
|
||||
std::string resultCheck = generateResultCheck( commandData, className, classSeparator, commandName );
|
||||
std::string returnStatement = generateReturnStatement( commandData, returnVariable, dataType );
|
||||
std::string returnStatement = generateReturnStatement( commandData, returnVariable, returnType );
|
||||
|
||||
std::string const functionTemplate =
|
||||
R"( template <${argumentTemplates}${chainTemplates}typename Dispatch>
|
||||
R"( template <${argumentTemplates}${chainTemplates}${allocatorTemplates}typename Dispatch${typenameCheck}>
|
||||
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const}${noexcept}
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
@ -4855,7 +4818,8 @@ ${vectorSizeCheck}
|
||||
})";
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
{ { "argumentList", argumentList },
|
||||
{ { "allocatorTemplates", allocatorTemplates },
|
||||
{ "argumentList", argumentList },
|
||||
{ "argumentTemplates", argumentTemplates },
|
||||
{ "callArguments", callArguments },
|
||||
{ "chainTemplates", chainTemplates },
|
||||
@ -4870,24 +4834,27 @@ ${vectorSizeCheck}
|
||||
{ "resultCheck", resultCheck },
|
||||
{ "returnStatement", returnStatement },
|
||||
{ "returnType", returnType },
|
||||
{ "typenameCheck", typenameCheck },
|
||||
{ "vectorSizeCheck", vectorSizeCheckString },
|
||||
{ "vkCommand", name } } );
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string const functionTemplate =
|
||||
R"( template <${argumentTemplates}${chainTemplates}typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
R"( template <${argumentTemplates}${chainTemplates}${allocatorTemplates}typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${typenameCheck}>
|
||||
${nodiscard}${returnType} ${commandName}( ${argumentList} )${const}${noexcept};)";
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
{ { "argumentList", argumentList },
|
||||
{ { "allocatorTemplates", allocatorTemplates },
|
||||
{ "argumentList", argumentList },
|
||||
{ "argumentTemplates", argumentTemplates },
|
||||
{ "chainTemplates", chainTemplates },
|
||||
{ "commandName", commandName },
|
||||
{ "const", commandData.handle.empty() ? "" : " const" },
|
||||
{ "nodiscard", nodiscard },
|
||||
{ "noexcept", noexceptString },
|
||||
{ "returnType", returnType } } );
|
||||
{ "returnType", returnType },
|
||||
{ "typenameCheck", typenameCheck } } );
|
||||
}
|
||||
}
|
||||
|
||||
@ -4964,7 +4931,7 @@ std::string
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, returnParams, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, returnParams, false, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4982,9 +4949,10 @@ std::string
|
||||
else if ( allVectorSizesSupported( commandData.params, vectorParams ) )
|
||||
{
|
||||
// All the vectorParams have a counter by value, of type "uint32_t", "VkDeviceSize", or "VkSampleCountFlagBits" (!)
|
||||
return generateCommandSetStandardEnhanced( definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, {}, false, false ) );
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, {}, false, false, false ) );
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@ -5003,7 +4971,7 @@ std::string VulkanHppGenerator::generateCommandVoid1Return(
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5012,9 +4980,10 @@ std::string VulkanHppGenerator::generateCommandVoid1Return(
|
||||
std::map<size_t, size_t> vectorParams = determineVectorParams( commandData.params );
|
||||
if ( vectorParams.empty() )
|
||||
{
|
||||
return generateCommandSetStandardEnhanced( definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false ) );
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false, false ) );
|
||||
}
|
||||
}
|
||||
else if ( isStructureChainAnchor( commandData.params[returnParam].type.type ) )
|
||||
@ -5025,8 +4994,8 @@ std::string VulkanHppGenerator::generateCommandVoid1Return(
|
||||
return generateCommandSetStandardEnhancedChained(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, true ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false, false ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false, true ) );
|
||||
}
|
||||
}
|
||||
else if ( commandData.params[returnParam].type.type != "void" )
|
||||
@ -5038,7 +5007,7 @@ std::string VulkanHppGenerator::generateCommandVoid1Return(
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, {}, { returnParam }, false, false, false ) );
|
||||
break;
|
||||
case 1:
|
||||
if ( returnParam != vectorParams.begin()->first )
|
||||
@ -5052,7 +5021,7 @@ std::string VulkanHppGenerator::generateCommandVoid1Return(
|
||||
return generateCommandSetStandardEnhanced(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false ) );
|
||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, false, false, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5271,6 +5240,9 @@ std::string VulkanHppGenerator::generateConstexprString( std::string const & str
|
||||
|
||||
std::string VulkanHppGenerator::generateDataDeclarations( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
bool singular,
|
||||
bool withAllocator,
|
||||
bool chained,
|
||||
std::vector<std::string> const & dataTypes,
|
||||
std::string const & returnType,
|
||||
@ -5279,10 +5251,12 @@ std::string VulkanHppGenerator::generateDataDeclarations( CommandData const &
|
||||
std::string dataDeclarations;
|
||||
switch ( returnParams.size() )
|
||||
{
|
||||
case 0: break;
|
||||
case 1:
|
||||
if ( chained )
|
||||
{
|
||||
assert( commandData.returnType == "void" );
|
||||
assert( vectorParams.empty() );
|
||||
std::string const dataDeclarationsTemplate = R"(${returnType} ${returnVariable};
|
||||
${dataType} & ${dataVariable} = ${returnVariable}.template get<${dataType}>();)";
|
||||
|
||||
@ -5294,21 +5268,39 @@ std::string VulkanHppGenerator::generateDataDeclarations( CommandData const &
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string const dataDeclarationsTemplate = R"(${dataType} ${dataVariable};)";
|
||||
dataDeclarations = replaceWithMap( dataDeclarationsTemplate, { { "dataType", dataTypes[0] }, { "dataVariable", returnVariable } } );
|
||||
if ( singular || ( vectorParams.find( returnParams[0] ) == vectorParams.end() ) )
|
||||
{
|
||||
std::string const dataDeclarationsTemplate = R"(${dataType} ${dataVariable};)";
|
||||
dataDeclarations = replaceWithMap( dataDeclarationsTemplate, { { "dataType", dataTypes[0] }, { "dataVariable", returnVariable } } );
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string dataTypeAllocator = stripPrefix( dataTypes[0], "VULKAN_HPP_NAMESPACE::" ) + "Allocator";
|
||||
std::string const dataDeclarationsTemplate = R"(std::vector<${dataType}, ${dataTypeAllocator}> ${dataVariable}( ${vectorSize}${vectorAllocator} );)";
|
||||
dataDeclarations = replaceWithMap( dataDeclarationsTemplate,
|
||||
{ { "dataType", dataTypes[0] },
|
||||
{ "dataTypeAllocator", dataTypeAllocator },
|
||||
{ "dataVariable", returnVariable },
|
||||
{ "vectorAllocator", withAllocator ? ( ", " + startLowerCase( dataTypeAllocator ) ) : "" },
|
||||
{ "vectorSize", getVectorSize( commandData.params, vectorParams, returnParams[0] ) } } );
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
std::string const dataDeclarationTemplate = R"(std::pair<${firstDataType},${secondDataType}> data;
|
||||
assert( vectorParams.empty() );
|
||||
{
|
||||
std::string const dataDeclarationTemplate = R"(std::pair<${firstDataType},${secondDataType}> data;
|
||||
${firstDataType} & ${firstDataName} = data.first;
|
||||
${secondDataType} & ${secondDataName} = data.second;)";
|
||||
|
||||
dataDeclarations = replaceWithMap( dataDeclarationTemplate,
|
||||
{ { "firstDataName", startLowerCase( stripPrefix( commandData.params[returnParams[0]].name, "p" ) ) },
|
||||
{ "firstDataType", dataTypes[0] },
|
||||
{ "secondDataName", startLowerCase( stripPrefix( commandData.params[returnParams[1]].name, "p" ) ) },
|
||||
{ "secondDataType", dataTypes[1] } } );
|
||||
dataDeclarations = replaceWithMap( dataDeclarationTemplate,
|
||||
{ { "firstDataName", startLowerCase( stripPrefix( commandData.params[returnParams[0]].name, "p" ) ) },
|
||||
{ "firstDataType", dataTypes[0] },
|
||||
{ "secondDataName", startLowerCase( stripPrefix( commandData.params[returnParams[1]].name, "p" ) ) },
|
||||
{ "secondDataType", dataTypes[1] } } );
|
||||
}
|
||||
break;
|
||||
default: assert( false ); break;
|
||||
}
|
||||
return dataDeclarations;
|
||||
}
|
||||
@ -6618,7 +6610,7 @@ ${vectorSizeCheck}
|
||||
)";
|
||||
|
||||
std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, {}, true );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {} );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {}, {} );
|
||||
std::string vectorSizeCheckString =
|
||||
vectorSizeCheck.first ? generateRAIIHandleVectorSizeCheck( commandIt->first, commandIt->second, initialSkipCount, vectorSizeCheck.second, skippedParams )
|
||||
: "";
|
||||
@ -6812,7 +6804,7 @@ ${vectorSizeCheck}
|
||||
)";
|
||||
|
||||
std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, templatedParams, true );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {} );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {}, {} );
|
||||
std::string vectorSizeCheckString =
|
||||
vectorSizeCheck.first ? generateRAIIHandleVectorSizeCheck( commandIt->first, commandIt->second, initialSkipCount, vectorSizeCheck.second, skippedParams )
|
||||
: "";
|
||||
@ -7526,7 +7518,7 @@ ${vectorSizeCheck}
|
||||
)";
|
||||
|
||||
std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, {}, true );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {} );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {}, {} );
|
||||
std::string vectorSizeCheckString =
|
||||
vectorSizeCheck.first ? generateRAIIHandleVectorSizeCheck( commandIt->first, commandIt->second, initialSkipCount, vectorSizeCheck.second, skippedParams )
|
||||
: "";
|
||||
@ -7600,7 +7592,7 @@ ${vectorSizeCheck}
|
||||
)";
|
||||
|
||||
std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, templatedParams, true );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {} );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {}, {} );
|
||||
std::string vectorSizeCheckString =
|
||||
vectorSizeCheck.first ? generateRAIIHandleVectorSizeCheck( commandIt->first, commandIt->second, initialSkipCount, vectorSizeCheck.second, skippedParams )
|
||||
: "";
|
||||
@ -8322,7 +8314,7 @@ ${vectorSizeCheck}
|
||||
)";
|
||||
|
||||
std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, templatedParams, true );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {} );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {}, {} );
|
||||
std::string vectorSizeCheckString =
|
||||
vectorSizeCheck.first ? generateVectorSizeCheck( commandIt->first, commandIt->second, initialSkipCount, vectorSizeCheck.second, skippedParams, true )
|
||||
: "";
|
||||
@ -8377,7 +8369,7 @@ ${vectorSizeCheck}
|
||||
)";
|
||||
|
||||
std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, {}, true );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {} );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {}, {} );
|
||||
std::string vectorSizeCheckString =
|
||||
vectorSizeCheck.first ? generateRAIIHandleVectorSizeCheck( commandIt->first, commandIt->second, initialSkipCount, vectorSizeCheck.second, skippedParams )
|
||||
: "";
|
||||
@ -8485,7 +8477,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid0Return( std::map<s
|
||||
std::set<size_t> templatedParams = determineVoidPointerParams( commandIt->second.params );
|
||||
std::string argumentList = generateArgumentListEnhanced( commandIt->second.params, skippedParams, {}, templatedParams, definition, false, false, false );
|
||||
std::string commandName = generateCommandName( commandIt->first, commandIt->second.params, initialSkipCount, m_tags );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {} );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {}, {} );
|
||||
std::string noexceptString = vectorSizeCheck.first ? "" : "VULKAN_HPP_NOEXCEPT";
|
||||
std::string argumentTemplates = generateArgumentTemplates( commandIt->second.params, templatedParams, true );
|
||||
|
||||
@ -8593,7 +8585,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid1ReturnValue( std::
|
||||
std::string argumentList = generateArgumentListEnhanced( commandIt->second.params, skippedParams, {}, {}, definition, false, false, false );
|
||||
std::string commandName = generateCommandName( commandIt->first, commandIt->second.params, initialSkipCount, m_tags );
|
||||
std::string returnType = stripPostfix( commandIt->second.params[returnParam].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, {} );
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> vectorSizeCheck = needsVectorSizeCheck( commandIt->second.params, vectorParams, { returnParam }, {} );
|
||||
std::string noexceptString = vectorSizeCheck.first ? "" : "VULKAN_HPP_NOEXCEPT";
|
||||
|
||||
if ( definition )
|
||||
@ -10108,7 +10100,8 @@ std::string
|
||||
}
|
||||
else
|
||||
{
|
||||
returnStatement = "return ResultValue<" + dataType + ">( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), " + returnVariable + " );";
|
||||
assert( beginsWith( dataType, "ResultValue<" ) && endsWith( dataType, ">" ) );
|
||||
returnStatement = "return " + dataType + "( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), " + returnVariable + " );";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10129,10 +10122,13 @@ std::string
|
||||
return returnStatement;
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateReturnType( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
bool chained,
|
||||
std::string const & dataType ) const
|
||||
std::string VulkanHppGenerator::generateReturnType( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
bool singular,
|
||||
bool unique,
|
||||
bool chained,
|
||||
std::string const & dataType ) const
|
||||
{
|
||||
std::string returnType;
|
||||
if ( chained )
|
||||
@ -10143,15 +10139,21 @@ std::string VulkanHppGenerator::generateReturnType( CommandData const &
|
||||
}
|
||||
else if ( commandData.returnType == "VkResult" )
|
||||
{
|
||||
std::string uniqueDataType = unique ? ( "UniqueHandle<" + dataType + ", Dispatch>" ) : dataType;
|
||||
if ( commandData.successCodes.size() == 1 )
|
||||
{
|
||||
if ( commandData.errorCodes.empty() )
|
||||
{
|
||||
returnType = dataType;
|
||||
}
|
||||
else if ( singular || returnParams.empty() || ( vectorParams.find( returnParams[0] ) == vectorParams.end() ) )
|
||||
{
|
||||
returnType = "typename ResultValueType<" + uniqueDataType + ">::type";
|
||||
}
|
||||
else
|
||||
{
|
||||
returnType = "typename ResultValueType<" + dataType + ">::type";
|
||||
returnType =
|
||||
"typename ResultValueType<std::vector<" + uniqueDataType + ", " + trimEnd( stripPrefix( dataType, "VULKAN_HPP_NAMESPACE::" ) ) + "Allocator>>::type";
|
||||
}
|
||||
}
|
||||
else if ( dataType == "void" )
|
||||
@ -10160,7 +10162,15 @@ std::string VulkanHppGenerator::generateReturnType( CommandData const &
|
||||
}
|
||||
else
|
||||
{
|
||||
returnType = "ResultValue<" + dataType + ">";
|
||||
assert( returnParams.size() == 1 );
|
||||
if ( singular || ( vectorParams.find( returnParams[0] ) == vectorParams.end() ) )
|
||||
{
|
||||
returnType = "ResultValue<" + uniqueDataType + ">";
|
||||
}
|
||||
else
|
||||
{
|
||||
returnType = "ResultValue<std::vector<" + uniqueDataType + ", " + trimEnd( stripPrefix( dataType, "VULKAN_HPP_NAMESPACE::" ) ) + "Allocator>>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( returnParams.empty() )
|
||||
@ -11226,6 +11236,36 @@ std::string VulkanHppGenerator::generateSuccessCodeList( std::vector<std::string
|
||||
return successCodeList;
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateTypenameCheck( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
bool definition,
|
||||
bool singular,
|
||||
bool withAllocator ) const
|
||||
{
|
||||
std::string typenameCheck;
|
||||
if ( !singular && withAllocator )
|
||||
{
|
||||
for ( auto returnParam : returnParams )
|
||||
{
|
||||
if ( vectorParams.find( returnParam ) != vectorParams.end() )
|
||||
{
|
||||
std::string elementType = stripPrefix( commandData.params[returnParam].type.type, "Vk" );
|
||||
if ( definition )
|
||||
{
|
||||
typenameCheck += ", typename B, typename std::enable_if<std::is_same<typename B::value_type, " + elementType + ">::value, int>::type ";
|
||||
}
|
||||
else
|
||||
{
|
||||
typenameCheck += ", typename B = " + elementType + "Allocator, typename std::enable_if<std::is_same<typename B::value_type, " + elementType +
|
||||
">::value, int>::type = 0";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return typenameCheck;
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateUnion( std::pair<std::string, StructureData> const & structure ) const
|
||||
{
|
||||
auto [enter, leave] = generateProtection( structure.first, m_structureAliasesInverse.find( structure.first ) != m_structureAliasesInverse.end() );
|
||||
@ -11708,12 +11748,13 @@ bool VulkanHppGenerator::isStructureChainAnchor( std::string const & type ) cons
|
||||
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> VulkanHppGenerator::needsVectorSizeCheck( std::vector<ParamData> const & params,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::set<size_t> const & singularParams ) const
|
||||
{
|
||||
std::map<size_t, std::vector<size_t>> countToVectorMap;
|
||||
for ( auto const & vpi : vectorParams )
|
||||
{
|
||||
if ( vpi.second != INVALID_INDEX &&
|
||||
if ( ( vpi.second != INVALID_INDEX ) && ( std::find( returnParams.begin(), returnParams.end(), vpi.first ) == returnParams.end() ) &&
|
||||
( ( singularParams.find( vpi.second ) == singularParams.end() ) || isLenByStructMember( params[vpi.first].len, params[vpi.second] ) ) )
|
||||
{
|
||||
countToVectorMap[vpi.second].push_back( vpi.first );
|
||||
|
@ -414,6 +414,11 @@ private:
|
||||
std::string findBaseName( std::string aliasName, std::map<std::string, EnumAliasData> const & aliases ) const;
|
||||
std::vector<MemberData>::const_iterator findStructMemberIt( std::string const & name, std::vector<MemberData> const & memberData ) const;
|
||||
std::vector<MemberData>::const_iterator findStructMemberItByType( std::string const & type, std::vector<MemberData> const & memberData ) const;
|
||||
std::string generateAllocatorTemplates( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
bool definition,
|
||||
bool singular ) const;
|
||||
std::string generateArgumentListEnhanced( std::vector<ParamData> const & params,
|
||||
std::set<size_t> const & skippedParams,
|
||||
std::set<size_t> const & singularParams,
|
||||
@ -500,13 +505,6 @@ private:
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
std::vector<size_t> const & returnParam,
|
||||
bool withAllocator ) const;
|
||||
std::string generateCommandResultGetVectorOfHandlesOrValues( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
bool definition,
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
size_t returnParam,
|
||||
bool withAllocator ) const;
|
||||
std::string generateCommandResultGetVectorOfHandlesUnique( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
@ -623,6 +621,7 @@ private:
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
std::vector<size_t> const & returnParams,
|
||||
bool singular,
|
||||
bool withAllocator,
|
||||
bool chained ) const;
|
||||
std::string generateCommandStandard( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition ) const;
|
||||
std::string generateCommandValue( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition ) const;
|
||||
@ -648,6 +647,9 @@ private:
|
||||
std::string generateConstexprString( std::string const & structName ) const;
|
||||
std::string generateDataDeclarations( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
bool singular,
|
||||
bool withAllocator,
|
||||
bool chained,
|
||||
std::vector<std::string> const & dataTypes,
|
||||
std::string const & returnType,
|
||||
@ -946,7 +948,13 @@ private:
|
||||
std::string
|
||||
generateResultCheck( CommandData const & commandData, std::string const & className, std::string const & classSeparator, std::string commandName ) const;
|
||||
std::string generateReturnStatement( CommandData const & commandData, std::string const & returnVariable, std::string const & dataType ) const;
|
||||
std::string generateReturnType( CommandData const & commandData, std::vector<size_t> const & returnParams, bool chained, std::string const & dataType ) const;
|
||||
std::string generateReturnType( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
bool singular,
|
||||
bool unique,
|
||||
bool chained,
|
||||
std::string const & dataType ) const;
|
||||
std::string generateReturnVariable( CommandData const & commandData, std::vector<size_t> const & returnParams, bool chained, bool singular ) const;
|
||||
std::string
|
||||
generateSizeCheck( std::vector<std::vector<MemberData>::const_iterator> const & arrayIts, std::string const & structName, bool mutualExclusiveLens ) const;
|
||||
@ -967,6 +975,12 @@ private:
|
||||
std::string generateStructSubConstructor( std::pair<std::string, StructureData> const & structData ) const;
|
||||
std::string generateSuccessCheck( std::vector<std::string> const & successCodes ) const;
|
||||
std::string generateSuccessCodeList( std::vector<std::string> const & successCodes ) const;
|
||||
std::string generateTypenameCheck( CommandData const & commandData,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
bool definition,
|
||||
bool singular,
|
||||
bool withAllocator ) const;
|
||||
std::string generateUnion( std::pair<std::string, StructureData> const & structure ) const;
|
||||
std::string generateUniqueTypes( std::string const & parentType, std::set<std::string> const & childrenTypes ) const;
|
||||
std::string generateVectorSizeCheck( std::string const & name,
|
||||
@ -989,7 +1003,8 @@ private:
|
||||
bool isStructMember( std::string const & name, std::vector<MemberData> const & memberData ) const;
|
||||
bool isStructureChainAnchor( std::string const & type ) const;
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> needsVectorSizeCheck( std::vector<ParamData> const & params,
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
std::map<size_t, size_t> const & vectorParams,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::set<size_t> const & singularParams ) const;
|
||||
void readCommands( tinyxml2::XMLElement const * element );
|
||||
void readCommandsCommand( tinyxml2::XMLElement const * element );
|
||||
|
@ -1836,8 +1836,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<std::vector<DataType, Allocator>>
|
||||
template <typename DataType, typename DataTypeAllocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<std::vector<DataType, DataTypeAllocator>>
|
||||
Device::getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool,
|
||||
uint32_t firstQuery,
|
||||
uint32_t queryCount,
|
||||
@ -1848,8 +1848,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 );
|
||||
std::vector<DataType, Allocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetQueryPoolResults( m_device,
|
||||
std::vector<DataType, DataTypeAllocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetQueryPoolResults( m_device,
|
||||
static_cast<VkQueryPool>( queryPool ),
|
||||
firstQuery,
|
||||
queryCount,
|
||||
@ -2623,18 +2623,19 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator> pipelines( createInfos.size() );
|
||||
Result result = static_cast<Result>( d.vkCreateGraphicsPipelines(
|
||||
VkResult result = d.vkCreateGraphicsPipelines(
|
||||
m_device,
|
||||
static_cast<VkPipelineCache>( pipelineCache ),
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkGraphicsPipelineCreateInfo *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) ) );
|
||||
return createResultValue( result,
|
||||
pipelines,
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
return ResultValue<std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator>>( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), pipelines );
|
||||
}
|
||||
|
||||
template <typename PipelineAllocator,
|
||||
@ -2649,18 +2650,19 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator> pipelines( createInfos.size(), pipelineAllocator );
|
||||
Result result = static_cast<Result>( d.vkCreateGraphicsPipelines(
|
||||
VkResult result = d.vkCreateGraphicsPipelines(
|
||||
m_device,
|
||||
static_cast<VkPipelineCache>( pipelineCache ),
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkGraphicsPipelineCreateInfo *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) ) );
|
||||
return createResultValue( result,
|
||||
pipelines,
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
return ResultValue<std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator>>( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), pipelines );
|
||||
}
|
||||
|
||||
template <typename Dispatch>
|
||||
@ -2807,18 +2809,19 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator> pipelines( createInfos.size() );
|
||||
Result result = static_cast<Result>( d.vkCreateComputePipelines(
|
||||
VkResult result = d.vkCreateComputePipelines(
|
||||
m_device,
|
||||
static_cast<VkPipelineCache>( pipelineCache ),
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkComputePipelineCreateInfo *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) ) );
|
||||
return createResultValue( result,
|
||||
pipelines,
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
return ResultValue<std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator>>( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), pipelines );
|
||||
}
|
||||
|
||||
template <typename PipelineAllocator,
|
||||
@ -2833,18 +2836,19 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator> pipelines( createInfos.size(), pipelineAllocator );
|
||||
Result result = static_cast<Result>( d.vkCreateComputePipelines(
|
||||
VkResult result = d.vkCreateComputePipelines(
|
||||
m_device,
|
||||
static_cast<VkPipelineCache>( pipelineCache ),
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkComputePipelineCreateInfo *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) ) );
|
||||
return createResultValue( result,
|
||||
pipelines,
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
return ResultValue<std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator>>( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), pipelines );
|
||||
}
|
||||
|
||||
template <typename Dispatch>
|
||||
@ -3444,10 +3448,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::DescriptorSet, DescriptorSetAllocator> descriptorSets( allocateInfo.descriptorSetCount );
|
||||
Result result = static_cast<Result>( d.vkAllocateDescriptorSets(
|
||||
m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo *>( &allocateInfo ), reinterpret_cast<VkDescriptorSet *>( descriptorSets.data() ) ) );
|
||||
return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" );
|
||||
VkResult result = d.vkAllocateDescriptorSets(
|
||||
m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo *>( &allocateInfo ), reinterpret_cast<VkDescriptorSet *>( descriptorSets.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" );
|
||||
return createResultValueType( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), descriptorSets );
|
||||
}
|
||||
|
||||
template <typename DescriptorSetAllocator,
|
||||
@ -3460,10 +3466,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::DescriptorSet, DescriptorSetAllocator> descriptorSets( allocateInfo.descriptorSetCount, descriptorSetAllocator );
|
||||
Result result = static_cast<Result>( d.vkAllocateDescriptorSets(
|
||||
m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo *>( &allocateInfo ), reinterpret_cast<VkDescriptorSet *>( descriptorSets.data() ) ) );
|
||||
return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" );
|
||||
VkResult result = d.vkAllocateDescriptorSets(
|
||||
m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo *>( &allocateInfo ), reinterpret_cast<VkDescriptorSet *>( descriptorSets.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" );
|
||||
return createResultValueType( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), descriptorSets );
|
||||
}
|
||||
|
||||
# ifndef VULKAN_HPP_NO_SMART_HANDLE
|
||||
@ -3953,10 +3961,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::CommandBuffer, CommandBufferAllocator> commandBuffers( allocateInfo.commandBufferCount );
|
||||
Result result = static_cast<Result>( d.vkAllocateCommandBuffers(
|
||||
m_device, reinterpret_cast<const VkCommandBufferAllocateInfo *>( &allocateInfo ), reinterpret_cast<VkCommandBuffer *>( commandBuffers.data() ) ) );
|
||||
return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" );
|
||||
VkResult result = d.vkAllocateCommandBuffers(
|
||||
m_device, reinterpret_cast<const VkCommandBufferAllocateInfo *>( &allocateInfo ), reinterpret_cast<VkCommandBuffer *>( commandBuffers.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" );
|
||||
return createResultValueType( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), commandBuffers );
|
||||
}
|
||||
|
||||
template <typename CommandBufferAllocator,
|
||||
@ -3969,10 +3979,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::CommandBuffer, CommandBufferAllocator> commandBuffers( allocateInfo.commandBufferCount, commandBufferAllocator );
|
||||
Result result = static_cast<Result>( d.vkAllocateCommandBuffers(
|
||||
m_device, reinterpret_cast<const VkCommandBufferAllocateInfo *>( &allocateInfo ), reinterpret_cast<VkCommandBuffer *>( commandBuffers.data() ) ) );
|
||||
return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" );
|
||||
VkResult result = d.vkAllocateCommandBuffers(
|
||||
m_device, reinterpret_cast<const VkCommandBufferAllocateInfo *>( &allocateInfo ), reinterpret_cast<VkCommandBuffer *>( commandBuffers.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" );
|
||||
return createResultValueType( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), commandBuffers );
|
||||
}
|
||||
|
||||
# ifndef VULKAN_HPP_NO_SMART_HANDLE
|
||||
@ -8275,14 +8287,16 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::SwapchainKHR, SwapchainKHRAllocator> swapchains( createInfos.size() );
|
||||
Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR(
|
||||
VkResult result = d.vkCreateSharedSwapchainsKHR(
|
||||
m_device,
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkSwapchainCreateInfoKHR *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkSwapchainKHR *>( swapchains.data() ) ) );
|
||||
return createResultValue( result, swapchains, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" );
|
||||
reinterpret_cast<VkSwapchainKHR *>( swapchains.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" );
|
||||
return createResultValueType( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), swapchains );
|
||||
}
|
||||
|
||||
template <typename SwapchainKHRAllocator,
|
||||
@ -8296,14 +8310,16 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::SwapchainKHR, SwapchainKHRAllocator> swapchains( createInfos.size(), swapchainKHRAllocator );
|
||||
Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR(
|
||||
VkResult result = d.vkCreateSharedSwapchainsKHR(
|
||||
m_device,
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkSwapchainCreateInfoKHR *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkSwapchainKHR *>( swapchains.data() ) ) );
|
||||
return createResultValue( result, swapchains, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" );
|
||||
reinterpret_cast<VkSwapchainKHR *>( swapchains.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" );
|
||||
return createResultValueType( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), swapchains );
|
||||
}
|
||||
|
||||
template <typename Dispatch>
|
||||
@ -13596,8 +13612,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, Allocator>>::type
|
||||
template <typename DataType, typename DataTypeAllocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type
|
||||
Device::writeAccelerationStructuresPropertiesKHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR> const & accelerationStructures,
|
||||
VULKAN_HPP_NAMESPACE::QueryType queryType,
|
||||
size_t dataSize,
|
||||
@ -13606,8 +13622,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 );
|
||||
std::vector<DataType, Allocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result =
|
||||
std::vector<DataType, DataTypeAllocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result =
|
||||
static_cast<Result>( d.vkWriteAccelerationStructuresPropertiesKHR( m_device,
|
||||
accelerationStructures.size(),
|
||||
reinterpret_cast<const VkAccelerationStructureKHR *>( accelerationStructures.data() ),
|
||||
@ -14545,18 +14561,19 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator> pipelines( createInfos.size() );
|
||||
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV(
|
||||
VkResult result = d.vkCreateRayTracingPipelinesNV(
|
||||
m_device,
|
||||
static_cast<VkPipelineCache>( pipelineCache ),
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkRayTracingPipelineCreateInfoNV *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) ) );
|
||||
return createResultValue( result,
|
||||
pipelines,
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
return ResultValue<std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator>>( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), pipelines );
|
||||
}
|
||||
|
||||
template <typename PipelineAllocator,
|
||||
@ -14571,18 +14588,19 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator> pipelines( createInfos.size(), pipelineAllocator );
|
||||
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV(
|
||||
VkResult result = d.vkCreateRayTracingPipelinesNV(
|
||||
m_device,
|
||||
static_cast<VkPipelineCache>( pipelineCache ),
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkRayTracingPipelineCreateInfoNV *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) ) );
|
||||
return createResultValue( result,
|
||||
pipelines,
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
return ResultValue<std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator>>( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), pipelines );
|
||||
}
|
||||
|
||||
template <typename Dispatch>
|
||||
@ -14717,14 +14735,14 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, Allocator>>::type Device::getRayTracingShaderGroupHandlesNV(
|
||||
template <typename DataType, typename DataTypeAllocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type Device::getRayTracingShaderGroupHandlesNV(
|
||||
VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 );
|
||||
std::vector<DataType, Allocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV(
|
||||
std::vector<DataType, DataTypeAllocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV(
|
||||
m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast<void *>( data.data() ) ) );
|
||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesNV" );
|
||||
}
|
||||
@ -14755,14 +14773,14 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, Allocator>>::type
|
||||
template <typename DataType, typename DataTypeAllocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type
|
||||
Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 );
|
||||
std::vector<DataType, Allocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetAccelerationStructureHandleNV(
|
||||
std::vector<DataType, DataTypeAllocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetAccelerationStructureHandleNV(
|
||||
m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), data.size() * sizeof( DataType ), reinterpret_cast<void *>( data.data() ) ) );
|
||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" );
|
||||
}
|
||||
@ -17865,22 +17883,23 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator> pipelines( createInfos.size() );
|
||||
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesKHR(
|
||||
VkResult result = d.vkCreateRayTracingPipelinesKHR(
|
||||
m_device,
|
||||
static_cast<VkDeferredOperationKHR>( deferredOperation ),
|
||||
static_cast<VkPipelineCache>( pipelineCache ),
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkRayTracingPipelineCreateInfoKHR *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) ) );
|
||||
return createResultValue( result,
|
||||
pipelines,
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess,
|
||||
VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR,
|
||||
VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR,
|
||||
VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess,
|
||||
VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR,
|
||||
VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR,
|
||||
VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
return ResultValue<std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator>>( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), pipelines );
|
||||
}
|
||||
|
||||
template <typename PipelineAllocator,
|
||||
@ -17896,22 +17915,23 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
|
||||
std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator> pipelines( createInfos.size(), pipelineAllocator );
|
||||
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesKHR(
|
||||
VkResult result = d.vkCreateRayTracingPipelinesKHR(
|
||||
m_device,
|
||||
static_cast<VkDeferredOperationKHR>( deferredOperation ),
|
||||
static_cast<VkPipelineCache>( pipelineCache ),
|
||||
createInfos.size(),
|
||||
reinterpret_cast<const VkRayTracingPipelineCreateInfoKHR *>( createInfos.data() ),
|
||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) ) );
|
||||
return createResultValue( result,
|
||||
pipelines,
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess,
|
||||
VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR,
|
||||
VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR,
|
||||
VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
reinterpret_cast<VkPipeline *>( pipelines.data() ) );
|
||||
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR",
|
||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess,
|
||||
VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR,
|
||||
VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR,
|
||||
VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||
return ResultValue<std::vector<VULKAN_HPP_NAMESPACE::Pipeline, PipelineAllocator>>( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), pipelines );
|
||||
}
|
||||
|
||||
template <typename Dispatch>
|
||||
@ -18068,14 +18088,14 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, Allocator>>::type Device::getRayTracingShaderGroupHandlesKHR(
|
||||
template <typename DataType, typename DataTypeAllocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type Device::getRayTracingShaderGroupHandlesKHR(
|
||||
VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 );
|
||||
std::vector<DataType, Allocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesKHR(
|
||||
std::vector<DataType, DataTypeAllocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesKHR(
|
||||
m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast<void *>( data.data() ) ) );
|
||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesKHR" );
|
||||
}
|
||||
@ -18108,15 +18128,15 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, Allocator>>::type
|
||||
template <typename DataType, typename DataTypeAllocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type
|
||||
Device::getRayTracingCaptureReplayShaderGroupHandlesKHR(
|
||||
VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 );
|
||||
std::vector<DataType, Allocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
|
||||
std::vector<DataType, DataTypeAllocator> data( dataSize / sizeof( DataType ) );
|
||||
Result result = static_cast<Result>( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
|
||||
m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast<void *>( data.data() ) ) );
|
||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandlesKHR" );
|
||||
}
|
||||
|
@ -7595,8 +7595,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
VULKAN_HPP_NAMESPACE::QueryResultFlags flags,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD ResultValue<std::vector<DataType, Allocator>>
|
||||
template <typename DataType, typename DataTypeAllocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD ResultValue<std::vector<DataType, DataTypeAllocator>>
|
||||
getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool,
|
||||
uint32_t firstQuery,
|
||||
uint32_t queryCount,
|
||||
@ -9976,8 +9976,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
size_t stride,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, Allocator>>::type
|
||||
template <typename DataType, typename DataTypeAllocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type
|
||||
writeAccelerationStructuresPropertiesKHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR> const & accelerationStructures,
|
||||
VULKAN_HPP_NAMESPACE::QueryType queryType,
|
||||
size_t dataSize,
|
||||
@ -10306,8 +10306,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
void * pData,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, Allocator>>::type
|
||||
template <typename DataType, typename DataTypeAllocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type
|
||||
getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
||||
uint32_t firstGroup,
|
||||
uint32_t groupCount,
|
||||
@ -10324,8 +10324,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
void * pData,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, Allocator>>::type getAccelerationStructureHandleNV(
|
||||
template <typename DataType, typename DataTypeAllocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type getAccelerationStructureHandleNV(
|
||||
VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||
template <typename DataType, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<DataType>::type
|
||||
@ -10935,8 +10935,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
void * pData,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, Allocator>>::type
|
||||
template <typename DataType, typename DataTypeAllocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type
|
||||
getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
||||
uint32_t firstGroup,
|
||||
uint32_t groupCount,
|
||||
@ -10956,8 +10956,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
void * pData,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename DataType, typename Allocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, Allocator>>::type
|
||||
template <typename DataType, typename DataTypeAllocator = std::allocator<DataType>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DataType, DataTypeAllocator>>::type
|
||||
getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
||||
uint32_t firstGroup,
|
||||
uint32_t groupCount,
|
||||
|
Loading…
Reference in New Issue
Block a user