Merge pull request #731 from asuessenbach/single

Make the name of the singular version in appendCommandFixedSizeVector singular.
This commit is contained in:
Andreas Süßenbach 2020-09-02 22:19:03 +02:00 committed by GitHub
commit 51dbd32515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 24 deletions

View File

@ -1481,6 +1481,9 @@ void VulkanHppGenerator::appendCommandFixedSizeVector( std::string & str,
assert( ( vectorParamIndices.size() == 1 ) &&
( vectorParamIndices.find( templateParamIndex ) != vectorParamIndices.end() ) );
std::string commandName = startLowerCase( stripPrefix( name, "vk" ) );
std::string commandNameSingular = stripPluralS( commandName );
if ( definition )
{
std::string const functionTemplate = R"(
@ -1508,7 +1511,7 @@ ${enter} template <typename Dispatch>
}
template <typename T, typename Dispatch>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type ${className}::${commandName}( ${argumentListEnhancedSingular} ) const
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type ${className}::${commandNameSingular}( ${argumentListEnhancedSingular} ) const
{
T ${dataName};
${functionCallSingular}
@ -1537,7 +1540,8 @@ ${leave}
commandData, templateParamIndex, templateParamIndex, vectorParamIndices, true, false, false ) },
{ "argumentListStandard", constructFunctionHeaderArgumentsStandard( commandData, false ) },
{ "className", stripPrefix( commandData.handle, "Vk" ) },
{ "commandName", startLowerCase( stripPrefix( name, "vk" ) ) },
{ "commandName", commandName },
{ "commandNameSingular", commandNameSingular },
{ "dataName", startLowerCase( stripPrefix( commandData.params[templateParamIndex].name, "p" ) ) },
{ "dataSize", commandData.params[templateParamIndex].len },
{ "enter", enter },
@ -1571,7 +1575,7 @@ ${enter} template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
template <typename T, typename Allocator = std::allocator<T>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<std::vector<T,Allocator>>::type ${commandName}( ${argumentListEnhanced} ) const;
template <typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type ${commandName}( ${argumentListEnhancedSingular} ) const;
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type ${commandNameSingular}( ${argumentListEnhancedSingular} ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
${leave}
)";
@ -1589,7 +1593,8 @@ ${leave}
constructFunctionHeaderArgumentsEnhanced(
commandData, templateParamIndex, templateParamIndex, vectorParamIndices, true, true, false ) },
{ "argumentListStandard", constructFunctionHeaderArgumentsStandard( commandData, true ) },
{ "commandName", startLowerCase( stripPrefix( name, "vk" ) ) },
{ "commandName", commandName },
{ "commandNameSingular", commandNameSingular },
{ "enter", enter },
{ "leave", leave } } ) );
}
@ -2322,7 +2327,7 @@ std::string VulkanHppGenerator::appendFunctionBodyEnhancedLocalReturnVariable(
{
// For StructureChains use the template parameters
str += "StructureChain<X, Y, Z...> structureChain;\n" + indentation + " " + enhancedReturnType + "& " +
returnName + " = structureChain.template get<" + enhancedReturnType + ">()";
returnName + " = structureChain.template get<" + enhancedReturnType + ">()";
returnName = "structureChain";
}
else

View File

@ -53753,11 +53753,11 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type
getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
Dispatch const & d
VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
getRayTracingCaptureReplayShaderGroupHandleKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
Dispatch const & d
VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@ -53789,10 +53789,10 @@ namespace VULKAN_HPP_NAMESPACE
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type
getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
getRayTracingShaderGroupHandleKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@ -53823,10 +53823,10 @@ namespace VULKAN_HPP_NAMESPACE
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename T, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type
getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
getRayTracingShaderGroupHandleNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@ -97603,10 +97603,10 @@ namespace VULKAN_HPP_NAMESPACE
template <typename T, typename Dispatch>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type
Device::getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
Dispatch const & d ) const
Device::getRayTracingCaptureReplayShaderGroupHandleKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
Dispatch const & d ) const
{
T data;
Result result =
@ -97681,7 +97681,7 @@ namespace VULKAN_HPP_NAMESPACE
}
template <typename T, typename Dispatch>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type Device::getRayTracingShaderGroupHandlesKHR(
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type Device::getRayTracingShaderGroupHandleKHR(
VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d ) const
{
T data;
@ -97754,7 +97754,7 @@ namespace VULKAN_HPP_NAMESPACE
}
template <typename T, typename Dispatch>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type Device::getRayTracingShaderGroupHandlesNV(
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<T>::type Device::getRayTracingShaderGroupHandleNV(
VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d ) const
{
T data;