Refactor commands returning some value with no enhancements available.

This commit is contained in:
asuessenbach 2020-10-19 15:43:29 +02:00
parent d0717c5a48
commit 57de549b73
2 changed files with 17 additions and 48 deletions

View File

@ -1170,18 +1170,18 @@ void VulkanHppGenerator::appendCommand( std::string & str,
} ) == constPointerParamIndices.end() )
{
// no vector paramter and no non-void const-pointer
if ( commandData.returnType == "void" )
{
// void functions with no fancy input have just standard call
appendCommandStandard( str, name, commandData, definition );
appendedFunction = true;
}
else if ( commandData.returnType == "VkResult" )
if ( commandData.returnType == "VkResult" )
{
// function returning a result but no fancy input have either standard or enhanced call
appendCommandStandardOrEnhanced( str, name, commandData, definition );
appendedFunction = true;
}
else
{
// void functions and functions returning some value with no fancy input have just standard call
appendCommandStandard( str, name, commandData, definition );
appendedFunction = true;
}
}
else
{
@ -1571,16 +1571,17 @@ void VulkanHppGenerator::appendCommandStandard( std::string & str,
bool definition ) const
{
const std::string functionTemplate = R"(
${commandStandard}
)";
${enter}${commandStandard}
${leave})";
std::string enter, leave;
std::tie( enter, leave ) = generateProtection( commandData.feature, commandData.extensions );
assert( enter.empty() );
str += replaceWithMap( functionTemplate,
std::map<std::string, std::string>( {
{ "commandStandard", constructCommandStandard( name, commandData, definition ) },
{ "enter", enter },
{ "leave", leave }
} ) );
}

View File

@ -54512,18 +54512,11 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_ENABLE_BETA_EXTENSIONS
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
uint32_t getDeferredOperationMaxConcurrencyKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
VULKAN_HPP_NOEXCEPT;
# else
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
uint32_t getDeferredOperationMaxConcurrencyKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
VULKAN_HPP_NOEXCEPT;
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
#ifdef VK_ENABLE_BETA_EXTENSIONS
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
@ -55691,8 +55684,8 @@ namespace VULKAN_HPP_NAMESPACE
# else
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type
releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
@ -61752,18 +61745,11 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
VULKAN_HPP_NOEXCEPT;
# else
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
VULKAN_HPP_NOEXCEPT;
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
#ifdef VK_USE_PLATFORM_XCB_KHR
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@ -98515,22 +98501,13 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_ENABLE_BETA_EXTENSIONS
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch>
VULKAN_HPP_INLINE uint32_t Device::getDeferredOperationMaxConcurrencyKHR(
VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
return d.vkGetDeferredOperationMaxConcurrencyKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) );
}
# else
template <typename Dispatch>
VULKAN_HPP_INLINE uint32_t Device::getDeferredOperationMaxConcurrencyKHR(
VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
return d.vkGetDeferredOperationMaxConcurrencyKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
#ifdef VK_ENABLE_BETA_EXTENSIONS
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
@ -106311,7 +106288,6 @@ namespace VULKAN_HPP_NAMESPACE
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
#ifdef VK_USE_PLATFORM_WIN32_KHR
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch>
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR(
uint32_t queueFamilyIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
@ -106319,15 +106295,7 @@ namespace VULKAN_HPP_NAMESPACE
return static_cast<Bool32>(
d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ) );
}
# else
template <typename Dispatch>
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR(
uint32_t queueFamilyIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
return d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
#ifdef VK_USE_PLATFORM_XCB_KHR
template <typename Dispatch>