Merge pull request #783 from asuessenbach/refactor

Refactor commands that get a handle which has no create or destroy function.
This commit is contained in:
Andreas Süßenbach 2020-10-20 09:26:21 +02:00 committed by GitHub
commit 32c994335a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 11 deletions

View File

@ -1207,6 +1207,14 @@ void VulkanHppGenerator::appendCommand( std::string & str,
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 ) )
{

View File

@ -54699,10 +54699,10 @@ namespace VULKAN_HPP_NAMESPACE
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NAMESPACE::Queue
getQueue( uint32_t queueFamilyIndex,
uint32_t queueIndex,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Queue
getQueue( uint32_t queueFamilyIndex,
uint32_t queueIndex,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@ -54711,9 +54711,9 @@ namespace VULKAN_HPP_NAMESPACE
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
VULKAN_HPP_NAMESPACE::Queue
getQueue2( const DeviceQueueInfo2 & queueInfo,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Queue
getQueue2( const DeviceQueueInfo2 & queueInfo,
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
@ -98864,10 +98864,11 @@ namespace VULKAN_HPP_NAMESPACE
{
d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue *>( pQueue ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch>
VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue
Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue
Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_NAMESPACE::Queue queue;
d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue *>( &queue ) );
@ -98883,10 +98884,11 @@ namespace VULKAN_HPP_NAMESPACE
d.vkGetDeviceQueue2(
m_device, reinterpret_cast<const VkDeviceQueueInfo2 *>( pQueueInfo ), reinterpret_cast<VkQueue *>( pQueue ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch>
VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue Device::getQueue2( const DeviceQueueInfo2 & queueInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue
Device::getQueue2( const DeviceQueueInfo2 & queueInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_NAMESPACE::Queue queue;
d.vkGetDeviceQueue2(