diff --git a/VkCppGenerator.cpp b/VkCppGenerator.cpp index c2ae184..43fc171 100644 --- a/VkCppGenerator.cpp +++ b/VkCppGenerator.cpp @@ -1752,16 +1752,22 @@ void writeCall(std::ofstream & ofs, std::string const& name, size_t templateInde void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::vector const& successCodes) { + assert(!successCodes.empty()); + ofs << indentation << " if ("; if (successCodes.size() == 1) { assert(successCodes.front() == "eSuccess"); - ofs << indentation << " if ( result != Result::eSuccess )" << std::endl; + ofs << " result != Result::eSuccess"; } else { - assert(successCodes.size() == 2); - ofs << indentation << " if ( ( result != Result::" << successCodes[0] << " ) && ( result != Result::" << successCodes[1] << " ) )" << std::endl; + for (size_t i = 0; i < successCodes.size() - 1; i++) + { + ofs << " ( result != Result::" << successCodes[i] << " ) &&"; + } + ofs << " ( result != Result::" << successCodes.back() << " )"; } + ofs << " )" << std::endl; ofs << indentation << " {" << std::endl << indentation << " throw std::system_error( result, \"vk::"; if (!className.empty()) diff --git a/Vulkan-Docs b/Vulkan-Docs index ce3204c..6db51e9 160000 --- a/Vulkan-Docs +++ b/Vulkan-Docs @@ -1 +1 @@ -Subproject commit ce3204c7dd53a0116ce3a91fd12919d606c306f5 +Subproject commit 6db51e924115759f9badd40eb91bbcf3240de1fb diff --git a/vulkan/vk_cpp.hpp b/vulkan/vk_cpp.hpp index 7f97735..90583d0 100644 --- a/vulkan/vk_cpp.hpp +++ b/vulkan/vk_cpp.hpp @@ -63,7 +63,7 @@ # include #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ -static_assert( VK_HEADER_VERSION == 8 , "Wrong VK_HEADER_VERSION!" ); +static_assert( VK_HEADER_VERSION == 11 , "Wrong VK_HEADER_VERSION!" ); // 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default. // To enable this feature on 32-bit platforms please define VK_CPP_TYPESAFE_CONVERSION @@ -21699,7 +21699,7 @@ namespace vk Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t & imageIndex ) const { Result result = static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); - if ( ( result != Result::eSuccess ) && ( result != Result::eSuboptimalKHR ) ) + if ( ( result != Result::eSuccess ) && ( result != Result::eTimeout ) && ( result != Result::eNotReady ) && ( result != Result::eSuboptimalKHR ) ) { throw std::system_error( result, "vk::Device::acquireNextImageKHR" ); }