mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-13 22:11:45 -04:00
Merge pull request #781 from asuessenbach/refactor
Refactor commands returning some value with no enhancements available.
This commit is contained in:
commit
16df6e50d1
@ -1170,18 +1170,18 @@ void VulkanHppGenerator::appendCommand( std::string & str,
|
|||||||
} ) == constPointerParamIndices.end() )
|
} ) == constPointerParamIndices.end() )
|
||||||
{
|
{
|
||||||
// no vector paramter and no non-void const-pointer
|
// no vector paramter and no non-void const-pointer
|
||||||
if ( commandData.returnType == "void" )
|
if ( commandData.returnType == "VkResult" )
|
||||||
{
|
|
||||||
// void functions with no fancy input have just standard call
|
|
||||||
appendCommandStandard( str, name, commandData, definition );
|
|
||||||
appendedFunction = true;
|
|
||||||
}
|
|
||||||
else if ( commandData.returnType == "VkResult" )
|
|
||||||
{
|
{
|
||||||
// function returning a result but no fancy input have either standard or enhanced call
|
// function returning a result but no fancy input have either standard or enhanced call
|
||||||
appendCommandStandardOrEnhanced( str, name, commandData, definition );
|
appendCommandStandardOrEnhanced( str, name, commandData, definition );
|
||||||
appendedFunction = true;
|
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
|
else
|
||||||
{
|
{
|
||||||
@ -1571,16 +1571,17 @@ void VulkanHppGenerator::appendCommandStandard( std::string & str,
|
|||||||
bool definition ) const
|
bool definition ) const
|
||||||
{
|
{
|
||||||
const std::string functionTemplate = R"(
|
const std::string functionTemplate = R"(
|
||||||
${commandStandard}
|
${enter}${commandStandard}
|
||||||
)";
|
${leave})";
|
||||||
|
|
||||||
std::string enter, leave;
|
std::string enter, leave;
|
||||||
std::tie( enter, leave ) = generateProtection( commandData.feature, commandData.extensions );
|
std::tie( enter, leave ) = generateProtection( commandData.feature, commandData.extensions );
|
||||||
assert( enter.empty() );
|
|
||||||
|
|
||||||
str += replaceWithMap( functionTemplate,
|
str += replaceWithMap( functionTemplate,
|
||||||
std::map<std::string, std::string>( {
|
std::map<std::string, std::string>( {
|
||||||
{ "commandStandard", constructCommandStandard( name, commandData, definition ) },
|
{ "commandStandard", constructCommandStandard( name, commandData, definition ) },
|
||||||
|
{ "enter", enter },
|
||||||
|
{ "leave", leave }
|
||||||
} ) );
|
} ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54512,18 +54512,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
|
|
||||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||||
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
uint32_t getDeferredOperationMaxConcurrencyKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation,
|
uint32_t getDeferredOperationMaxConcurrencyKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
|
||||||
VULKAN_HPP_NOEXCEPT;
|
VULKAN_HPP_NOEXCEPT;
|
||||||
# else
|
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
|
||||||
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*/
|
|
||||||
|
|
||||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||||
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
@ -55691,8 +55684,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
# else
|
# else
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type
|
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType<void>::type
|
||||||
releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
|
releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
|
||||||
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*/
|
||||||
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
|
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
|
||||||
|
|
||||||
@ -61752,18 +61745,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
|
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||||
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex,
|
Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const
|
||||||
VULKAN_HPP_NOEXCEPT;
|
VULKAN_HPP_NOEXCEPT;
|
||||||
# else
|
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
|
||||||
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*/
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
@ -98515,22 +98501,13 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
|
|
||||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||||
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_INLINE uint32_t Device::getDeferredOperationMaxConcurrencyKHR(
|
VULKAN_HPP_INLINE uint32_t Device::getDeferredOperationMaxConcurrencyKHR(
|
||||||
VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
|
VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
|
||||||
{
|
{
|
||||||
return d.vkGetDeferredOperationMaxConcurrencyKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) );
|
return d.vkGetDeferredOperationMaxConcurrencyKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) );
|
||||||
}
|
}
|
||||||
# else
|
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
|
||||||
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*/
|
|
||||||
|
|
||||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||||
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
@ -106311,7 +106288,6 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
|
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||||
# ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR(
|
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR(
|
||||||
uint32_t queueFamilyIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
|
uint32_t queueFamilyIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
|
||||||
@ -106319,15 +106295,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Bool32>(
|
return static_cast<Bool32>(
|
||||||
d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ) );
|
d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ) );
|
||||||
}
|
}
|
||||||
# else
|
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
|
||||||
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*/
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user