mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #1173 from asuessenbach/deprecated
Remove deprecated version of function Device::getCalibratedTimestampsEXT().
This commit is contained in:
commit
cb5347205f
@ -3866,69 +3866,6 @@ std::string VulkanHppGenerator::generateCommandResultGetValue( std::string const
|
||||
}
|
||||
}
|
||||
|
||||
std::string
|
||||
VulkanHppGenerator::generateCommandResultGetValueDeprecated( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
bool definition,
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
size_t returnParamIndex ) const
|
||||
{
|
||||
assert( commandData.returnType == "VkResult" );
|
||||
assert( ( vectorParamIndices.find( returnParamIndex ) == vectorParamIndices.end() ) );
|
||||
|
||||
std::string argumentList = generateFunctionHeaderArgumentsEnhanced(
|
||||
commandData, returnParamIndex, INVALID_INDEX, initialSkipCount, vectorParamIndices, !definition, false );
|
||||
std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags );
|
||||
std::string nodiscard = generateNoDiscard( 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
||||
std::string returnType =
|
||||
stripPostfix( commandData.params[returnParamIndex].type.compose( "VULKAN_HPP_NAMESPACE" ), " *" );
|
||||
|
||||
if ( definition )
|
||||
{
|
||||
std::string const functionTemplate =
|
||||
R"( template <typename Dispatch>
|
||||
VULKAN_HPP_DEPRECATED( "This function is deprecated. Use one of the other flavours of it.")
|
||||
${nodiscard}VULKAN_HPP_INLINE typename ResultValueType<${returnType}>::type ${className}${classSeparator}${commandName}( ${argumentList} ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
${functionBody}
|
||||
})";
|
||||
|
||||
return replaceWithMap(
|
||||
functionTemplate,
|
||||
{ { "argumentList", argumentList },
|
||||
{ "className",
|
||||
initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" },
|
||||
{ "classSeparator", commandData.handle.empty() ? "" : "::" },
|
||||
{ "commandName", commandName },
|
||||
{ "functionBody",
|
||||
generateFunctionBodyEnhanced( name,
|
||||
commandData,
|
||||
initialSkipCount,
|
||||
returnParamIndex,
|
||||
INVALID_INDEX,
|
||||
vectorParamIndices,
|
||||
false,
|
||||
returnType,
|
||||
false ) },
|
||||
{ "nodiscard", nodiscard },
|
||||
{ "returnType", returnType } } );
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string const functionTemplate =
|
||||
R"( template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
${nodiscard}typename ResultValueType<${returnType}>::type ${commandName}( ${argumentList} ) const;)";
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
{ { "argumentList", argumentList },
|
||||
{ "commandName", commandName },
|
||||
{ "nodiscard", nodiscard },
|
||||
{ "returnType", returnType } } );
|
||||
}
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandResultGetVector( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
@ -5235,11 +5172,9 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors2Ret
|
||||
!isHandleType( commandData.params[vectorParamIndices.begin()->first].type.type ) &&
|
||||
!isStructureChainAnchor( commandData.params[vectorParamIndices.begin()->first].type.type ) )
|
||||
{
|
||||
return generateCommandSetStandardEnhancedWithAllocatorSingularDeprecated(
|
||||
return generateCommandSetStandardEnhancedWithAllocatorSingular(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultGetValueDeprecated(
|
||||
name, commandData, initialSkipCount, definition, vectorParamIndices, returnParamIndices[1] ),
|
||||
generateCommandResultGetVectorAndValue(
|
||||
name, commandData, initialSkipCount, definition, vectorParamIndices, returnParamIndices, false ),
|
||||
generateCommandResultGetVectorAndValue(
|
||||
@ -5399,34 +5334,6 @@ ${commandEnhancedChainedWithAllocator}
|
||||
{ "newlineOnDefinition", definition ? "\n" : "" } } ) );
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandSetStandardEnhancedWithAllocatorSingularDeprecated(
|
||||
bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhancedDeprecated,
|
||||
std::string const & enhanced,
|
||||
std::string const & enhancedWithAllocator,
|
||||
std::string const & enhancedSingular ) const
|
||||
{
|
||||
const std::string commandTemplate = R"(
|
||||
${commandStandard}${newlineOnDefinition}
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
${commandEnhancedDeprecated}${newlineOnDefinition}
|
||||
${commandEnhanced}${newlineOnDefinition}
|
||||
${commandEnhancedWithAllocator}
|
||||
${commandEnhancedSingular}
|
||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||
)";
|
||||
|
||||
return replaceWithMap(
|
||||
commandTemplate,
|
||||
std::map<std::string, std::string>( { { "commandEnhanced", enhanced },
|
||||
{ "commandEnhancedDeprecated", enhancedDeprecated },
|
||||
{ "commandEnhancedSingular", enhancedSingular },
|
||||
{ "commandEnhancedWithAllocator", enhancedWithAllocator },
|
||||
{ "commandStandard", standard },
|
||||
{ "newlineOnDefinition", definition ? "\n" : "" } } ) );
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandSetStandardEnhancedWithAllocatorSingular(
|
||||
bool definition,
|
||||
std::string const & standard,
|
||||
@ -5439,7 +5346,7 @@ ${commandStandard}${newlineOnDefinition}
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
${commandEnhanced}${newlineOnDefinition}
|
||||
${commandEnhancedWithAllocator}${newlineOnDefinition}
|
||||
${commandEnhancedSingular}${newlineOnDefinition}
|
||||
${commandEnhancedSingular}
|
||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||
)";
|
||||
|
||||
|
@ -541,12 +541,6 @@ private:
|
||||
size_t initialSkipCount,
|
||||
bool definition,
|
||||
size_t returnParamIndex ) const;
|
||||
std::string generateCommandResultGetValueDeprecated( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
bool definition,
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
size_t returnParamIndex ) const;
|
||||
std::string generateCommandResultGetVector( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
@ -715,19 +709,12 @@ private:
|
||||
std::string const & enhanced,
|
||||
std::string const & enhancedWithAllocator ) const;
|
||||
std::string
|
||||
generateCommandSetStandardEnhancedWithAllocatorChained( bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhanced,
|
||||
std::string const & enhancedWithAllocator,
|
||||
std::string const & enhancedChained,
|
||||
std::string const & enhancedChainedWithAllocator ) const;
|
||||
std::string
|
||||
generateCommandSetStandardEnhancedWithAllocatorSingularDeprecated( bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhancedDeprecated,
|
||||
std::string const & enhanced,
|
||||
std::string const & enhancedWithAllocator,
|
||||
std::string const & enhancedSingular ) const;
|
||||
generateCommandSetStandardEnhancedWithAllocatorChained( bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhanced,
|
||||
std::string const & enhancedWithAllocator,
|
||||
std::string const & enhancedChained,
|
||||
std::string const & enhancedChainedWithAllocator ) const;
|
||||
std::string generateCommandSetStandardEnhancedWithAllocatorSingular( bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhanced,
|
||||
|
@ -15652,35 +15652,6 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename Dispatch>
|
||||
VULKAN_HPP_DEPRECATED( "This function is deprecated. Use one of the other flavours of it." )
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE
|
||||
typename ResultValueType<uint64_t>::type Device::getCalibratedTimestampsEXT(
|
||||
ArrayProxy<const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT> const & timestampInfos,
|
||||
ArrayProxy<uint64_t> const & timestamps,
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||
VULKAN_HPP_ASSERT( timestampInfos.size() == timestamps.size() );
|
||||
# else
|
||||
if ( timestampInfos.size() != timestamps.size() )
|
||||
{
|
||||
throw LogicError( VULKAN_HPP_NAMESPACE_STRING
|
||||
"::VkDevice::getCalibratedTimestampsEXT: timestampInfos.size() != timestamps.size()" );
|
||||
}
|
||||
# endif /*VULKAN_HPP_NO_EXCEPTIONS*/
|
||||
uint64_t maxDeviation;
|
||||
Result result = static_cast<Result>(
|
||||
d.vkGetCalibratedTimestampsEXT( m_device,
|
||||
timestampInfos.size(),
|
||||
reinterpret_cast<const VkCalibratedTimestampInfoEXT *>( timestampInfos.data() ),
|
||||
timestamps.data(),
|
||||
&maxDeviation ) );
|
||||
return createResultValue(
|
||||
result, maxDeviation, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" );
|
||||
}
|
||||
|
||||
template <typename Uint64_tAllocator, typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE
|
||||
typename ResultValueType<std::pair<std::vector<uint64_t, Uint64_tAllocator>, uint64_t>>::type
|
||||
@ -15728,6 +15699,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
&maxDeviation ) );
|
||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" );
|
||||
}
|
||||
|
||||
template <typename Dispatch>
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE
|
||||
typename ResultValueType<std::pair<uint64_t, uint64_t>>::type
|
||||
|
@ -11040,11 +11040,6 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
uint64_t * pMaxDeviation,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<uint64_t>::type getCalibratedTimestampsEXT(
|
||||
ArrayProxy<const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT> const & timestampInfos,
|
||||
ArrayProxy<uint64_t> const & timestamps,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||
template <typename Uint64_tAllocator = std::allocator<uint64_t>,
|
||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user