Merge pull request #794 from asuessenbach/refactor
Refactor commands that enumerate handles (no unique versions)
This commit is contained in:
commit
ede635596c
@ -1161,36 +1161,22 @@ void VulkanHppGenerator::appendCommand( std::string & str,
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// one return parameter
|
// one return parameter
|
||||||
|
if ( isHandleType( commandData.params[nonConstPointerParamIndices[0]].type.type ) )
|
||||||
{
|
{
|
||||||
|
// get handle(s)
|
||||||
auto returnVectorParamIt = vectorParamIndices.find( nonConstPointerParamIndices[0] );
|
auto returnVectorParamIt = vectorParamIndices.find( nonConstPointerParamIndices[0] );
|
||||||
if ( returnVectorParamIt == vectorParamIndices.end() )
|
if ( returnVectorParamIt == vectorParamIndices.end() )
|
||||||
{
|
{
|
||||||
// the return parameter is not a vector
|
// the return parameter is not a vector -> get just one handle
|
||||||
if ( isHandleType( commandData.params[nonConstPointerParamIndices[0]].type.type ) )
|
if ( commandData.returnType == "VkResult" )
|
||||||
{
|
{
|
||||||
if ( commandData.returnType == "VkResult" )
|
// provide standard, enhanced, and unique call
|
||||||
{
|
appendCommandUnique( str, name, commandData, nonConstPointerParamIndices[0], definition );
|
||||||
// provide standard, enhanced, and unique call
|
|
||||||
appendCommandUnique( str, name, commandData, nonConstPointerParamIndices[0], definition );
|
|
||||||
appendedFunction = true;
|
|
||||||
}
|
|
||||||
else if ( commandData.returnType == "void" )
|
|
||||||
{
|
|
||||||
// it's a handle type, but without construction and destruction function; it's just get
|
|
||||||
assert( beginsWith( name, "vkGet" ) );
|
|
||||||
appendCommandStandardAndEnhanced(
|
|
||||||
str, name, commandData, definition, vectorParamIndices, nonConstPointerParamIndices );
|
|
||||||
appendedFunction = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( isStructureChainAnchor( commandData.params[nonConstPointerParamIndices[0]].type.type ) )
|
|
||||||
{
|
|
||||||
// provide standard, enhanced, and chained call
|
|
||||||
appendCommandChained( str, name, commandData, nonConstPointerParamIndices[0], definition );
|
|
||||||
appendedFunction = true;
|
appendedFunction = true;
|
||||||
}
|
}
|
||||||
else if ( ( commandData.returnType == "VkResult" ) || ( commandData.returnType == "void" ) )
|
else if ( ( commandData.returnType == "void" ) && beginsWith( name, "vkGet" ) )
|
||||||
{
|
{
|
||||||
|
// it's a handle type, but without construction and destruction function; it's just get
|
||||||
appendCommandStandardAndEnhanced(
|
appendCommandStandardAndEnhanced(
|
||||||
str, name, commandData, definition, vectorParamIndices, nonConstPointerParamIndices );
|
str, name, commandData, definition, vectorParamIndices, nonConstPointerParamIndices );
|
||||||
appendedFunction = true;
|
appendedFunction = true;
|
||||||
@ -1198,48 +1184,70 @@ void VulkanHppGenerator::appendCommand( std::string & str,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the return parameter is a vector
|
// get a vector of handles
|
||||||
if ( isHandleType( commandData.params[returnVectorParamIt->first].type.type ) )
|
if ( ( commandData.params[returnVectorParamIt->second].type.isValue() ) )
|
||||||
{
|
{
|
||||||
if ( ( commandData.params[returnVectorParamIt->second].type.isValue() ) )
|
if ( ( vectorParamIndices.size() == 2 ) &&
|
||||||
|
( vectorParamIndices.begin()->second == std::next( vectorParamIndices.begin() )->second ) )
|
||||||
{
|
{
|
||||||
assert( vectorParamIndices.size() == 2 );
|
|
||||||
assert( vectorParamIndices.begin()->second == std::next( vectorParamIndices.begin() )->second );
|
|
||||||
// provide standard, enhanced, vector, singular, and unique (and the combinations!) calls
|
// provide standard, enhanced, vector, singular, and unique (and the combinations!) calls
|
||||||
appendCommandVectorSingularUnique(
|
appendCommandVectorSingularUnique(
|
||||||
str, name, commandData, vectorParamIndices, nonConstPointerParamIndices[0], definition );
|
str, name, commandData, vectorParamIndices, nonConstPointerParamIndices[0], definition );
|
||||||
|
appendedFunction = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
assert( ( isParamIndirect( commandData.params[returnVectorParamIt->first].len,
|
|
||||||
commandData.params[returnVectorParamIt->second] ) ) );
|
|
||||||
assert( vectorParamIndices.size() == 1 );
|
|
||||||
// provide standard, enhanced, vector, and unique (and the combinations!) calls
|
|
||||||
appendCommandVectorUnique(
|
|
||||||
str, name, commandData, vectorParamIndices, nonConstPointerParamIndices[0], definition );
|
|
||||||
}
|
|
||||||
appendedFunction = true;
|
|
||||||
}
|
}
|
||||||
else if ( vectorParamIndices.size() == 1 )
|
else if ( ( ( isParamIndirect( commandData.params[returnVectorParamIt->first].len,
|
||||||
|
commandData.params[returnVectorParamIt->second] ) ) ) &&
|
||||||
|
( vectorParamIndices.size() == 1 ) )
|
||||||
{
|
{
|
||||||
assert( commandData.params[returnVectorParamIt->first].type.type == "void" );
|
// provide standard, enhanced, vector, and unique (and the combinations!) calls
|
||||||
assert( commandData.params[returnVectorParamIt->second].type.isValue() );
|
appendCommandVectorUnique(
|
||||||
// provide standard, enhanced, and singular calls
|
|
||||||
appendCommandSingular(
|
|
||||||
str, name, commandData, vectorParamIndices, nonConstPointerParamIndices[0], definition );
|
str, name, commandData, vectorParamIndices, nonConstPointerParamIndices[0], definition );
|
||||||
appendedFunction = true;
|
appendedFunction = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ( isStructureChainAnchor( commandData.params[nonConstPointerParamIndices[0]].type.type ) )
|
||||||
|
{
|
||||||
|
auto returnVectorParamIt = vectorParamIndices.find( nonConstPointerParamIndices[0] );
|
||||||
|
if ( returnVectorParamIt == vectorParamIndices.end() )
|
||||||
|
{
|
||||||
|
// provide standard, enhanced, and chained call
|
||||||
|
appendCommandChained( str, name, commandData, nonConstPointerParamIndices[0], definition );
|
||||||
|
appendedFunction = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
auto returnVectorParamIt = vectorParamIndices.find( nonConstPointerParamIndices[0] );
|
||||||
|
if ( returnVectorParamIt == vectorParamIndices.end() )
|
||||||
|
{
|
||||||
|
if ( ( commandData.returnType == "VkResult" ) || ( commandData.returnType == "void" ) )
|
||||||
|
{
|
||||||
|
appendCommandStandardAndEnhanced(
|
||||||
|
str, name, commandData, definition, vectorParamIndices, nonConstPointerParamIndices );
|
||||||
|
appendedFunction = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( ( vectorParamIndices.size() == 1 ) &&
|
||||||
|
( commandData.params[returnVectorParamIt->first].type.type == "void" ) &&
|
||||||
|
( commandData.params[returnVectorParamIt->second].type.isValue() ) )
|
||||||
|
{
|
||||||
|
// provide standard, enhanced, and singular calls
|
||||||
|
appendCommandSingular(
|
||||||
|
str, name, commandData, vectorParamIndices, nonConstPointerParamIndices[0], definition );
|
||||||
|
appendedFunction = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// two return parameters
|
// two return parameters
|
||||||
if ( !isHandleType( commandData.params[nonConstPointerParamIndices[0]].type.type ) &&
|
if ( !isHandleType( commandData.params[nonConstPointerParamIndices[0]].type.type ) &&
|
||||||
!isHandleType( commandData.params[nonConstPointerParamIndices[1]].type.type ) &&
|
|
||||||
!isStructureChainAnchor( commandData.params[nonConstPointerParamIndices[0]].type.type ) &&
|
!isStructureChainAnchor( commandData.params[nonConstPointerParamIndices[0]].type.type ) &&
|
||||||
!isStructureChainAnchor( commandData.params[nonConstPointerParamIndices[1]].type.type ) )
|
!isStructureChainAnchor( commandData.params[nonConstPointerParamIndices[1]].type.type ) )
|
||||||
{
|
{
|
||||||
// non of the return parameters is a handle or a StructureChain
|
// non of the return parameters is a StructureChain
|
||||||
|
// Note: if the vector returned holds handles, the function does not create them, but just gets them
|
||||||
switch ( vectorParamIndices.size() )
|
switch ( vectorParamIndices.size() )
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
@ -1264,13 +1272,15 @@ void VulkanHppGenerator::appendCommand( std::string & str,
|
|||||||
{
|
{
|
||||||
// two returns and two vectors! But one input vector, one output vector of the same size, and one output
|
// two returns and two vectors! But one input vector, one output vector of the same size, and one output
|
||||||
// value
|
// value
|
||||||
assert( vectorParamIndices.find( nonConstPointerParamIndices[0] ) != vectorParamIndices.end() );
|
if ( ( vectorParamIndices.find( nonConstPointerParamIndices[0] ) != vectorParamIndices.end() ) &&
|
||||||
assert( vectorParamIndices.find( nonConstPointerParamIndices[1] ) == vectorParamIndices.end() );
|
( vectorParamIndices.find( nonConstPointerParamIndices[1] ) == vectorParamIndices.end() ) &&
|
||||||
assert( commandData.returnType == "VkResult" );
|
( commandData.returnType == "VkResult" ) )
|
||||||
// provide standard, enhanced deprecated, enhanced, and enhanced with allocator calls
|
{
|
||||||
appendCommandStandardEnhancedDeprecatedAllocator(
|
// provide standard, enhanced deprecated, enhanced, and enhanced with allocator calls
|
||||||
str, name, commandData, definition, vectorParamIndices, nonConstPointerParamIndices );
|
appendCommandStandardEnhancedDeprecatedAllocator(
|
||||||
appendedFunction = true;
|
str, name, commandData, definition, vectorParamIndices, nonConstPointerParamIndices );
|
||||||
|
appendedFunction = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
@ -1279,10 +1289,10 @@ void VulkanHppGenerator::appendCommand( std::string & str,
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// three return parameters
|
// three return parameters
|
||||||
assert( ( vectorParamIndices.size() == 2 ) &&
|
if ( ( vectorParamIndices.size() == 2 ) &&
|
||||||
( vectorParamIndices.begin()->second == nonConstPointerParamIndices[0] ) &&
|
( vectorParamIndices.begin()->second == nonConstPointerParamIndices[0] ) &&
|
||||||
( vectorParamIndices.begin()->first == nonConstPointerParamIndices[1] ) &&
|
( vectorParamIndices.begin()->first == nonConstPointerParamIndices[1] ) &&
|
||||||
( std::next( vectorParamIndices.begin() )->first == nonConstPointerParamIndices[2] ) );
|
( std::next( vectorParamIndices.begin() )->first == nonConstPointerParamIndices[2] ) )
|
||||||
{
|
{
|
||||||
// two vector parameters
|
// two vector parameters
|
||||||
auto firstVectorParam = vectorParamIndices.begin();
|
auto firstVectorParam = vectorParamIndices.begin();
|
||||||
|
@ -55479,22 +55479,22 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
|
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD Result
|
VULKAN_HPP_NODISCARD Result
|
||||||
getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
|
getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
|
||||||
uint32_t * pSwapchainImageCount,
|
uint32_t * pSwapchainImageCount,
|
||||||
VULKAN_HPP_NAMESPACE::Image * pSwapchainImages,
|
VULKAN_HPP_NAMESPACE::Image * pSwapchainImages VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const 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<Image>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename ImageAllocator = std::allocator<Image>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
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,
|
getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Allocator = std::allocator<Image>,
|
template <typename ImageAllocator = std::allocator<Image>,
|
||||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
||||||
typename B = Allocator,
|
typename B = ImageAllocator,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, Image>::value, int>::type = 0>
|
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,
|
getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
|
||||||
Allocator const & vectorAllocator,
|
ImageAllocator & imageAllocator,
|
||||||
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*/
|
||||||
|
|
||||||
@ -60892,23 +60892,24 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
|
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD Result getDisplayPlaneSupportedDisplaysKHR(
|
VULKAN_HPP_NODISCARD Result getDisplayPlaneSupportedDisplaysKHR(
|
||||||
uint32_t planeIndex,
|
uint32_t planeIndex,
|
||||||
uint32_t * pDisplayCount,
|
uint32_t * pDisplayCount,
|
||||||
VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays,
|
VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const 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<DisplayKHR>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename DisplayKHRAllocator = std::allocator<DisplayKHR>,
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DisplayKHR, Allocator>>::type
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
|
||||||
getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
|
getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Allocator = std::allocator<DisplayKHR>,
|
template <typename DisplayKHRAllocator = std::allocator<DisplayKHR>,
|
||||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
||||||
typename B = Allocator,
|
typename B = DisplayKHRAllocator,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, DisplayKHR>::value, int>::type = 0>
|
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
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
|
||||||
getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
|
getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
|
||||||
Allocator const & vectorAllocator,
|
DisplayKHRAllocator & displayKHRAllocator,
|
||||||
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>
|
||||||
@ -90179,22 +90180,22 @@ 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>
|
||||||
VULKAN_HPP_NODISCARD Result
|
VULKAN_HPP_NODISCARD Result enumeratePhysicalDevices(
|
||||||
enumeratePhysicalDevices( uint32_t * pPhysicalDeviceCount,
|
uint32_t * pPhysicalDeviceCount,
|
||||||
VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices,
|
VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const 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<PhysicalDevice>,
|
template <typename PhysicalDeviceAllocator = std::allocator<PhysicalDevice>,
|
||||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PhysicalDevice, Allocator>>::type
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
|
||||||
enumeratePhysicalDevices( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
enumeratePhysicalDevices( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Allocator = std::allocator<PhysicalDevice>,
|
template <typename PhysicalDeviceAllocator = std::allocator<PhysicalDevice>,
|
||||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
||||||
typename B = Allocator,
|
typename B = PhysicalDeviceAllocator,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, PhysicalDevice>::value, int>::type = 0>
|
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
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
|
||||||
enumeratePhysicalDevices( Allocator const & vectorAllocator,
|
enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator,
|
||||||
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>
|
||||||
@ -100780,14 +100781,15 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
pSwapchainImageCount,
|
pSwapchainImageCount,
|
||||||
reinterpret_cast<VkImage *>( pSwapchainImages ) ) );
|
reinterpret_cast<VkImage *>( pSwapchainImages ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator, typename Dispatch>
|
template <typename ImageAllocator, typename Dispatch>
|
||||||
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, Dispatch const & d ) const
|
Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<Image, Allocator> swapchainImages;
|
std::vector<Image, ImageAllocator> swapchainImages;
|
||||||
uint32_t swapchainImageCount;
|
uint32_t swapchainImageCount;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>( d.vkGetSwapchainImagesKHR(
|
result = static_cast<Result>( d.vkGetSwapchainImagesKHR(
|
||||||
@ -100800,27 +100802,28 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
static_cast<VkSwapchainKHR>( swapchain ),
|
static_cast<VkSwapchainKHR>( swapchain ),
|
||||||
&swapchainImageCount,
|
&swapchainImageCount,
|
||||||
reinterpret_cast<VkImage *>( swapchainImages.data() ) ) );
|
reinterpret_cast<VkImage *>( swapchainImages.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( swapchainImageCount < swapchainImages.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
|
|
||||||
swapchainImages.resize( swapchainImageCount );
|
swapchainImages.resize( swapchainImageCount );
|
||||||
}
|
}
|
||||||
return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" );
|
return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" );
|
||||||
}
|
}
|
||||||
template <typename Allocator,
|
|
||||||
|
template <typename ImageAllocator,
|
||||||
typename Dispatch,
|
typename Dispatch,
|
||||||
typename B,
|
typename B,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, Image>::value, int>::type>
|
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,
|
Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
|
||||||
Allocator const & vectorAllocator,
|
ImageAllocator & imageAllocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<Image, Allocator> swapchainImages( vectorAllocator );
|
std::vector<Image, ImageAllocator> swapchainImages( imageAllocator );
|
||||||
uint32_t swapchainImageCount;
|
uint32_t swapchainImageCount;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>( d.vkGetSwapchainImagesKHR(
|
result = static_cast<Result>( d.vkGetSwapchainImagesKHR(
|
||||||
@ -100833,11 +100836,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
static_cast<VkSwapchainKHR>( swapchain ),
|
static_cast<VkSwapchainKHR>( swapchain ),
|
||||||
&swapchainImageCount,
|
&swapchainImageCount,
|
||||||
reinterpret_cast<VkImage *>( swapchainImages.data() ) ) );
|
reinterpret_cast<VkImage *>( swapchainImages.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( swapchainImageCount < swapchainImages.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
|
|
||||||
swapchainImages.resize( swapchainImageCount );
|
swapchainImages.resize( swapchainImageCount );
|
||||||
}
|
}
|
||||||
return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" );
|
return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" );
|
||||||
@ -103082,14 +103085,16 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>( d.vkEnumeratePhysicalDevices(
|
return static_cast<Result>( d.vkEnumeratePhysicalDevices(
|
||||||
m_instance, pPhysicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( pPhysicalDevices ) ) );
|
m_instance, pPhysicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( pPhysicalDevices ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator, typename Dispatch>
|
template <typename PhysicalDeviceAllocator, typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDevice, Allocator>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE
|
||||||
Instance::enumeratePhysicalDevices( Dispatch const & d ) const
|
typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
|
||||||
|
Instance::enumeratePhysicalDevices( Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<PhysicalDevice, Allocator> physicalDevices;
|
std::vector<PhysicalDevice, PhysicalDeviceAllocator> physicalDevices;
|
||||||
uint32_t physicalDeviceCount;
|
uint32_t physicalDeviceCount;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
|
result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
|
||||||
@ -103098,26 +103103,28 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
physicalDevices.resize( physicalDeviceCount );
|
physicalDevices.resize( physicalDeviceCount );
|
||||||
result = static_cast<Result>( d.vkEnumeratePhysicalDevices(
|
result = static_cast<Result>( d.vkEnumeratePhysicalDevices(
|
||||||
m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( physicalDevices.data() ) ) );
|
m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( physicalDevices.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( physicalDeviceCount < physicalDevices.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
|
|
||||||
physicalDevices.resize( physicalDeviceCount );
|
physicalDevices.resize( physicalDeviceCount );
|
||||||
}
|
}
|
||||||
return createResultValue(
|
return createResultValue(
|
||||||
result, physicalDevices, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" );
|
result, physicalDevices, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" );
|
||||||
}
|
}
|
||||||
template <typename Allocator,
|
|
||||||
|
template <typename PhysicalDeviceAllocator,
|
||||||
typename Dispatch,
|
typename Dispatch,
|
||||||
typename B,
|
typename B,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, PhysicalDevice>::value, int>::type>
|
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
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE
|
||||||
Instance::enumeratePhysicalDevices( Allocator const & vectorAllocator, Dispatch const & d ) const
|
typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
|
||||||
|
Instance::enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<PhysicalDevice, Allocator> physicalDevices( vectorAllocator );
|
std::vector<PhysicalDevice, PhysicalDeviceAllocator> physicalDevices( physicalDeviceAllocator );
|
||||||
uint32_t physicalDeviceCount;
|
uint32_t physicalDeviceCount;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
|
result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
|
||||||
@ -103126,11 +103133,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
physicalDevices.resize( physicalDeviceCount );
|
physicalDevices.resize( physicalDeviceCount );
|
||||||
result = static_cast<Result>( d.vkEnumeratePhysicalDevices(
|
result = static_cast<Result>( d.vkEnumeratePhysicalDevices(
|
||||||
m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( physicalDevices.data() ) ) );
|
m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( physicalDevices.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( physicalDeviceCount < physicalDevices.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
|
|
||||||
physicalDevices.resize( physicalDeviceCount );
|
physicalDevices.resize( physicalDeviceCount );
|
||||||
}
|
}
|
||||||
return createResultValue(
|
return createResultValue(
|
||||||
@ -103912,14 +103919,15 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
|
return static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
|
||||||
m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast<VkDisplayKHR *>( pDisplays ) ) );
|
m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast<VkDisplayKHR *>( pDisplays ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator, typename Dispatch>
|
template <typename DisplayKHRAllocator, typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR, Allocator>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
|
||||||
PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d ) const
|
PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<DisplayKHR, Allocator> displays;
|
std::vector<DisplayKHR, DisplayKHRAllocator> displays;
|
||||||
uint32_t displayCount;
|
uint32_t displayCount;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>(
|
result = static_cast<Result>(
|
||||||
@ -103929,28 +103937,29 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
displays.resize( displayCount );
|
displays.resize( displayCount );
|
||||||
result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
|
result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
|
||||||
m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR *>( displays.data() ) ) );
|
m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR *>( displays.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( displayCount <= displays.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( displayCount < displays.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( displayCount <= displays.size() );
|
|
||||||
displays.resize( displayCount );
|
displays.resize( displayCount );
|
||||||
}
|
}
|
||||||
return createResultValue(
|
return createResultValue(
|
||||||
result, displays, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" );
|
result, displays, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" );
|
||||||
}
|
}
|
||||||
template <typename Allocator,
|
|
||||||
|
template <typename DisplayKHRAllocator,
|
||||||
typename Dispatch,
|
typename Dispatch,
|
||||||
typename B,
|
typename B,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, DisplayKHR>::value, int>::type>
|
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
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
|
||||||
PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
|
PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex,
|
||||||
Allocator const & vectorAllocator,
|
DisplayKHRAllocator & displayKHRAllocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<DisplayKHR, Allocator> displays( vectorAllocator );
|
std::vector<DisplayKHR, DisplayKHRAllocator> displays( displayKHRAllocator );
|
||||||
uint32_t displayCount;
|
uint32_t displayCount;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>(
|
result = static_cast<Result>(
|
||||||
@ -103960,11 +103969,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
displays.resize( displayCount );
|
displays.resize( displayCount );
|
||||||
result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
|
result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
|
||||||
m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR *>( displays.data() ) ) );
|
m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR *>( displays.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( displayCount <= displays.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( displayCount < displays.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( displayCount <= displays.size() );
|
|
||||||
displays.resize( displayCount );
|
displays.resize( displayCount );
|
||||||
}
|
}
|
||||||
return createResultValue(
|
return createResultValue(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user