From 10e8f07e8516fa258c03162b6963ce0ef9824077 Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Mon, 3 Jan 2022 15:33:51 +0100 Subject: [PATCH] Remove deprecated version of function Device::getCalibratedTimestampsEXT(). --- VulkanHppGenerator.cpp | 97 +-------------------------------------- VulkanHppGenerator.hpp | 25 +++------- vulkan/vulkan_funcs.hpp | 30 +----------- vulkan/vulkan_handles.hpp | 5 -- 4 files changed, 9 insertions(+), 148 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index b433418..716f9b1 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -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 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 - 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 - ${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( { { "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*/ )"; diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 20bc762..143c7fc 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -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 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, diff --git a/vulkan/vulkan_funcs.hpp b/vulkan/vulkan_funcs.hpp index a3d1293..656154a 100644 --- a/vulkan/vulkan_funcs.hpp +++ b/vulkan/vulkan_funcs.hpp @@ -15652,35 +15652,6 @@ namespace VULKAN_HPP_NAMESPACE } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - 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::type Device::getCalibratedTimestampsEXT( - ArrayProxy const & timestampInfos, - ArrayProxy 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( - d.vkGetCalibratedTimestampsEXT( m_device, - timestampInfos.size(), - reinterpret_cast( timestampInfos.data() ), - timestamps.data(), - &maxDeviation ) ); - return createResultValue( - result, maxDeviation, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); - } - template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType, uint64_t>>::type @@ -15728,6 +15699,7 @@ namespace VULKAN_HPP_NAMESPACE &maxDeviation ) ); return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); } + template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType>::type diff --git a/vulkan/vulkan_handles.hpp b/vulkan/vulkan_handles.hpp index 741f759..d735a72 100644 --- a/vulkan/vulkan_handles.hpp +++ b/vulkan/vulkan_handles.hpp @@ -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 - VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type getCalibratedTimestampsEXT( - ArrayProxy const & timestampInfos, - ArrayProxy const & timestamps, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS