Merge pull request #802 from asuessenbach/refactor

Refactor commands enumerating a vector of chained structures.
This commit is contained in:
Andreas Süßenbach 2020-10-24 23:32:38 +02:00 committed by GitHub
commit 93c7bf5894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 490 additions and 701 deletions

File diff suppressed because it is too large Load Diff

View File

@ -315,8 +315,8 @@ private:
void appendCommandChained( std::string & str, void appendCommandChained( std::string & str,
std::string const & name, std::string const & name,
CommandData const & commandData, CommandData const & commandData,
size_t nonConstPointerIndex, bool definition,
bool definition ) const; size_t nonConstPointerIndex ) const;
void appendCommandSingular( std::string & str, void appendCommandSingular( std::string & str,
std::string const & name, std::string const & name,
CommandData const & commandData, CommandData const & commandData,
@ -354,6 +354,11 @@ private:
CommandData const & commandData, CommandData const & commandData,
bool definition, bool definition,
std::pair<size_t, size_t> const & vectorParamIndex ) const; std::pair<size_t, size_t> const & vectorParamIndex ) const;
void appendCommandVectorChained( std::string & str,
std::string const & name,
CommandData const & commandData,
bool definition,
std::map<size_t, size_t> const & vectorParamIndices ) const;
void appendCommandVectorDeprecated( std::string & str, void appendCommandVectorDeprecated( std::string & str,
std::string const & name, std::string const & name,
CommandData const & commandData, CommandData const & commandData,
@ -424,17 +429,6 @@ private:
size_t templateParamIndex, size_t templateParamIndex,
std::map<size_t, size_t> const & vectorParamIndices, std::map<size_t, size_t> const & vectorParamIndices,
std::string const & returnName ) const; std::string const & returnName ) const;
void appendFunctionBodyEnhancedVectorOfStructureChain( std::string & str,
std::string const & indentation,
std::string const & name,
CommandData const & commandData,
size_t returnParamIndex,
std::map<size_t, size_t> const & vectorParamIndices,
bool withAllocator ) const;
void appendFunctionBodyStandardArgument( std::string & str,
TypeInfo const & typeData,
std::string const & name,
std::vector<std::string> const & arraySizes ) const;
bool appendFunctionHeaderArgumentEnhanced( std::string & str, bool appendFunctionHeaderArgumentEnhanced( std::string & str,
ParamData const & param, ParamData const & param,
size_t paramIndex, size_t paramIndex,
@ -464,17 +458,7 @@ private:
size_t returnParamIndex, size_t returnParamIndex,
std::string const & enhancedReturnType, std::string const & enhancedReturnType,
bool enhanced, bool enhanced,
bool twoStep,
bool isStructureChain ) const; bool isStructureChain ) const;
void appendFunctionHeaderTemplate( std::string & str,
std::string const & indentation,
size_t returnParamIndex,
size_t templateParamIndex,
std::string const & enhancedReturnType,
bool enhanced,
bool withDefault,
bool isStructureChain,
bool withAllocatorArgument ) const;
void appendHandle( std::string & str, std::pair<std::string, HandleData> const & handle ); void appendHandle( std::string & str, std::pair<std::string, HandleData> const & handle );
void appendStruct( std::string & str, std::pair<std::string, StructureData> const & structure ); void appendStruct( std::string & str, std::pair<std::string, StructureData> const & structure );
void appendStructAssignmentOperators( std::string & str, void appendStructAssignmentOperators( std::string & str,
@ -511,7 +495,8 @@ private:
std::set<size_t> const & skippedParams, std::set<size_t> const & skippedParams,
size_t singularParam, size_t singularParam,
bool definition, bool definition,
bool withAllocators ) const; bool withAllocators,
bool structureChain ) const;
std::string constructArgumentListStandard( std::vector<ParamData> const & params, std::string constructArgumentListStandard( std::vector<ParamData> const & params,
std::set<size_t> const & skippedParams, std::set<size_t> const & skippedParams,
bool definition ) const; bool definition ) const;
@ -630,6 +615,11 @@ private:
bool definition, bool definition,
std::pair<size_t, size_t> const & vectorParamIndex, std::pair<size_t, size_t> const & vectorParamIndex,
bool withAllocators ) const; bool withAllocators ) const;
std::string constructCommandVoidEnumerateChained( std::string const & name,
CommandData const & commandData,
bool definition,
std::pair<size_t, size_t> const & vectorParamIndex,
bool withAllocators ) const;
std::string constructCommandVoidGetChain( std::string const & name, std::string constructCommandVoidGetChain( std::string const & name,
CommandData const & commandData, CommandData const & commandData,
bool definition, bool definition,
@ -647,7 +637,6 @@ private:
std::map<size_t, size_t> const & vectorParamIndices, std::map<size_t, size_t> const & vectorParamIndices,
bool twoStep, bool twoStep,
std::string const & enhancedReturnType, std::string const & enhancedReturnType,
bool isStructureChain,
bool withAllocator ) const; bool withAllocator ) const;
std::string constructFunctionBodyEnhancedSingleStep( std::string const & indentation, std::string constructFunctionBodyEnhancedSingleStep( std::string const & indentation,
std::string const & name, std::string const & name,
@ -691,11 +680,8 @@ private:
std::vector<size_t> const & returnParamIndex, std::vector<size_t> const & returnParamIndex,
bool singular ) const; bool singular ) const;
std::string determineSubStruct( std::pair<std::string, StructureData> const & structure ) const; std::string determineSubStruct( std::pair<std::string, StructureData> const & structure ) const;
size_t determineTemplateParamIndex( std::vector<ParamData> const & params,
std::map<size_t, size_t> const & vectorParamIndices ) const;
std::vector<size_t> determineConstPointerParamIndices( std::vector<ParamData> const & params ) const; std::vector<size_t> determineConstPointerParamIndices( std::vector<ParamData> const & params ) const;
std::vector<size_t> determineNonConstPointerParamIndices( std::vector<ParamData> const & params ) const; std::vector<size_t> determineNonConstPointerParamIndices( std::vector<ParamData> const & params ) const;
std::map<size_t, size_t> determineVectorParamIndices( std::vector<ParamData> const & params ) const;
std::map<size_t, size_t> determineVectorParamIndicesNew( std::vector<ParamData> const & params ) const; std::map<size_t, size_t> determineVectorParamIndicesNew( std::vector<ParamData> const & params ) const;
std::string generateLenInitializer( std::string generateLenInitializer(
std::vector<MemberData>::const_iterator mit, std::vector<MemberData>::const_iterator mit,
@ -717,7 +703,6 @@ private:
bool isParamIndirect( std::string const & name, std::vector<ParamData> const & params ) const; bool isParamIndirect( std::string const & name, std::vector<ParamData> const & params ) const;
bool isParamIndirect( std::string const & name, ParamData const & param ) const; bool isParamIndirect( std::string const & name, ParamData const & param ) const;
bool isStructureChainAnchor( std::string const & type ) const; bool isStructureChainAnchor( std::string const & type ) const;
bool isTwoStepAlgorithm( std::vector<ParamData> const & params ) const;
bool needsComplexBody( CommandData const & commandData ) const; bool needsComplexBody( CommandData const & commandData ) const;
std::pair<bool, std::map<size_t, std::vector<size_t>>> std::pair<bool, std::map<size_t, std::vector<size_t>>>
needsVectorSizeCheck( std::map<size_t, size_t> const & vectorParamIndices ) const; needsVectorSizeCheck( std::map<size_t, size_t> const & vectorParamIndices ) const;

View File

@ -61453,69 +61453,69 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void getQueueFamilyProperties2( uint32_t * pQueueFamilyPropertyCount, void getQueueFamilyProperties2(
VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, uint32_t * pQueueFamilyPropertyCount,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
VULKAN_HPP_NOEXCEPT; Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<QueueFamilyProperties2>, template <typename QueueFamilyProperties2Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<QueueFamilyProperties2, Allocator> VULKAN_HPP_NODISCARD std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template < template <
typename Allocator = std::allocator<QueueFamilyProperties2>, typename QueueFamilyProperties2Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator, typename B = QueueFamilyProperties2Allocator,
typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type = 0> typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type = 0>
std::vector<QueueFamilyProperties2, Allocator> VULKAN_HPP_NODISCARD std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
getQueueFamilyProperties2( Allocator const & vectorAllocator, getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename StructureChain, template <typename StructureChain,
typename Allocator = std::allocator<StructureChain>, typename StructureChainAllocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<StructureChain, Allocator> VULKAN_HPP_NODISCARD std::vector<StructureChain, StructureChainAllocator>
getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename StructureChain, template <typename StructureChain,
typename Allocator = std::allocator<StructureChain>, typename StructureChainAllocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator, typename B = StructureChainAllocator,
typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type = 0> typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type = 0>
std::vector<StructureChain, Allocator> VULKAN_HPP_NODISCARD std::vector<StructureChain, StructureChainAllocator>
getQueueFamilyProperties2( Allocator const & vectorAllocator, getQueueFamilyProperties2( StructureChainAllocator & structureChainAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void getQueueFamilyProperties2KHR( uint32_t * pQueueFamilyPropertyCount, void getQueueFamilyProperties2KHR(
VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, uint32_t * pQueueFamilyPropertyCount,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
VULKAN_HPP_NOEXCEPT; Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<QueueFamilyProperties2>, template <typename QueueFamilyProperties2Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<QueueFamilyProperties2, Allocator> VULKAN_HPP_NODISCARD std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template < template <
typename Allocator = std::allocator<QueueFamilyProperties2>, typename QueueFamilyProperties2Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator, typename B = QueueFamilyProperties2Allocator,
typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type = 0> typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type = 0>
std::vector<QueueFamilyProperties2, Allocator> VULKAN_HPP_NODISCARD std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
getQueueFamilyProperties2KHR( Allocator const & vectorAllocator, getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename StructureChain, template <typename StructureChain,
typename Allocator = std::allocator<StructureChain>, typename StructureChainAllocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<StructureChain, Allocator> VULKAN_HPP_NODISCARD std::vector<StructureChain, StructureChainAllocator>
getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename StructureChain, template <typename StructureChain,
typename Allocator = std::allocator<StructureChain>, typename StructureChainAllocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator, typename B = StructureChainAllocator,
typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type = 0> typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type = 0>
std::vector<StructureChain, Allocator> VULKAN_HPP_NODISCARD std::vector<StructureChain, StructureChainAllocator>
getQueueFamilyProperties2KHR( Allocator const & vectorAllocator, getQueueFamilyProperties2KHR( StructureChainAllocator & structureChainAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@ -105463,85 +105463,99 @@ namespace VULKAN_HPP_NAMESPACE
pQueueFamilyPropertyCount, pQueueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( pQueueFamilyProperties ) ); reinterpret_cast<VkQueueFamilyProperties2 *>( pQueueFamilyProperties ) );
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator, typename Dispatch> template <typename QueueFamilyProperties2Allocator, typename Dispatch>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, Allocator> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const
{ {
std::vector<QueueFamilyProperties2, Allocator> queueFamilyProperties; std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount; uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount );
d.vkGetPhysicalDeviceQueueFamilyProperties2( d.vkGetPhysicalDeviceQueueFamilyProperties2(
m_physicalDevice, m_physicalDevice,
&queueFamilyPropertyCount, &queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) ); reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
return queueFamilyProperties; return queueFamilyProperties;
} }
template <typename Allocator,
template <typename QueueFamilyProperties2Allocator,
typename Dispatch, typename Dispatch,
typename B, typename B,
typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type> typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, Allocator> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2( Allocator const & vectorAllocator, Dispatch const & d ) const PhysicalDevice::getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d ) const
{ {
std::vector<QueueFamilyProperties2, Allocator> queueFamilyProperties( vectorAllocator ); std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties(
uint32_t queueFamilyPropertyCount; queueFamilyProperties2Allocator );
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount );
d.vkGetPhysicalDeviceQueueFamilyProperties2( d.vkGetPhysicalDeviceQueueFamilyProperties2(
m_physicalDevice, m_physicalDevice,
&queueFamilyPropertyCount, &queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) ); reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
return queueFamilyProperties; return queueFamilyProperties;
} }
template <typename StructureChain, typename Allocator, typename Dispatch>
VULKAN_HPP_INLINE std::vector<StructureChain, Allocator> template <typename StructureChain, typename StructureChainAllocator, typename Dispatch>
PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<StructureChain, StructureChainAllocator>
PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const
{ {
std::vector<StructureChain, Allocator> queueFamilyProperties; uint32_t queueFamilyPropertyCount;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount ); std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{ {
localVector[i].pNext = queueFamilyProperties[i].pNext =
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext; returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
} }
d.vkGetPhysicalDeviceQueueFamilyProperties2( d.vkGetPhysicalDeviceQueueFamilyProperties2(
m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2 *>( localVector.data() ) ); m_physicalDevice,
&queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{ {
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = localVector[i]; returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = queueFamilyProperties[i];
} }
return queueFamilyProperties; return returnVector;
} }
template <typename StructureChain, template <typename StructureChain,
typename Allocator, typename StructureChainAllocator,
typename Dispatch, typename Dispatch,
typename B, typename B,
typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type> typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type>
VULKAN_HPP_INLINE std::vector<StructureChain, Allocator> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<StructureChain, StructureChainAllocator>
PhysicalDevice::getQueueFamilyProperties2( Allocator const & vectorAllocator, Dispatch const & d ) const PhysicalDevice::getQueueFamilyProperties2( StructureChainAllocator & structureChainAllocator,
Dispatch const & d ) const
{ {
std::vector<StructureChain, Allocator> queueFamilyProperties( vectorAllocator ); uint32_t queueFamilyPropertyCount;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount,
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount ); structureChainAllocator );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{ {
localVector[i].pNext = queueFamilyProperties[i].pNext =
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext; returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
} }
d.vkGetPhysicalDeviceQueueFamilyProperties2( d.vkGetPhysicalDeviceQueueFamilyProperties2(
m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2 *>( localVector.data() ) ); m_physicalDevice,
&queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{ {
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = localVector[i]; returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = queueFamilyProperties[i];
} }
return queueFamilyProperties; return returnVector;
} }
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@ -105556,85 +105570,99 @@ namespace VULKAN_HPP_NAMESPACE
pQueueFamilyPropertyCount, pQueueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( pQueueFamilyProperties ) ); reinterpret_cast<VkQueueFamilyProperties2 *>( pQueueFamilyProperties ) );
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator, typename Dispatch> template <typename QueueFamilyProperties2Allocator, typename Dispatch>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, Allocator> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const
{ {
std::vector<QueueFamilyProperties2, Allocator> queueFamilyProperties; std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount; uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount );
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( d.vkGetPhysicalDeviceQueueFamilyProperties2KHR(
m_physicalDevice, m_physicalDevice,
&queueFamilyPropertyCount, &queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) ); reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
return queueFamilyProperties; return queueFamilyProperties;
} }
template <typename Allocator,
template <typename QueueFamilyProperties2Allocator,
typename Dispatch, typename Dispatch,
typename B, typename B,
typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type> typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, Allocator> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Allocator const & vectorAllocator, Dispatch const & d ) const PhysicalDevice::getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d ) const
{ {
std::vector<QueueFamilyProperties2, Allocator> queueFamilyProperties( vectorAllocator ); std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties(
uint32_t queueFamilyPropertyCount; queueFamilyProperties2Allocator );
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount );
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( d.vkGetPhysicalDeviceQueueFamilyProperties2KHR(
m_physicalDevice, m_physicalDevice,
&queueFamilyPropertyCount, &queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) ); reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
return queueFamilyProperties; return queueFamilyProperties;
} }
template <typename StructureChain, typename Allocator, typename Dispatch>
VULKAN_HPP_INLINE std::vector<StructureChain, Allocator> template <typename StructureChain, typename StructureChainAllocator, typename Dispatch>
PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<StructureChain, StructureChainAllocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const
{ {
std::vector<StructureChain, Allocator> queueFamilyProperties; uint32_t queueFamilyPropertyCount;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount ); std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{ {
localVector[i].pNext = queueFamilyProperties[i].pNext =
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext; returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
} }
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( d.vkGetPhysicalDeviceQueueFamilyProperties2KHR(
m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2 *>( localVector.data() ) ); m_physicalDevice,
&queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{ {
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = localVector[i]; returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = queueFamilyProperties[i];
} }
return queueFamilyProperties; return returnVector;
} }
template <typename StructureChain, template <typename StructureChain,
typename Allocator, typename StructureChainAllocator,
typename Dispatch, typename Dispatch,
typename B, typename B,
typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type> typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type>
VULKAN_HPP_INLINE std::vector<StructureChain, Allocator> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<StructureChain, StructureChainAllocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Allocator const & vectorAllocator, Dispatch const & d ) const PhysicalDevice::getQueueFamilyProperties2KHR( StructureChainAllocator & structureChainAllocator,
Dispatch const & d ) const
{ {
std::vector<StructureChain, Allocator> queueFamilyProperties( vectorAllocator ); uint32_t queueFamilyPropertyCount;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount,
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount ); structureChainAllocator );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{ {
localVector[i].pNext = queueFamilyProperties[i].pNext =
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext; returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
} }
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( d.vkGetPhysicalDeviceQueueFamilyProperties2KHR(
m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2 *>( localVector.data() ) ); m_physicalDevice,
&queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{ {
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = localVector[i]; returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>() = queueFamilyProperties[i];
} }
return queueFamilyProperties; return returnVector;
} }
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/