mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-10 04:18:48 -04:00
Merge pull request #757 from asuessenbach/refactor
Refactor simple functions with more than one success code.
This commit is contained in:
commit
f7dce6bc5b
@ -1258,8 +1258,7 @@ void VulkanHppGenerator::appendCommand( std::string & str,
|
|||||||
appendCommandSimpleVoid( str, name, commandData, definition, vectorParamIndices );
|
appendCommandSimpleVoid( str, name, commandData, definition, vectorParamIndices );
|
||||||
appendedFunction = true;
|
appendedFunction = true;
|
||||||
}
|
}
|
||||||
else if ( ( commandData.returnType == "VkResult" ) && ( commandData.successCodes.size() == 1 ) &&
|
else if ( ( commandData.returnType == "VkResult" ) && ( vectorParamIndices.size() < 2 ) )
|
||||||
( vectorParamIndices.size() < 2 ) )
|
|
||||||
{
|
{
|
||||||
// returns VkResult, but there's just one success code
|
// returns VkResult, but there's just one success code
|
||||||
appendCommandSimple( str, name, commandData, definition, vectorParamIndices );
|
appendCommandSimple( str, name, commandData, definition, vectorParamIndices );
|
||||||
@ -4527,7 +4526,7 @@ std::string VulkanHppGenerator::constructCommandSimple( std::string const &
|
|||||||
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}::${commandName}( ${argumentList} ) const
|
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}::${commandName}( ${argumentList} ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( d.${vkCommand}( ${callArguments} ) );
|
Result result = static_cast<Result>( d.${vkCommand}( ${callArguments} ) );
|
||||||
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}" );
|
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}"${successCodeList} );
|
||||||
})";
|
})";
|
||||||
|
|
||||||
str =
|
str =
|
||||||
@ -4539,6 +4538,7 @@ std::string VulkanHppGenerator::constructCommandSimple( std::string const &
|
|||||||
{ "commandName", commandName },
|
{ "commandName", commandName },
|
||||||
{ "nodiscard", nodiscard },
|
{ "nodiscard", nodiscard },
|
||||||
{ "returnType", returnType },
|
{ "returnType", returnType },
|
||||||
|
{ "successCodeList", constructSuccessCodeList( commandData.successCodes ) },
|
||||||
{ "vkCommand", name } } ) );
|
{ "vkCommand", name } } ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -92474,6 +92474,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>( d.vkCopyAccelerationStructureKHR(
|
return static_cast<Result>( d.vkCopyAccelerationStructureKHR(
|
||||||
m_device, reinterpret_cast<const VkCopyAccelerationStructureInfoKHR *>( pInfo ) ) );
|
m_device, reinterpret_cast<const VkCopyAccelerationStructureInfoKHR *>( pInfo ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result
|
||||||
@ -92497,6 +92498,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>( d.vkCopyAccelerationStructureToMemoryKHR(
|
return static_cast<Result>( d.vkCopyAccelerationStructureToMemoryKHR(
|
||||||
m_device, reinterpret_cast<const VkCopyAccelerationStructureToMemoryInfoKHR *>( pInfo ) ) );
|
m_device, reinterpret_cast<const VkCopyAccelerationStructureToMemoryInfoKHR *>( pInfo ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyAccelerationStructureToMemoryKHR(
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyAccelerationStructureToMemoryKHR(
|
||||||
@ -92520,6 +92522,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>( d.vkCopyMemoryToAccelerationStructureKHR(
|
return static_cast<Result>( d.vkCopyMemoryToAccelerationStructureKHR(
|
||||||
m_device, reinterpret_cast<const VkCopyMemoryToAccelerationStructureInfoKHR *>( pInfo ) ) );
|
m_device, reinterpret_cast<const VkCopyMemoryToAccelerationStructureInfoKHR *>( pInfo ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
# ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyMemoryToAccelerationStructureKHR(
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyMemoryToAccelerationStructureKHR(
|
||||||
@ -100040,6 +100043,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>( d.vkWaitForFences(
|
return static_cast<Result>( d.vkWaitForFences(
|
||||||
m_device, fenceCount, reinterpret_cast<const VkFence *>( pFences ), static_cast<VkBool32>( waitAll ), timeout ) );
|
m_device, fenceCount, reinterpret_cast<const VkFence *>( pFences ), static_cast<VkBool32>( waitAll ), timeout ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result
|
||||||
@ -100067,6 +100071,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>(
|
return static_cast<Result>(
|
||||||
d.vkWaitSemaphores( m_device, reinterpret_cast<const VkSemaphoreWaitInfo *>( pWaitInfo ), timeout ) );
|
d.vkWaitSemaphores( m_device, reinterpret_cast<const VkSemaphoreWaitInfo *>( pWaitInfo ), timeout ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitSemaphores( const SemaphoreWaitInfo & waitInfo,
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitSemaphores( const SemaphoreWaitInfo & waitInfo,
|
||||||
@ -100089,6 +100094,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>(
|
return static_cast<Result>(
|
||||||
d.vkWaitSemaphoresKHR( m_device, reinterpret_cast<const VkSemaphoreWaitInfo *>( pWaitInfo ), timeout ) );
|
d.vkWaitSemaphoresKHR( m_device, reinterpret_cast<const VkSemaphoreWaitInfo *>( pWaitInfo ), timeout ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitSemaphoresKHR( const SemaphoreWaitInfo & waitInfo,
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitSemaphoresKHR( const SemaphoreWaitInfo & waitInfo,
|
||||||
@ -104717,6 +104723,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>(
|
return static_cast<Result>(
|
||||||
d.vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR *>( pPresentInfo ) ) );
|
d.vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR *>( pPresentInfo ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo,
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user