mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Remove deprecated versions of function PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR
This commit is contained in:
parent
22218da7db
commit
bf73d74aa9
@ -618,7 +618,6 @@ The affected functions are
|
||||
Device::getRayTracingShaderGroupHandlesKHR
|
||||
Device::getRayTracingShaderGroupHandlesNV
|
||||
Device::writeAccelerationStructuresPropertiesKHR
|
||||
PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR
|
||||
```
|
||||
All those elements will be removed around November 2021.
|
||||
|
||||
|
@ -3161,88 +3161,6 @@ std::string
|
||||
}
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandResultEnumerateTwoVectorsDeprecated(
|
||||
std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
bool definition,
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
bool withAllocators ) const
|
||||
{
|
||||
std::vector<size_t> returnParamIndices = determineReturnParamIndices( commandData.params );
|
||||
assert( !returnParamIndices.empty() && ( returnParamIndices.back() + 1 == commandData.params.size() ) );
|
||||
size_t returnParamIndex = returnParamIndices.back();
|
||||
|
||||
std::string argumentList = generateFunctionHeaderArgumentsEnhanced( commandData,
|
||||
returnParamIndex,
|
||||
returnParamIndex,
|
||||
initialSkipCount,
|
||||
vectorParamIndices,
|
||||
!definition,
|
||||
withAllocators );
|
||||
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 = generateEnhancedReturnType( commandData, returnParamIndex, false );
|
||||
std::string templateType = stripPrefix( commandData.params[returnParamIndex].type.type, "Vk" );
|
||||
|
||||
if ( definition )
|
||||
{
|
||||
const std::string functionTemplate =
|
||||
R"( template <typename Allocator, typename Dispatch${typeCheck}>
|
||||
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}
|
||||
})";
|
||||
|
||||
std::string typeCheck = withAllocators
|
||||
? ", typename B, typename std::enable_if<std::is_same<typename B::value_type, " +
|
||||
templateType + ">::value, int>::type"
|
||||
: "";
|
||||
|
||||
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,
|
||||
returnParamIndex,
|
||||
vectorParamIndices,
|
||||
true,
|
||||
returnType,
|
||||
withAllocators ) },
|
||||
{ "nodiscard", nodiscard },
|
||||
{ "returnType", returnType },
|
||||
{ "typeCheck", typeCheck } } );
|
||||
}
|
||||
else
|
||||
{
|
||||
const std::string functionTemplate =
|
||||
R"( template <typename Allocator = std::allocator<${templateType}>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${typeCheck}>
|
||||
${nodiscard}typename ResultValueType<${returnType}>::type ${commandName}( ${argumentList} ) const;)";
|
||||
|
||||
std::string typeCheck =
|
||||
withAllocators ? ", typename B = Allocator, typename std::enable_if<std::is_same<typename B::value_type, " +
|
||||
templateType + ">::value, int>::type = 0"
|
||||
: "";
|
||||
|
||||
return replaceWithMap( functionTemplate,
|
||||
{ { "argumentList", argumentList },
|
||||
{ "commandName", commandName },
|
||||
{ "nodiscard", nodiscard },
|
||||
{ "returnType", returnType },
|
||||
{ "templateType", templateType },
|
||||
{ "typeCheck", typeCheck } } );
|
||||
}
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandResultGetChain( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
@ -4546,13 +4464,9 @@ std::string VulkanHppGenerator::generateCommandResultMultiSuccessWithErrors3Retu
|
||||
{
|
||||
if ( returnParamIndices[2] == std::next( vectorParamIndices.begin() )->first )
|
||||
{
|
||||
return generateCommandSetStandardEnhancedWithAllocatorDeprecated2(
|
||||
return generateCommandSetStandardEnhancedWithAllocator(
|
||||
definition,
|
||||
generateCommandStandard( name, commandData, initialSkipCount, definition ),
|
||||
generateCommandResultEnumerateTwoVectorsDeprecated(
|
||||
name, commandData, initialSkipCount, definition, vectorParamIndices, false ),
|
||||
generateCommandResultEnumerateTwoVectorsDeprecated(
|
||||
name, commandData, initialSkipCount, definition, vectorParamIndices, true ),
|
||||
generateCommandResultEnumerateTwoVectors(
|
||||
name, commandData, initialSkipCount, definition, vectorParamIndices, returnParamIndices, false ),
|
||||
generateCommandResultEnumerateTwoVectors(
|
||||
@ -5161,34 +5075,6 @@ ${commandEnhancedSingular}
|
||||
{ "newlineOnDefinition", definition ? "\n" : "" } } ) );
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandSetStandardEnhancedWithAllocatorDeprecated2(
|
||||
bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhancedDeprecated,
|
||||
std::string const & enhancedWithAllocatorDeprecated,
|
||||
std::string const & enhanced,
|
||||
std::string const & enhancedWithAllocator ) const
|
||||
{
|
||||
const std::string commandTemplate = R"(
|
||||
${commandStandard}${newlineOnDefinition}
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
${commandEnhancedDeprecated}${newlineOnDefinition}
|
||||
${commandEnhancedWithAllocatorDeprecated}${newlineOnDefinition}
|
||||
${commandEnhanced}${newlineOnDefinition}
|
||||
${commandEnhancedWithAllocator}
|
||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||
)";
|
||||
|
||||
return replaceWithMap(
|
||||
commandTemplate,
|
||||
std::map<std::string, std::string>( { { "commandEnhanced", enhanced },
|
||||
{ "commandEnhancedDeprecated", enhancedDeprecated },
|
||||
{ "commandEnhancedWithAllocator", enhancedWithAllocator },
|
||||
{ "commandEnhancedWithAllocatorDeprecated", enhancedWithAllocatorDeprecated },
|
||||
{ "commandStandard", standard },
|
||||
{ "newlineOnDefinition", definition ? "\n" : "" } } ) );
|
||||
}
|
||||
|
||||
std::string VulkanHppGenerator::generateCommandSetStandardEnhancedWithAllocatorSingular(
|
||||
bool definition,
|
||||
std::string const & standard,
|
||||
|
@ -471,12 +471,6 @@ private:
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
std::vector<size_t> const & returnParamIndices,
|
||||
bool withAllocators ) const;
|
||||
std::string generateCommandResultEnumerateTwoVectorsDeprecated( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
bool definition,
|
||||
std::map<size_t, size_t> const & vectorParamIndices,
|
||||
bool withAllocators ) const;
|
||||
std::string generateCommandResultGetChain( std::string const & name,
|
||||
CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
@ -684,19 +678,12 @@ private:
|
||||
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;
|
||||
std::string
|
||||
generateCommandSetStandardEnhancedWithAllocatorDeprecated2( bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhancedDeprecated,
|
||||
std::string const & enhancedWithAllocatorDeprecated,
|
||||
std::string const & enhanced,
|
||||
std::string const & enhancedWithAllocator ) const;
|
||||
generateCommandSetStandardEnhancedWithAllocatorSingularDeprecated( bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhancedDeprecated,
|
||||
std::string const & enhanced,
|
||||
std::string const & enhancedWithAllocator,
|
||||
std::string const & enhancedSingular ) const;
|
||||
std::string generateCommandSetStandardEnhancedWithAllocatorSingular( bool definition,
|
||||
std::string const & standard,
|
||||
std::string const & enhanced,
|
||||
|
@ -12309,97 +12309,6 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename Allocator, typename Dispatch>
|
||||
VULKAN_HPP_DEPRECATED( "This function is deprecated. Use one of the other flavours of it." )
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE
|
||||
typename ResultValueType<std::vector<PerformanceCounterDescriptionKHR, Allocator>>::type
|
||||
PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR(
|
||||
uint32_t queueFamilyIndex,
|
||||
ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> const & counters,
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
std::vector<PerformanceCounterDescriptionKHR, Allocator> counterDescriptions;
|
||||
uint32_t counterCount;
|
||||
Result result;
|
||||
do
|
||||
{
|
||||
result = static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
|
||||
m_physicalDevice,
|
||||
queueFamilyIndex,
|
||||
counters.size(),
|
||||
reinterpret_cast<VkPerformanceCounterKHR *>( counters.data() ),
|
||||
nullptr ) );
|
||||
if ( ( result == Result::eSuccess ) && counterCount )
|
||||
{
|
||||
counterDescriptions.resize( counterCount );
|
||||
result = static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
|
||||
m_physicalDevice,
|
||||
queueFamilyIndex,
|
||||
counters.size(),
|
||||
reinterpret_cast<VkPerformanceCounterKHR *>( counters.data() ),
|
||||
reinterpret_cast<VkPerformanceCounterDescriptionKHR *>( counterDescriptions.data() ) ) );
|
||||
}
|
||||
} while ( result == Result::eIncomplete );
|
||||
if ( result == Result::eSuccess )
|
||||
{
|
||||
VULKAN_HPP_ASSERT( counterCount <= counterDescriptions.size() );
|
||||
counterDescriptions.resize( counterCount );
|
||||
}
|
||||
return createResultValue( result,
|
||||
counterDescriptions,
|
||||
VULKAN_HPP_NAMESPACE_STRING
|
||||
"::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" );
|
||||
}
|
||||
|
||||
template <
|
||||
typename Allocator,
|
||||
typename Dispatch,
|
||||
typename B,
|
||||
typename std::enable_if<std::is_same<typename B::value_type, PerformanceCounterDescriptionKHR>::value, int>::type>
|
||||
VULKAN_HPP_DEPRECATED( "This function is deprecated. Use one of the other flavours of it." )
|
||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE
|
||||
typename ResultValueType<std::vector<PerformanceCounterDescriptionKHR, Allocator>>::type
|
||||
PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR(
|
||||
uint32_t queueFamilyIndex,
|
||||
ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> const & counters,
|
||||
Allocator const & vectorAllocator,
|
||||
Dispatch const & d ) const
|
||||
{
|
||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||
std::vector<PerformanceCounterDescriptionKHR, Allocator> counterDescriptions( vectorAllocator );
|
||||
uint32_t counterCount;
|
||||
Result result;
|
||||
do
|
||||
{
|
||||
result = static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
|
||||
m_physicalDevice,
|
||||
queueFamilyIndex,
|
||||
counters.size(),
|
||||
reinterpret_cast<VkPerformanceCounterKHR *>( counters.data() ),
|
||||
nullptr ) );
|
||||
if ( ( result == Result::eSuccess ) && counterCount )
|
||||
{
|
||||
counterDescriptions.resize( counterCount );
|
||||
result = static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
|
||||
m_physicalDevice,
|
||||
queueFamilyIndex,
|
||||
counters.size(),
|
||||
reinterpret_cast<VkPerformanceCounterKHR *>( counters.data() ),
|
||||
reinterpret_cast<VkPerformanceCounterDescriptionKHR *>( counterDescriptions.data() ) ) );
|
||||
}
|
||||
} while ( result == Result::eIncomplete );
|
||||
if ( result == Result::eSuccess )
|
||||
{
|
||||
VULKAN_HPP_ASSERT( counterCount <= counterDescriptions.size() );
|
||||
counterDescriptions.resize( counterCount );
|
||||
}
|
||||
return createResultValue( result,
|
||||
counterDescriptions,
|
||||
VULKAN_HPP_NAMESPACE_STRING
|
||||
"::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" );
|
||||
}
|
||||
|
||||
template <typename PerformanceCounterKHRAllocator,
|
||||
typename PerformanceCounterDescriptionKHRAllocator,
|
||||
typename Dispatch>
|
||||
|
@ -13145,24 +13145,6 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR * pCounterDescriptions,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||
template <typename Allocator = std::allocator<PerformanceCounterDescriptionKHR>,
|
||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PerformanceCounterDescriptionKHR, Allocator>>::type
|
||||
enumerateQueueFamilyPerformanceQueryCountersKHR(
|
||||
uint32_t queueFamilyIndex,
|
||||
ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> const & counters,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||
template <typename Allocator = std::allocator<PerformanceCounterDescriptionKHR>,
|
||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
||||
typename B = Allocator,
|
||||
typename std::enable_if<std::is_same<typename B::value_type, PerformanceCounterDescriptionKHR>::value,
|
||||
int>::type = 0>
|
||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PerformanceCounterDescriptionKHR, Allocator>>::type
|
||||
enumerateQueueFamilyPerformanceQueryCountersKHR(
|
||||
uint32_t queueFamilyIndex,
|
||||
ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> const & counters,
|
||||
Allocator const & vectorAllocator,
|
||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||
template <typename PerformanceCounterKHRAllocator = std::allocator<PerformanceCounterKHR>,
|
||||
typename PerformanceCounterDescriptionKHRAllocator = std::allocator<PerformanceCounterDescriptionKHR>,
|
||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
|
Loading…
Reference in New Issue
Block a user