Refactor commands that enumerate handles (no unique versions)

This commit is contained in:
asuessenbach
2020-10-21 10:06:25 +02:00
parent ffafec88ca
commit dc4777a206
2 changed files with 158 additions and 139 deletions

View File

@@ -55479,22 +55479,22 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD Result
getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
uint32_t * pSwapchainImageCount,
VULKAN_HPP_NAMESPACE::Image * pSwapchainImages,
getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
uint32_t * pSwapchainImageCount,
VULKAN_HPP_NAMESPACE::Image * pSwapchainImages 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<Image>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<Image, Allocator>>::type
template <typename ImageAllocator = std::allocator<Image>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<Image, ImageAllocator>>::type
getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename Allocator = std::allocator<Image>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator,
template <typename ImageAllocator = std::allocator<Image>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = ImageAllocator,
typename std::enable_if<std::is_same<typename B::value_type, Image>::value, int>::type = 0>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<Image, Allocator>>::type
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<Image, ImageAllocator>>::type
getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
Allocator const & vectorAllocator,
ImageAllocator & imageAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -60892,23 +60892,24 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD Result getDisplayPlaneSupportedDisplaysKHR(
uint32_t planeIndex,
uint32_t * pDisplayCount,
VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
uint32_t planeIndex,
uint32_t * pDisplayCount,
VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays 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<DisplayKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DisplayKHR, Allocator>>::type
template <typename DisplayKHRAllocator = std::allocator<DisplayKHR>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename Allocator = std::allocator<DisplayKHR>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator,
template <typename DisplayKHRAllocator = std::allocator<DisplayKHR>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = DisplayKHRAllocator,
typename std::enable_if<std::is_same<typename B::value_type, DisplayKHR>::value, int>::type = 0>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DisplayKHR, Allocator>>::type
getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
Allocator const & vectorAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
DisplayKHRAllocator & displayKHRAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@@ -90179,22 +90180,22 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD Result
enumeratePhysicalDevices( uint32_t * pPhysicalDeviceCount,
VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
VULKAN_HPP_NODISCARD Result enumeratePhysicalDevices(
uint32_t * pPhysicalDeviceCount,
VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices 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<PhysicalDevice>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PhysicalDevice, Allocator>>::type
template <typename PhysicalDeviceAllocator = std::allocator<PhysicalDevice>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
enumeratePhysicalDevices( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
template <typename Allocator = std::allocator<PhysicalDevice>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = Allocator,
template <typename PhysicalDeviceAllocator = std::allocator<PhysicalDevice>,
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename B = PhysicalDeviceAllocator,
typename std::enable_if<std::is_same<typename B::value_type, PhysicalDevice>::value, int>::type = 0>
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PhysicalDevice, Allocator>>::type
enumeratePhysicalDevices( Allocator const & vectorAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@@ -100780,14 +100781,15 @@ namespace VULKAN_HPP_NAMESPACE
pSwapchainImageCount,
reinterpret_cast<VkImage *>( pSwapchainImages ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator, typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image, Allocator>>::type
template <typename ImageAllocator, typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image, ImageAllocator>>::type
Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const
{
std::vector<Image, Allocator> swapchainImages;
uint32_t swapchainImageCount;
Result result;
std::vector<Image, ImageAllocator> swapchainImages;
uint32_t swapchainImageCount;
Result result;
do
{
result = static_cast<Result>( d.vkGetSwapchainImagesKHR(
@@ -100800,27 +100802,28 @@ namespace VULKAN_HPP_NAMESPACE
static_cast<VkSwapchainKHR>( swapchain ),
&swapchainImageCount,
reinterpret_cast<VkImage *>( swapchainImages.data() ) ) );
VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
}
} while ( result == Result::eIncomplete );
if ( result == Result::eSuccess )
if ( ( result == Result::eSuccess ) && ( swapchainImageCount < swapchainImages.size() ) )
{
VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
swapchainImages.resize( swapchainImageCount );
}
return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" );
}
template <typename Allocator,
template <typename ImageAllocator,
typename Dispatch,
typename B,
typename std::enable_if<std::is_same<typename B::value_type, Image>::value, int>::type>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image, Allocator>>::type
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image, ImageAllocator>>::type
Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
Allocator const & vectorAllocator,
ImageAllocator & imageAllocator,
Dispatch const & d ) const
{
std::vector<Image, Allocator> swapchainImages( vectorAllocator );
uint32_t swapchainImageCount;
Result result;
std::vector<Image, ImageAllocator> swapchainImages( imageAllocator );
uint32_t swapchainImageCount;
Result result;
do
{
result = static_cast<Result>( d.vkGetSwapchainImagesKHR(
@@ -100833,11 +100836,11 @@ namespace VULKAN_HPP_NAMESPACE
static_cast<VkSwapchainKHR>( swapchain ),
&swapchainImageCount,
reinterpret_cast<VkImage *>( swapchainImages.data() ) ) );
VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
}
} while ( result == Result::eIncomplete );
if ( result == Result::eSuccess )
if ( ( result == Result::eSuccess ) && ( swapchainImageCount < swapchainImages.size() ) )
{
VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
swapchainImages.resize( swapchainImageCount );
}
return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" );
@@ -103082,14 +103085,16 @@ namespace VULKAN_HPP_NAMESPACE
return static_cast<Result>( d.vkEnumeratePhysicalDevices(
m_instance, pPhysicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( pPhysicalDevices ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator, typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDevice, Allocator>>::type
Instance::enumeratePhysicalDevices( Dispatch const & d ) const
template <typename PhysicalDeviceAllocator, typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE
typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
Instance::enumeratePhysicalDevices( Dispatch const & d ) const
{
std::vector<PhysicalDevice, Allocator> physicalDevices;
uint32_t physicalDeviceCount;
Result result;
std::vector<PhysicalDevice, PhysicalDeviceAllocator> physicalDevices;
uint32_t physicalDeviceCount;
Result result;
do
{
result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
@@ -103098,26 +103103,28 @@ namespace VULKAN_HPP_NAMESPACE
physicalDevices.resize( physicalDeviceCount );
result = static_cast<Result>( d.vkEnumeratePhysicalDevices(
m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( physicalDevices.data() ) ) );
VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
}
} while ( result == Result::eIncomplete );
if ( result == Result::eSuccess )
if ( ( result == Result::eSuccess ) && ( physicalDeviceCount < physicalDevices.size() ) )
{
VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
physicalDevices.resize( physicalDeviceCount );
}
return createResultValue(
result, physicalDevices, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" );
}
template <typename Allocator,
template <typename PhysicalDeviceAllocator,
typename Dispatch,
typename B,
typename std::enable_if<std::is_same<typename B::value_type, PhysicalDevice>::value, int>::type>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDevice, Allocator>>::type
Instance::enumeratePhysicalDevices( Allocator const & vectorAllocator, Dispatch const & d ) const
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE
typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
Instance::enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d ) const
{
std::vector<PhysicalDevice, Allocator> physicalDevices( vectorAllocator );
uint32_t physicalDeviceCount;
Result result;
std::vector<PhysicalDevice, PhysicalDeviceAllocator> physicalDevices( physicalDeviceAllocator );
uint32_t physicalDeviceCount;
Result result;
do
{
result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
@@ -103126,11 +103133,11 @@ namespace VULKAN_HPP_NAMESPACE
physicalDevices.resize( physicalDeviceCount );
result = static_cast<Result>( d.vkEnumeratePhysicalDevices(
m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( physicalDevices.data() ) ) );
VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
}
} while ( result == Result::eIncomplete );
if ( result == Result::eSuccess )
if ( ( result == Result::eSuccess ) && ( physicalDeviceCount < physicalDevices.size() ) )
{
VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
physicalDevices.resize( physicalDeviceCount );
}
return createResultValue(
@@ -103912,14 +103919,15 @@ namespace VULKAN_HPP_NAMESPACE
return static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast<VkDisplayKHR *>( pDisplays ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator, typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR, Allocator>>::type
template <typename DisplayKHRAllocator, typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d ) const
{
std::vector<DisplayKHR, Allocator> displays;
uint32_t displayCount;
Result result;
std::vector<DisplayKHR, DisplayKHRAllocator> displays;
uint32_t displayCount;
Result result;
do
{
result = static_cast<Result>(
@@ -103929,28 +103937,29 @@ namespace VULKAN_HPP_NAMESPACE
displays.resize( displayCount );
result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR *>( displays.data() ) ) );
VULKAN_HPP_ASSERT( displayCount <= displays.size() );
}
} while ( result == Result::eIncomplete );
if ( result == Result::eSuccess )
if ( ( result == Result::eSuccess ) && ( displayCount < displays.size() ) )
{
VULKAN_HPP_ASSERT( displayCount <= displays.size() );
displays.resize( displayCount );
}
return createResultValue(
result, displays, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" );
}
template <typename Allocator,
template <typename DisplayKHRAllocator,
typename Dispatch,
typename B,
typename std::enable_if<std::is_same<typename B::value_type, DisplayKHR>::value, int>::type>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR, Allocator>>::type
PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
Allocator const & vectorAllocator,
Dispatch const & d ) const
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
DisplayKHRAllocator & displayKHRAllocator,
Dispatch const & d ) const
{
std::vector<DisplayKHR, Allocator> displays( vectorAllocator );
uint32_t displayCount;
Result result;
std::vector<DisplayKHR, DisplayKHRAllocator> displays( displayKHRAllocator );
uint32_t displayCount;
Result result;
do
{
result = static_cast<Result>(
@@ -103960,11 +103969,11 @@ namespace VULKAN_HPP_NAMESPACE
displays.resize( displayCount );
result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR *>( displays.data() ) ) );
VULKAN_HPP_ASSERT( displayCount <= displays.size() );
}
} while ( result == Result::eIncomplete );
if ( result == Result::eSuccess )
if ( ( result == Result::eSuccess ) && ( displayCount < displays.size() ) )
{
VULKAN_HPP_ASSERT( displayCount <= displays.size() );
displays.resize( displayCount );
}
return createResultValue(