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,
std::string const & name,
CommandData const & commandData,
size_t nonConstPointerIndex,
bool definition ) const;
bool definition,
size_t nonConstPointerIndex ) const;
void appendCommandSingular( std::string & str,
std::string const & name,
CommandData const & commandData,
@ -354,6 +354,11 @@ private:
CommandData const & commandData,
bool definition,
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,
std::string const & name,
CommandData const & commandData,
@ -424,17 +429,6 @@ private:
size_t templateParamIndex,
std::map<size_t, size_t> const & vectorParamIndices,
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,
ParamData const & param,
size_t paramIndex,
@ -464,17 +458,7 @@ private:
size_t returnParamIndex,
std::string const & enhancedReturnType,
bool enhanced,
bool twoStep,
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 appendStruct( std::string & str, std::pair<std::string, StructureData> const & structure );
void appendStructAssignmentOperators( std::string & str,
@ -511,7 +495,8 @@ private:
std::set<size_t> const & skippedParams,
size_t singularParam,
bool definition,
bool withAllocators ) const;
bool withAllocators,
bool structureChain ) const;
std::string constructArgumentListStandard( std::vector<ParamData> const & params,
std::set<size_t> const & skippedParams,
bool definition ) const;
@ -630,6 +615,11 @@ private:
bool definition,
std::pair<size_t, size_t> const & vectorParamIndex,
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,
CommandData const & commandData,
bool definition,
@ -647,7 +637,6 @@ private:
std::map<size_t, size_t> const & vectorParamIndices,
bool twoStep,
std::string const & enhancedReturnType,
bool isStructureChain,
bool withAllocator ) const;
std::string constructFunctionBodyEnhancedSingleStep( std::string const & indentation,
std::string const & name,
@ -691,11 +680,8 @@ private:
std::vector<size_t> const & returnParamIndex,
bool singular ) 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> 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::string generateLenInitializer(
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, ParamData const & param ) const;
bool isStructureChainAnchor( std::string const & type ) const;
bool isTwoStepAlgorithm( std::vector<ParamData> const & params ) const;
bool needsComplexBody( CommandData const & commandData ) const;
std::pair<bool, std::map<size_t, std::vector<size_t>>>
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*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void getQueueFamilyProperties2( uint32_t * pQueueFamilyPropertyCount,
VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
VULKAN_HPP_NOEXCEPT;
void getQueueFamilyProperties2(
uint32_t * pQueueFamilyPropertyCount,
VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<QueueFamilyProperties2, Allocator>
getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename QueueFamilyProperties2Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <
typename Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator,
typename QueueFamilyProperties2Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = QueueFamilyProperties2Allocator,
typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type = 0>
std::vector<QueueFamilyProperties2, Allocator>
getQueueFamilyProperties2( Allocator const & vectorAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
VULKAN_HPP_NODISCARD std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename StructureChain,
typename Allocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<StructureChain, Allocator>
getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
typename StructureChainAllocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD std::vector<StructureChain, StructureChainAllocator>
getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename StructureChain,
typename Allocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator,
typename StructureChainAllocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = StructureChainAllocator,
typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type = 0>
std::vector<StructureChain, Allocator>
getQueueFamilyProperties2( Allocator const & vectorAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
VULKAN_HPP_NODISCARD std::vector<StructureChain, StructureChainAllocator>
getQueueFamilyProperties2( StructureChainAllocator & structureChainAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void getQueueFamilyProperties2KHR( uint32_t * pQueueFamilyPropertyCount,
VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
VULKAN_HPP_NOEXCEPT;
void getQueueFamilyProperties2KHR(
uint32_t * pQueueFamilyPropertyCount,
VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<QueueFamilyProperties2, Allocator>
getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename QueueFamilyProperties2Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <
typename Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator,
typename QueueFamilyProperties2Allocator = std::allocator<QueueFamilyProperties2>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = QueueFamilyProperties2Allocator,
typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type = 0>
std::vector<QueueFamilyProperties2, Allocator>
getQueueFamilyProperties2KHR( Allocator const & vectorAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
VULKAN_HPP_NODISCARD std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename StructureChain,
typename Allocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
std::vector<StructureChain, Allocator>
getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
typename StructureChainAllocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD std::vector<StructureChain, StructureChainAllocator>
getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename StructureChain,
typename Allocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator,
typename StructureChainAllocator = std::allocator<StructureChain>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = StructureChainAllocator,
typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type = 0>
std::vector<StructureChain, Allocator>
getQueueFamilyProperties2KHR( Allocator const & vectorAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
VULKAN_HPP_NODISCARD std::vector<StructureChain, StructureChainAllocator>
getQueueFamilyProperties2KHR( StructureChainAllocator & structureChainAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@ -105463,85 +105463,99 @@ namespace VULKAN_HPP_NAMESPACE
pQueueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( pQueueFamilyProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator, typename Dispatch>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, Allocator>
PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const
template <typename QueueFamilyProperties2Allocator, typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const
{
std::vector<QueueFamilyProperties2, Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount;
std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount );
d.vkGetPhysicalDeviceQueueFamilyProperties2(
m_physicalDevice,
&queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
return queueFamilyProperties;
}
template <typename Allocator,
template <typename QueueFamilyProperties2Allocator,
typename Dispatch,
typename B,
typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, Allocator>
PhysicalDevice::getQueueFamilyProperties2( Allocator const & vectorAllocator, Dispatch const & d ) const
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d ) const
{
std::vector<QueueFamilyProperties2, Allocator> queueFamilyProperties( vectorAllocator );
uint32_t queueFamilyPropertyCount;
std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties(
queueFamilyProperties2Allocator );
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount );
d.vkGetPhysicalDeviceQueueFamilyProperties2(
m_physicalDevice,
&queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
return queueFamilyProperties;
}
template <typename StructureChain, typename Allocator, typename Dispatch>
VULKAN_HPP_INLINE std::vector<StructureChain, Allocator>
PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const
template <typename StructureChain, typename StructureChainAllocator, typename Dispatch>
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 );
queueFamilyProperties.resize( queueFamilyPropertyCount );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount );
std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{
localVector[i].pNext =
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
queueFamilyProperties[i].pNext =
returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
}
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++ )
{
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,
typename Allocator,
typename StructureChainAllocator,
typename Dispatch,
typename B,
typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type>
VULKAN_HPP_INLINE std::vector<StructureChain, Allocator>
PhysicalDevice::getQueueFamilyProperties2( Allocator const & vectorAllocator, Dispatch const & d ) const
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<StructureChain, StructureChainAllocator>
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 );
queueFamilyProperties.resize( queueFamilyPropertyCount );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount );
std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount,
structureChainAllocator );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{
localVector[i].pNext =
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
queueFamilyProperties[i].pNext =
returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
}
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++ )
{
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*/
@ -105556,85 +105570,99 @@ namespace VULKAN_HPP_NAMESPACE
pQueueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( pQueueFamilyProperties ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator, typename Dispatch>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const
template <typename QueueFamilyProperties2Allocator, typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const
{
std::vector<QueueFamilyProperties2, Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount;
std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount );
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR(
m_physicalDevice,
&queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
return queueFamilyProperties;
}
template <typename Allocator,
template <typename QueueFamilyProperties2Allocator,
typename Dispatch,
typename B,
typename std::enable_if<std::is_same<typename B::value_type, QueueFamilyProperties2>::value, int>::type>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Allocator const & vectorAllocator, Dispatch const & d ) const
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d ) const
{
std::vector<QueueFamilyProperties2, Allocator> queueFamilyProperties( vectorAllocator );
uint32_t queueFamilyPropertyCount;
std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties(
queueFamilyProperties2Allocator );
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount );
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR(
m_physicalDevice,
&queueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) );
VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() );
return queueFamilyProperties;
}
template <typename StructureChain, typename Allocator, typename Dispatch>
VULKAN_HPP_INLINE std::vector<StructureChain, Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const
template <typename StructureChain, typename StructureChainAllocator, typename Dispatch>
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 );
queueFamilyProperties.resize( queueFamilyPropertyCount );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount );
std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{
localVector[i].pNext =
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
queueFamilyProperties[i].pNext =
returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
}
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++ )
{
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,
typename Allocator,
typename StructureChainAllocator,
typename Dispatch,
typename B,
typename std::enable_if<std::is_same<typename B::value_type, StructureChain>::value, int>::type>
VULKAN_HPP_INLINE std::vector<StructureChain, Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Allocator const & vectorAllocator, Dispatch const & d ) const
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<StructureChain, StructureChainAllocator>
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 );
queueFamilyProperties.resize( queueFamilyPropertyCount );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> localVector( queueFamilyPropertyCount );
std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount,
structureChainAllocator );
std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount );
for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ )
{
localVector[i].pNext =
queueFamilyProperties[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
queueFamilyProperties[i].pNext =
returnVector[i].template get<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2>().pNext;
}
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++ )
{
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*/