diff options
author | Jon Leech <[email protected]> | 2022-06-16 02:50:39 -0700 |
---|---|---|
committer | Jon Leech <[email protected]> | 2022-06-16 02:50:59 -0700 |
commit | 3be1df310be8963c29125c35fce25ee0af12ff70 (patch) | |
tree | 20d350dada7d4bfdeadcf9d39e46cbccc84cf0ef /include/vulkan/vulkan_raii.hpp | |
parent | ec9b96aae53e152f6812e66fa43757c1256369a0 (diff) | |
download | Vulkan-Headers-3be1df310be8963c29125c35fce25ee0af12ff70.tar.gz Vulkan-Headers-3be1df310be8963c29125c35fce25ee0af12ff70.zip |
Update for Vulkan-Docs 1.3.218v1.3.218
Diffstat (limited to 'include/vulkan/vulkan_raii.hpp')
-rw-r--r-- | include/vulkan/vulkan_raii.hpp | 463 |
1 files changed, 295 insertions, 168 deletions
diff --git a/include/vulkan/vulkan_raii.hpp b/include/vulkan/vulkan_raii.hpp index 2e60777..7ea28bd 100644 --- a/include/vulkan/vulkan_raii.hpp +++ b/include/vulkan/vulkan_raii.hpp @@ -10213,6 +10213,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties *>( &imageFormatProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); + return imageFormatProperties; } @@ -10228,13 +10229,19 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties> PhysicalDevice::getQueueFamilyProperties() const VULKAN_HPP_NOEXCEPT { - uint32_t queueFamilyPropertyCount; + std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties> queueFamilyProperties; + uint32_t queueFamilyPropertyCount; getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties( static_cast<VkPhysicalDevice>( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties> queueFamilyProperties( queueFamilyPropertyCount ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties( static_cast<VkPhysicalDevice>( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties *>( queueFamilyProperties.data() ) ); - VULKAN_HPP_ASSERT( queueFamilyPropertyCount == queueFamilyProperties.size() ); + + VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); + if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) + { + queueFamilyProperties.resize( queueFamilyPropertyCount ); + } return queueFamilyProperties; } @@ -10439,6 +10446,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkMemoryMapFlags>( flags ), &pData ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); + return pData; } @@ -10507,15 +10515,21 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements> Image::getSparseMemoryRequirements() const VULKAN_HPP_NOEXCEPT { - uint32_t sparseMemoryRequirementCount; + std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements> sparseMemoryRequirements; + uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetImageSparseMemoryRequirements( static_cast<VkDevice>( m_device ), static_cast<VkImage>( m_image ), &sparseMemoryRequirementCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements> sparseMemoryRequirements( sparseMemoryRequirementCount ); + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetImageSparseMemoryRequirements( static_cast<VkDevice>( m_device ), static_cast<VkImage>( m_image ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements *>( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); + + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) + { + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); + } return sparseMemoryRequirements; } @@ -10526,7 +10540,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling ) const VULKAN_HPP_NOEXCEPT { - uint32_t propertyCount; + std::vector<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties> properties; + uint32_t propertyCount; getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties( static_cast<VkPhysicalDevice>( m_physicalDevice ), static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), @@ -10535,7 +10550,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkImageTiling>( tiling ), &propertyCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties> properties( propertyCount ); + properties.resize( propertyCount ); getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties( static_cast<VkPhysicalDevice>( m_physicalDevice ), static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), @@ -10544,7 +10559,12 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkImageTiling>( tiling ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties *>( properties.data() ) ); - VULKAN_HPP_ASSERT( propertyCount == properties.size() ); + + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } return properties; } @@ -10570,25 +10590,24 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Fence::getStatus() const { - VULKAN_HPP_NAMESPACE::Result result = - static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetFenceStatus( static_cast<VkDevice>( m_device ), static_cast<VkFence>( m_fence ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eNotReady ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Fence::getStatus" ); - } - return result; + VkResult result = getDispatcher()->vkGetFenceStatus( static_cast<VkDevice>( m_device ), static_cast<VkFence>( m_fence ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Fence::getStatus", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitForFences( ArrayProxy<const VULKAN_HPP_NAMESPACE::Fence> const & fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout ) const { - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkWaitForFences( - static_cast<VkDevice>( m_device ), fences.size(), reinterpret_cast<const VkFence *>( fences.data() ), static_cast<VkBool32>( waitAll ), timeout ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences" ); - } - return result; + VkResult result = getDispatcher()->vkWaitForFences( + static_cast<VkDevice>( m_device ), fences.size(), reinterpret_cast<const VkFence *>( fences.data() ), static_cast<VkBool32>( waitAll ), timeout ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Semaphore @@ -10607,13 +10626,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Event::getStatus() const { - VULKAN_HPP_NAMESPACE::Result result = - static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetEventStatus( static_cast<VkDevice>( m_device ), static_cast<VkEvent>( m_event ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eEventSet ) && ( result != VULKAN_HPP_NAMESPACE::Result::eEventReset ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Event::getStatus" ); - } - return result; + VkResult result = getDispatcher()->vkGetEventStatus( static_cast<VkDevice>( m_device ), static_cast<VkEvent>( m_event ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Event::getStatus", + { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_INLINE void Event::set() const @@ -11352,6 +11370,7 @@ namespace VULKAN_HPP_NAMESPACE uint32_t apiVersion; VkResult result = getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); + return apiVersion; } @@ -11482,15 +11501,21 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { - uint32_t sparseMemoryRequirementCount; + std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> sparseMemoryRequirements; + uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetImageSparseMemoryRequirements2( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2 *>( &info ), &sparseMemoryRequirementCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> sparseMemoryRequirements( sparseMemoryRequirementCount ); + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetImageSparseMemoryRequirements2( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2 *>( &info ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2 *>( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); + + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) + { + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); + } return sparseMemoryRequirements; } @@ -11565,6 +11590,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2 *>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2 *>( &imageFormatProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + return imageFormatProperties; } @@ -11588,13 +11614,19 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> PhysicalDevice::getQueueFamilyProperties2() const VULKAN_HPP_NOEXCEPT { - uint32_t queueFamilyPropertyCount; + std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties; + uint32_t queueFamilyPropertyCount; getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast<VkPhysicalDevice>( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast<VkPhysicalDevice>( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) ); - VULKAN_HPP_ASSERT( queueFamilyPropertyCount == queueFamilyProperties.size() ); + + VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); + if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) + { + queueFamilyProperties.resize( queueFamilyPropertyCount ); + } return queueFamilyProperties; } @@ -11645,17 +11677,23 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2> PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const VULKAN_HPP_NOEXCEPT { - uint32_t propertyCount; + std::vector<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2> properties; + uint32_t propertyCount; getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2( static_cast<VkPhysicalDevice>( m_physicalDevice ), reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2 *>( &formatInfo ), &propertyCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2> properties( propertyCount ); + properties.resize( propertyCount ); getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2( static_cast<VkPhysicalDevice>( m_physicalDevice ), reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2 *>( &formatInfo ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties2 *>( properties.data() ) ); - VULKAN_HPP_ASSERT( propertyCount == properties.size() ); + + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } return properties; } @@ -11824,19 +11862,20 @@ namespace VULKAN_HPP_NAMESPACE uint64_t value; VkResult result = getDispatcher()->vkGetSemaphoreCounterValue( static_cast<VkDevice>( m_device ), static_cast<VkSemaphore>( m_semaphore ), &value ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); + return value; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const { - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( - getDispatcher()->vkWaitSemaphores( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkSemaphoreWaitInfo *>( &waitInfo ), timeout ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores" ); - } - return result; + VkResult result = + getDispatcher()->vkWaitSemaphores( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkSemaphoreWaitInfo *>( &waitInfo ), timeout ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_INLINE void Device::signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const @@ -12186,15 +12225,21 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { - uint32_t sparseMemoryRequirementCount; + std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> sparseMemoryRequirements; + uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetDeviceImageSparseMemoryRequirements( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkDeviceImageMemoryRequirements *>( &info ), &sparseMemoryRequirementCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> sparseMemoryRequirements( sparseMemoryRequirementCount ); + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetDeviceImageSparseMemoryRequirements( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkDeviceImageMemoryRequirements *>( &info ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2 *>( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); + + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) + { + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); + } return sparseMemoryRequirements; } @@ -12210,6 +12255,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( static_cast<VkPhysicalDevice>( m_physicalDevice ), queueFamilyIndex, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkBool32 *>( &supported ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); + return supported; } @@ -12224,6 +12270,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR *>( &surfaceCapabilities ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + return surfaceCapabilities; } @@ -12346,33 +12393,34 @@ namespace VULKAN_HPP_NAMESPACE SwapchainKHR::acquireNextImage( uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImageKHR && "Function <vkAcquireNextImageKHR> needs extension <VK_KHR_swapchain> enabled!" ); - uint32_t imageIndex; - VULKAN_HPP_NAMESPACE::Result result = - static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkAcquireNextImageKHR( static_cast<VkDevice>( m_device ), - static_cast<VkSwapchainKHR>( m_swapchain ), - timeout, - static_cast<VkSemaphore>( semaphore ), - static_cast<VkFence>( fence ), - &imageIndex ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) && - ( result != VULKAN_HPP_NAMESPACE::Result::eNotReady ) && ( result != VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireNextImage" ); - } - return std::make_pair( result, imageIndex ); + + uint32_t imageIndex; + VkResult result = getDispatcher()->vkAcquireNextImageKHR( static_cast<VkDevice>( m_device ), + static_cast<VkSwapchainKHR>( m_swapchain ), + timeout, + static_cast<VkSemaphore>( semaphore ), + static_cast<VkFence>( fence ), + &imageIndex ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireNextImage", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, + VULKAN_HPP_NAMESPACE::Result::eTimeout, + VULKAN_HPP_NAMESPACE::Result::eNotReady, + VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + + return std::make_pair( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), imageIndex ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueuePresentKHR && "Function <vkQueuePresentKHR> needs extension <VK_KHR_swapchain> enabled!" ); - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( - getDispatcher()->vkQueuePresentKHR( static_cast<VkQueue>( m_queue ), reinterpret_cast<const VkPresentInfoKHR *>( &presentInfo ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR" ); - } - return result; + VkResult result = getDispatcher()->vkQueuePresentKHR( static_cast<VkQueue>( m_queue ), reinterpret_cast<const VkPresentInfoKHR *>( &presentInfo ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR Device::getGroupPresentCapabilitiesKHR() const @@ -12384,6 +12432,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR *>( &deviceGroupPresentCapabilities ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); + return deviceGroupPresentCapabilities; } @@ -12397,6 +12446,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( static_cast<VkDevice>( m_device ), static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkDeviceGroupPresentModeFlagsKHR *>( &modes ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); + return modes; } @@ -12441,15 +12491,18 @@ namespace VULKAN_HPP_NAMESPACE Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImage2KHR && "Function <vkAcquireNextImage2KHR> needs extension <VK_KHR_swapchain> enabled!" ); - uint32_t imageIndex; - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkAcquireNextImage2KHR( - static_cast<VkDevice>( m_device ), reinterpret_cast<const VkAcquireNextImageInfoKHR *>( &acquireInfo ), &imageIndex ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) && - ( result != VULKAN_HPP_NAMESPACE::Result::eNotReady ) && ( result != VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR" ); - } - return std::make_pair( result, imageIndex ); + + uint32_t imageIndex; + VkResult result = getDispatcher()->vkAcquireNextImage2KHR( + static_cast<VkDevice>( m_device ), reinterpret_cast<const VkAcquireNextImageInfoKHR *>( &acquireInfo ), &imageIndex ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, + VULKAN_HPP_NAMESPACE::Result::eTimeout, + VULKAN_HPP_NAMESPACE::Result::eNotReady, + VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + + return std::make_pair( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), imageIndex ); } //=== VK_KHR_display === @@ -12581,6 +12634,7 @@ namespace VULKAN_HPP_NAMESPACE planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR *>( &capabilities ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); + return capabilities; } @@ -12797,6 +12851,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast<const VkVideoProfileKHR *>( &videoProfile ), reinterpret_cast<VkVideoCapabilitiesKHR *>( &capabilities ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); + return capabilities; } @@ -13113,6 +13168,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetImageViewAddressNVX( static_cast<VkDevice>( m_device ), static_cast<VkImageView>( m_imageView ), reinterpret_cast<VkImageViewAddressPropertiesNVX *>( &properties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::ImageView::getAddressNVX" ); + return properties; } @@ -13250,6 +13306,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV *>( &externalImageFormatProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); + return externalImageFormatProperties; } @@ -13265,6 +13322,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetMemoryWin32HandleNV( static_cast<VkDevice>( m_device ), static_cast<VkDeviceMemory>( m_memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), &handle ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::getMemoryWin32HandleNV" ); + return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -13363,6 +13421,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2 *>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2 *>( &imageFormatProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); + return imageFormatProperties; } @@ -13388,13 +13447,20 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR && "Function <vkGetPhysicalDeviceQueueFamilyProperties2KHR> needs extension <VK_KHR_get_physical_device_properties2> enabled!" ); - uint32_t queueFamilyPropertyCount; + + std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties; + uint32_t queueFamilyPropertyCount; getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast<VkPhysicalDevice>( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::QueueFamilyProperties2> queueFamilyProperties( queueFamilyPropertyCount ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast<VkPhysicalDevice>( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2 *>( queueFamilyProperties.data() ) ); - VULKAN_HPP_ASSERT( queueFamilyPropertyCount == queueFamilyProperties.size() ); + + VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); + if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) + { + queueFamilyProperties.resize( queueFamilyPropertyCount ); + } return queueFamilyProperties; } @@ -13455,17 +13521,24 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR && "Function <vkGetPhysicalDeviceSparseImageFormatProperties2KHR> needs extension <VK_KHR_get_physical_device_properties2> enabled!" ); - uint32_t propertyCount; + + std::vector<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2> properties; + uint32_t propertyCount; getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR( static_cast<VkPhysicalDevice>( m_physicalDevice ), reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2 *>( &formatInfo ), &propertyCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2> properties( propertyCount ); + properties.resize( propertyCount ); getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR( static_cast<VkPhysicalDevice>( m_physicalDevice ), reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2 *>( &formatInfo ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties2 *>( properties.data() ) ); - VULKAN_HPP_ASSERT( propertyCount == properties.size() ); + + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } return properties; } @@ -13594,6 +13667,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetMemoryWin32HandleKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkMemoryGetWin32HandleInfoKHR *>( &getWin32HandleInfo ), &handle ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); + return handle; } @@ -13610,6 +13684,7 @@ namespace VULKAN_HPP_NAMESPACE handle, reinterpret_cast<VkMemoryWin32HandlePropertiesKHR *>( &memoryWin32HandleProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); + return memoryWin32HandleProperties; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -13624,6 +13699,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetMemoryFdKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkMemoryGetFdInfoKHR *>( &getFdInfo ), &fd ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); + return fd; } @@ -13639,6 +13715,7 @@ namespace VULKAN_HPP_NAMESPACE fd, reinterpret_cast<VkMemoryFdPropertiesKHR *>( &memoryFdProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); + return memoryFdProperties; } @@ -13683,6 +13760,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetSemaphoreWin32HandleKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkSemaphoreGetWin32HandleInfoKHR *>( &getWin32HandleInfo ), &handle ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); + return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -13707,6 +13785,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetSemaphoreFdKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkSemaphoreGetFdInfoKHR *>( &getFdInfo ), &fd ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); + return fd; } @@ -13848,6 +13927,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT *>( &surfaceCapabilities ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); + return surfaceCapabilities; } @@ -13886,6 +13966,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetSwapchainCounterEXT( static_cast<VkDevice>( m_device ), static_cast<VkSwapchainKHR>( m_swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( counter ), &counterValue ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); + return counterValue; } @@ -13901,6 +13982,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkSwapchainKHR>( m_swapchain ), reinterpret_cast<VkRefreshCycleDurationGOOGLE *>( &displayTimingProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getRefreshCycleDurationGOOGLE" ); + return displayTimingProperties; } @@ -14016,13 +14098,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainStatusKHR && "Function <vkGetSwapchainStatusKHR> needs extension <VK_KHR_shared_presentable_image> enabled!" ); - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( - getDispatcher()->vkGetSwapchainStatusKHR( static_cast<VkDevice>( m_device ), static_cast<VkSwapchainKHR>( m_swapchain ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getStatus" ); - } - return result; + VkResult result = getDispatcher()->vkGetSwapchainStatusKHR( static_cast<VkDevice>( m_device ), static_cast<VkSwapchainKHR>( m_swapchain ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getStatus", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } //=== VK_KHR_external_fence_capabilities === @@ -14064,6 +14145,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetFenceWin32HandleKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkFenceGetWin32HandleInfoKHR *>( &getWin32HandleInfo ), &handle ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); + return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -14086,6 +14168,7 @@ namespace VULKAN_HPP_NAMESPACE int fd; VkResult result = getDispatcher()->vkGetFenceFdKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkFenceGetFdInfoKHR *>( &getFdInfo ), &fd ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); + return fd; } @@ -14176,6 +14259,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR *>( &surfaceInfo ), reinterpret_cast<VkSurfaceCapabilities2KHR *>( &surfaceCapabilities ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + return surfaceCapabilities; } @@ -14399,6 +14483,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast<const VkDisplayPlaneInfo2KHR *>( &displayPlaneInfo ), reinterpret_cast<VkDisplayPlaneCapabilities2KHR *>( &capabilities ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); + return capabilities; } @@ -14530,6 +14615,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( static_cast<VkDevice>( m_device ), &buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID *>( &properties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); + return properties; } @@ -14558,6 +14644,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkMemoryGetAndroidHardwareBufferInfoANDROID *>( &info ), &buffer ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); + return buffer; } # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ @@ -14655,15 +14742,22 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSparseMemoryRequirements2KHR && "Function <vkGetImageSparseMemoryRequirements2KHR> needs extension <VK_KHR_get_memory_requirements2> enabled!" ); - uint32_t sparseMemoryRequirementCount; + + std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> sparseMemoryRequirements; + uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetImageSparseMemoryRequirements2KHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2 *>( &info ), &sparseMemoryRequirementCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> sparseMemoryRequirements( sparseMemoryRequirementCount ); + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetImageSparseMemoryRequirements2KHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2 *>( &info ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2 *>( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); + + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) + { + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); + } return sparseMemoryRequirements; } @@ -14736,18 +14830,19 @@ namespace VULKAN_HPP_NAMESPACE throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); } - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkBuildAccelerationStructuresKHR( + VkResult result = getDispatcher()->vkBuildAccelerationStructuresKHR( static_cast<VkDevice>( m_device ), static_cast<VkDeferredOperationKHR>( deferredOperation ), infos.size(), reinterpret_cast<const VkAccelerationStructureBuildGeometryInfoKHR *>( infos.data() ), - reinterpret_cast<const VkAccelerationStructureBuildRangeInfoKHR * const *>( pBuildRangeInfos.data() ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && - ( result != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR" ); - } - return result; + reinterpret_cast<const VkAccelerationStructureBuildRangeInfoKHR * const *>( pBuildRangeInfos.data() ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, + VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, + VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result @@ -14757,16 +14852,16 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkCopyAccelerationStructureKHR && "Function <vkCopyAccelerationStructureKHR> needs extension <VK_KHR_acceleration_structure> enabled!" ); - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( - getDispatcher()->vkCopyAccelerationStructureKHR( static_cast<VkDevice>( m_device ), - static_cast<VkDeferredOperationKHR>( deferredOperation ), - reinterpret_cast<const VkCopyAccelerationStructureInfoKHR *>( &info ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && - ( result != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureKHR" ); - } - return result; + VkResult result = getDispatcher()->vkCopyAccelerationStructureKHR( static_cast<VkDevice>( m_device ), + static_cast<VkDeferredOperationKHR>( deferredOperation ), + reinterpret_cast<const VkCopyAccelerationStructureInfoKHR *>( &info ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureKHR", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, + VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, + VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result @@ -14776,16 +14871,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkCopyAccelerationStructureToMemoryKHR && "Function <vkCopyAccelerationStructureToMemoryKHR> needs extension <VK_KHR_acceleration_structure> enabled!" ); - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( + VkResult result = getDispatcher()->vkCopyAccelerationStructureToMemoryKHR( static_cast<VkDevice>( m_device ), static_cast<VkDeferredOperationKHR>( deferredOperation ), - reinterpret_cast<const VkCopyAccelerationStructureToMemoryInfoKHR *>( &info ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && - ( result != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureToMemoryKHR" ); - } - return result; + reinterpret_cast<const VkCopyAccelerationStructureToMemoryInfoKHR *>( &info ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureToMemoryKHR", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, + VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, + VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result @@ -14795,16 +14891,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToAccelerationStructureKHR && "Function <vkCopyMemoryToAccelerationStructureKHR> needs extension <VK_KHR_acceleration_structure> enabled!" ); - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( + VkResult result = getDispatcher()->vkCopyMemoryToAccelerationStructureKHR( static_cast<VkDevice>( m_device ), static_cast<VkDeferredOperationKHR>( deferredOperation ), - reinterpret_cast<const VkCopyMemoryToAccelerationStructureInfoKHR *>( &info ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && - ( result != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToAccelerationStructureKHR" ); - } - return result; + reinterpret_cast<const VkCopyMemoryToAccelerationStructureInfoKHR *>( &info ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToAccelerationStructureKHR", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, + VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, + VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } template <typename DataType> @@ -15003,6 +15100,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( static_cast<VkDevice>( m_device ), static_cast<VkImage>( m_image ), reinterpret_cast<VkImageDrmFormatModifierPropertiesEXT *>( &properties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); + return properties; } @@ -15418,6 +15516,7 @@ namespace VULKAN_HPP_NAMESPACE pHostPointer, reinterpret_cast<VkMemoryHostPointerPropertiesEXT *>( &memoryHostPointerProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); + return memoryHostPointerProperties; } @@ -15580,12 +15679,19 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueueCheckpointDataNV && "Function <vkGetQueueCheckpointDataNV> needs extension <VK_NV_device_diagnostic_checkpoints> enabled!" ); - uint32_t checkpointDataCount; + + std::vector<VULKAN_HPP_NAMESPACE::CheckpointDataNV> checkpointData; + uint32_t checkpointDataCount; getDispatcher()->vkGetQueueCheckpointDataNV( static_cast<VkQueue>( m_queue ), &checkpointDataCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::CheckpointDataNV> checkpointData( checkpointDataCount ); + checkpointData.resize( checkpointDataCount ); getDispatcher()->vkGetQueueCheckpointDataNV( static_cast<VkQueue>( m_queue ), &checkpointDataCount, reinterpret_cast<VkCheckpointDataNV *>( checkpointData.data() ) ); - VULKAN_HPP_ASSERT( checkpointDataCount == checkpointData.size() ); + + VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); + if ( checkpointDataCount < checkpointData.size() ) + { + checkpointData.resize( checkpointDataCount ); + } return checkpointData; } @@ -15599,6 +15705,7 @@ namespace VULKAN_HPP_NAMESPACE uint64_t value; VkResult result = getDispatcher()->vkGetSemaphoreCounterValueKHR( static_cast<VkDevice>( m_device ), static_cast<VkSemaphore>( m_semaphore ), &value ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValueKHR" ); + return value; } @@ -15607,13 +15714,13 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitSemaphoresKHR && "Function <vkWaitSemaphoresKHR> needs extension <VK_KHR_timeline_semaphore> enabled!" ); - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( - getDispatcher()->vkWaitSemaphoresKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkSemaphoreWaitInfo *>( &waitInfo ), timeout ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR" ); - } - return result; + VkResult result = + getDispatcher()->vkWaitSemaphoresKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkSemaphoreWaitInfo *>( &waitInfo ), timeout ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } VULKAN_HPP_INLINE void Device::signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const @@ -15701,6 +15808,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetPerformanceParameterINTEL( static_cast<VkDevice>( m_device ), static_cast<VkPerformanceParameterTypeINTEL>( parameter ), reinterpret_cast<VkPerformanceValueINTEL *>( &value ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); + return value; } @@ -15841,14 +15949,13 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitForPresentKHR && "Function <vkWaitForPresentKHR> needs extension <VK_KHR_present_wait> enabled!" ); - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( - getDispatcher()->vkWaitForPresentKHR( static_cast<VkDevice>( m_device ), static_cast<VkSwapchainKHR>( m_swapchain ), presentId, timeout ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) && - ( result != VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::waitForPresent" ); - } - return result; + VkResult result = + getDispatcher()->vkWaitForPresentKHR( static_cast<VkDevice>( m_device ), static_cast<VkSwapchainKHR>( m_swapchain ), presentId, timeout ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::waitForPresent", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } //=== VK_NV_cooperative_matrix === @@ -15998,6 +16105,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR *>( &surfaceInfo ), reinterpret_cast<VkDeviceGroupPresentModeFlagsKHR *>( &modes ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); + return modes; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -16231,14 +16339,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkDeferredOperationJoinKHR && "Function <vkDeferredOperationJoinKHR> needs extension <VK_KHR_deferred_host_operations> enabled!" ); - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( - getDispatcher()->vkDeferredOperationJoinKHR( static_cast<VkDevice>( m_device ), static_cast<VkDeferredOperationKHR>( m_operation ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR ) && - ( result != VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::DeferredOperationKHR::join" ); - } - return result; + VkResult result = getDispatcher()->vkDeferredOperationJoinKHR( static_cast<VkDevice>( m_device ), static_cast<VkDeferredOperationKHR>( m_operation ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::DeferredOperationKHR::join", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR, VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR } ); + + return static_cast<VULKAN_HPP_NAMESPACE::Result>( result ); } //=== VK_KHR_pipeline_executable_properties === @@ -16612,12 +16718,19 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueueCheckpointData2NV && "Function <vkGetQueueCheckpointData2NV> needs extension <VK_KHR_synchronization2> enabled!" ); - uint32_t checkpointDataCount; + + std::vector<VULKAN_HPP_NAMESPACE::CheckpointData2NV> checkpointData; + uint32_t checkpointDataCount; getDispatcher()->vkGetQueueCheckpointData2NV( static_cast<VkQueue>( m_queue ), &checkpointDataCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::CheckpointData2NV> checkpointData( checkpointDataCount ); + checkpointData.resize( checkpointDataCount ); getDispatcher()->vkGetQueueCheckpointData2NV( static_cast<VkQueue>( m_queue ), &checkpointDataCount, reinterpret_cast<VkCheckpointData2NV *>( checkpointData.data() ) ); - VULKAN_HPP_ASSERT( checkpointDataCount == checkpointData.size() ); + + VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); + if ( checkpointDataCount < checkpointData.size() ) + { + checkpointData.resize( checkpointDataCount ); + } return checkpointData; } @@ -16943,6 +17056,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetMemoryZirconHandleFUCHSIA( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkMemoryGetZirconHandleInfoFUCHSIA *>( &getZirconHandleInfo ), &zirconHandle ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); + return zirconHandle; } @@ -16959,6 +17073,7 @@ namespace VULKAN_HPP_NAMESPACE zirconHandle, reinterpret_cast<VkMemoryZirconHandlePropertiesFUCHSIA *>( &memoryZirconHandleProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); + return memoryZirconHandleProperties; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -16987,6 +17102,7 @@ namespace VULKAN_HPP_NAMESPACE VkResult result = getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkSemaphoreGetZirconHandleInfoFUCHSIA *>( &getZirconHandleInfo ), &zirconHandle ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); + return zirconHandle; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -17036,6 +17152,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast<VkBufferCollectionFUCHSIA>( m_collection ), reinterpret_cast<VkBufferCollectionPropertiesFUCHSIA *>( &properties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::getProperties" ); + return properties; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -17047,14 +17164,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI && "Function <vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI> needs extension <VK_HUAWEI_subpass_shading> enabled!" ); + VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; - VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( - static_cast<VkDevice>( m_device ), static_cast<VkRenderPass>( m_renderPass ), reinterpret_cast<VkExtent2D *>( &maxWorkgroupSize ) ) ); - if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI" ); - } - return std::make_pair( result, maxWorkgroupSize ); + VkResult result = getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( + static_cast<VkDevice>( m_device ), static_cast<VkRenderPass>( m_renderPass ), reinterpret_cast<VkExtent2D *>( &maxWorkgroupSize ) ); + resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), + VULKAN_HPP_NAMESPACE_STRING "::RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI", + { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); + + return std::make_pair( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), maxWorkgroupSize ); } VULKAN_HPP_INLINE void CommandBuffer::subpassShadingHUAWEI() const VULKAN_HPP_NOEXCEPT @@ -17090,6 +17208,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast<const VkMemoryGetRemoteAddressInfoNV *>( &memoryGetRemoteAddressInfo ), reinterpret_cast<VkRemoteAddressNV *>( &address ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); + return address; } @@ -17106,6 +17225,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast<const VkPipelineInfoEXT *>( &pipelineInfo ), reinterpret_cast<VkBaseOutStructure *>( &pipelineProperties ) ); resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); + return pipelineProperties; } @@ -17322,15 +17442,22 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR && "Function <vkGetDeviceImageSparseMemoryRequirementsKHR> needs extension <VK_KHR_maintenance4> enabled!" ); - uint32_t sparseMemoryRequirementCount; + + std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> sparseMemoryRequirements; + uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkDeviceImageMemoryRequirements *>( &info ), &sparseMemoryRequirementCount, nullptr ); - std::vector<VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2> sparseMemoryRequirements( sparseMemoryRequirementCount ); + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR( static_cast<VkDevice>( m_device ), reinterpret_cast<const VkDeviceImageMemoryRequirements *>( &info ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2 *>( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); + + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) + { + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); + } return sparseMemoryRequirements; } |