From 147f8ee62165805a1eec7a90aa98a213cb3ee63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Mon, 7 Mar 2016 15:08:31 +0100 Subject: [PATCH] Changed preliminary vk::Exception to std::system_error. --- VkCppGenerator.cpp | 63 ++++++-- vulkan/vk_cpp.h | 354 ++++++++++++++++++++++++--------------------- 2 files changed, 242 insertions(+), 175 deletions(-) diff --git a/VkCppGenerator.cpp b/VkCppGenerator.cpp index 6727ba6..b539e43 100644 --- a/VkCppGenerator.cpp +++ b/VkCppGenerator.cpp @@ -67,20 +67,37 @@ const std::string nvidiaLicenseHeader( ); const std::string exceptionHeader( - " enum class Result;\n" + "#if defined(_MSC_VER) && (_MSC_VER == 1800)\n" + "# define noexcept _NOEXCEPT\n" + "#endif\n" "\n" - " class Exception : public std::runtime_error\n" + " class ErrorCategoryImpl : public std::error_category\n" " {\n" - " public:\n" - " Exception(Result result, std::string const& what)\n" - " : std::runtime_error(what)\n" - " , m_error(result)\n" - " {}\n" - "\n" - " private:\n" - " Result m_error;\n" + " public:\n" + " virtual const char* name() const noexcept override { return \"vk::Result\"; }\n" + " virtual std::string message(int ev) const override { return getString(static_cast(ev)); }\n" " };\n" "\n" + "#if defined(_MSC_VER) && (_MSC_VER == 1800)\n" + "# undef noexcept\n" + "#endif\n" + "\n" + " inline const std::error_category& errorCategory()\n" + " {\n" + " static ErrorCategoryImpl instance;\n" + " return instance;\n" + " }\n" + "\n" + " inline std::error_code make_error_code(Result e)\n" + " {\n" + " return std::error_code(static_cast(e), errorCategory());\n" + " }\n" + "\n" + " inline std::error_condition make_error_condition(Result e)\n" + " {\n" + " return std::error_condition(static_cast(e), errorCategory());\n" + " }\n" + "\n" ); const std::string flagsHeader( @@ -1612,7 +1629,7 @@ void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, st ofs << indentation << " if ( ( result != Result::" << successCodes[0] << " ) && ( result != Result::" << successCodes[1] << " ) )" << std::endl; } ofs << indentation << " {" << std::endl - << indentation << " throw Exception( result, \"vk::"; + << indentation << " throw std::system_error( result, \"vk::"; if (!className.empty()) { ofs << className << "::"; @@ -2680,6 +2697,8 @@ int main( int argc, char **argv ) << "#include " << std::endl << "#include " << std::endl << "#include " << std::endl + << "#include " << std::endl + << "#include " << std::endl << "#include " << std::endl << "#ifdef VKCPP_ENHANCED_MODE" << std::endl << "# include " << std::endl @@ -2689,10 +2708,28 @@ int main( int argc, char **argv ) writeVersionCheck( ofs, version ); writeTypesafeCheck(ofs, typesafeCheck ); ofs << "namespace vk" << std::endl - << "{" << std::endl; + << "{" << std::endl + << flagsHeader; + // first of all, write out vk::Result and the exception handling stuff + std::vector::const_iterator it = std::find_if(sortedDependencies.begin(), sortedDependencies.end(), [](DependencyData const& dp) { return dp.name == "Result"; }); + assert(it != sortedDependencies.end()); + writeTypeEnum(ofs, *it, enums.find(it->name)->second); + writeEnumGetString(ofs, *it, enums.find(it->name)->second); + sortedDependencies.erase(it); ofs << exceptionHeader; - ofs << flagsHeader; + + ofs << "} // namespace vk" << std::endl + << std::endl + << "namespace std" << std::endl + << "{" << std::endl + << " template <>" << std::endl + << " struct is_error_code_enum : public true_type" << std::endl + << " {};" << std::endl + << "}" << std::endl + << std::endl + << "namespace vk" << std::endl + << "{" << std::endl; writeTypes( ofs, sortedDependencies, commands, enums, flags, handles, structs, defaultValues, vkTypes ); writeEnumsToString(ofs, sortedDependencies, enums); diff --git a/vulkan/vk_cpp.h b/vulkan/vk_cpp.h index d2c2cbe..cf0bc12 100644 --- a/vulkan/vk_cpp.h +++ b/vulkan/vk_cpp.h @@ -56,6 +56,8 @@ #include #include #include +#include +#include #include #ifdef VKCPP_ENHANCED_MODE # include @@ -71,20 +73,6 @@ static_assert( VK_MAKE_VERSION(1, 0, 4) == VK_API_VERSION, "Wrong VK_API_VERSION namespace vk { - enum class Result; - - class Exception : public std::runtime_error - { - public: - Exception(Result result, std::string const& what) - : std::runtime_error(what) - , m_error(result) - {} - - private: - Result m_error; - }; - template class Flags { @@ -196,6 +184,106 @@ namespace vk return flags ^ bit; } + enum class Result + { + eSuccess = VK_SUCCESS, + eNotReady = VK_NOT_READY, + eTimeout = VK_TIMEOUT, + eEventSet = VK_EVENT_SET, + eEventReset = VK_EVENT_RESET, + eIncomplete = VK_INCOMPLETE, + eErrorOutOfHostMemory = VK_ERROR_OUT_OF_HOST_MEMORY, + eErrorOutOfDeviceMemory = VK_ERROR_OUT_OF_DEVICE_MEMORY, + eErrorInitializationFailed = VK_ERROR_INITIALIZATION_FAILED, + eErrorDeviceLost = VK_ERROR_DEVICE_LOST, + eErrorMemoryMapFailed = VK_ERROR_MEMORY_MAP_FAILED, + eErrorLayerNotPresent = VK_ERROR_LAYER_NOT_PRESENT, + eErrorExtensionNotPresent = VK_ERROR_EXTENSION_NOT_PRESENT, + eErrorFeatureNotPresent = VK_ERROR_FEATURE_NOT_PRESENT, + eErrorIncompatibleDriver = VK_ERROR_INCOMPATIBLE_DRIVER, + eErrorTooManyObjects = VK_ERROR_TOO_MANY_OBJECTS, + eErrorFormatNotSupported = VK_ERROR_FORMAT_NOT_SUPPORTED, + eErrorSurfaceLostKHR = VK_ERROR_SURFACE_LOST_KHR, + eErrorNativeWindowInUseKHR = VK_ERROR_NATIVE_WINDOW_IN_USE_KHR, + eSuboptimalKHR = VK_SUBOPTIMAL_KHR, + eErrorOutOfDateKHR = VK_ERROR_OUT_OF_DATE_KHR, + eErrorIncompatibleDisplayKHR = VK_ERROR_INCOMPATIBLE_DISPLAY_KHR, + eErrorValidationFailedEXT = VK_ERROR_VALIDATION_FAILED_EXT + }; + + inline std::string getString(Result value) + { + switch (value) + { + case Result::eSuccess: return "Success"; + case Result::eNotReady: return "NotReady"; + case Result::eTimeout: return "Timeout"; + case Result::eEventSet: return "EventSet"; + case Result::eEventReset: return "EventReset"; + case Result::eIncomplete: return "Incomplete"; + case Result::eErrorOutOfHostMemory: return "ErrorOutOfHostMemory"; + case Result::eErrorOutOfDeviceMemory: return "ErrorOutOfDeviceMemory"; + case Result::eErrorInitializationFailed: return "ErrorInitializationFailed"; + case Result::eErrorDeviceLost: return "ErrorDeviceLost"; + case Result::eErrorMemoryMapFailed: return "ErrorMemoryMapFailed"; + case Result::eErrorLayerNotPresent: return "ErrorLayerNotPresent"; + case Result::eErrorExtensionNotPresent: return "ErrorExtensionNotPresent"; + case Result::eErrorFeatureNotPresent: return "ErrorFeatureNotPresent"; + case Result::eErrorIncompatibleDriver: return "ErrorIncompatibleDriver"; + case Result::eErrorTooManyObjects: return "ErrorTooManyObjects"; + case Result::eErrorFormatNotSupported: return "ErrorFormatNotSupported"; + case Result::eErrorSurfaceLostKHR: return "ErrorSurfaceLostKHR"; + case Result::eErrorNativeWindowInUseKHR: return "ErrorNativeWindowInUseKHR"; + case Result::eSuboptimalKHR: return "SuboptimalKHR"; + case Result::eErrorOutOfDateKHR: return "ErrorOutOfDateKHR"; + case Result::eErrorIncompatibleDisplayKHR: return "ErrorIncompatibleDisplayKHR"; + case Result::eErrorValidationFailedEXT: return "ErrorValidationFailedEXT"; + default: return "unknown"; + } + } + +#if defined(_MSC_VER) && (_MSC_VER == 1800) +# define noexcept _NOEXCEPT +#endif + + class ErrorCategoryImpl : public std::error_category + { + public: + virtual const char* name() const noexcept override { return "vk::Result"; } + virtual std::string message(int ev) const override { return getString(static_cast(ev)); } + }; + +#if defined(_MSC_VER) && (_MSC_VER == 1800) +# undef noexcept +#endif + + inline const std::error_category& errorCategory() + { + static ErrorCategoryImpl instance; + return instance; + } + + inline std::error_code make_error_code(Result e) + { + return std::error_code(static_cast(e), errorCategory()); + } + + inline std::error_condition make_error_condition(Result e) + { + return std::error_condition(static_cast(e), errorCategory()); + } + +} // namespace vk + +namespace std +{ + template <> + struct is_error_code_enum : public true_type + {}; +} + +namespace vk +{ typedef uint32_t SampleMask; typedef uint32_t Bool32; typedef uint64_t DeviceSize; @@ -11007,33 +11095,6 @@ namespace vk eSecondaryCommandBuffers = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS }; - enum class Result - { - eSuccess = VK_SUCCESS, - eNotReady = VK_NOT_READY, - eTimeout = VK_TIMEOUT, - eEventSet = VK_EVENT_SET, - eEventReset = VK_EVENT_RESET, - eIncomplete = VK_INCOMPLETE, - eErrorOutOfHostMemory = VK_ERROR_OUT_OF_HOST_MEMORY, - eErrorOutOfDeviceMemory = VK_ERROR_OUT_OF_DEVICE_MEMORY, - eErrorInitializationFailed = VK_ERROR_INITIALIZATION_FAILED, - eErrorDeviceLost = VK_ERROR_DEVICE_LOST, - eErrorMemoryMapFailed = VK_ERROR_MEMORY_MAP_FAILED, - eErrorLayerNotPresent = VK_ERROR_LAYER_NOT_PRESENT, - eErrorExtensionNotPresent = VK_ERROR_EXTENSION_NOT_PRESENT, - eErrorFeatureNotPresent = VK_ERROR_FEATURE_NOT_PRESENT, - eErrorIncompatibleDriver = VK_ERROR_INCOMPATIBLE_DRIVER, - eErrorTooManyObjects = VK_ERROR_TOO_MANY_OBJECTS, - eErrorFormatNotSupported = VK_ERROR_FORMAT_NOT_SUPPORTED, - eErrorSurfaceLostKHR = VK_ERROR_SURFACE_LOST_KHR, - eErrorNativeWindowInUseKHR = VK_ERROR_NATIVE_WINDOW_IN_USE_KHR, - eSuboptimalKHR = VK_SUBOPTIMAL_KHR, - eErrorOutOfDateKHR = VK_ERROR_OUT_OF_DATE_KHR, - eErrorIncompatibleDisplayKHR = VK_ERROR_INCOMPATIBLE_DISPLAY_KHR, - eErrorValidationFailedEXT = VK_ERROR_VALIDATION_FAILED_EXT - }; - class PresentInfoKHR { public: @@ -18160,7 +18221,7 @@ namespace vk Result result = static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::CommandBuffer::begin" ); + throw std::system_error( result, "vk::CommandBuffer::begin" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -18178,7 +18239,7 @@ namespace vk Result result = static_cast( vkEndCommandBuffer( m_commandBuffer ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::CommandBuffer::end" ); + throw std::system_error( result, "vk::CommandBuffer::end" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -18196,7 +18257,7 @@ namespace vk Result result = static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::CommandBuffer::reset" ); + throw std::system_error( result, "vk::CommandBuffer::reset" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -19374,7 +19435,7 @@ namespace vk Result result = static_cast( vkQueueSubmit( m_queue, static_cast( submits.size() ), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Queue::submit" ); + throw std::system_error( result, "vk::Queue::submit" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -19392,7 +19453,7 @@ namespace vk Result result = static_cast( vkQueueWaitIdle( m_queue ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Queue::waitIdle" ); + throw std::system_error( result, "vk::Queue::waitIdle" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -19408,7 +19469,7 @@ namespace vk Result result = static_cast( vkQueueBindSparse( m_queue, static_cast( bindInfo.size() ), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Queue::bindSparse" ); + throw std::system_error( result, "vk::Queue::bindSparse" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -19424,7 +19485,7 @@ namespace vk Result result = static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eSuboptimalKHR ) ) { - throw Exception( result, "vk::Queue::presentKHR" ); + throw std::system_error( result, "vk::Queue::presentKHR" ); } return result; } @@ -20760,7 +20821,7 @@ namespace vk Result result = static_cast( vkDeviceWaitIdle( m_device ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::waitIdle" ); + throw std::system_error( result, "vk::Device::waitIdle" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -20777,7 +20838,7 @@ namespace vk Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &memory ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::allocateMemory" ); + throw std::system_error( result, "vk::Device::allocateMemory" ); } return memory; } @@ -20809,7 +20870,7 @@ namespace vk Result result = static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), &pData ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::mapMemory" ); + throw std::system_error( result, "vk::Device::mapMemory" ); } return pData; } @@ -20840,7 +20901,7 @@ namespace vk Result result = static_cast( vkFlushMappedMemoryRanges( m_device, static_cast( memoryRanges.size() ), reinterpret_cast( memoryRanges.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::flushMappedMemoryRanges" ); + throw std::system_error( result, "vk::Device::flushMappedMemoryRanges" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -20856,7 +20917,7 @@ namespace vk Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, static_cast( memoryRanges.size() ), reinterpret_cast( memoryRanges.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::invalidateMappedMemoryRanges" ); + throw std::system_error( result, "vk::Device::invalidateMappedMemoryRanges" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -20902,7 +20963,7 @@ namespace vk Result result = static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::bindBufferMemory" ); + throw std::system_error( result, "vk::Device::bindBufferMemory" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -20934,7 +20995,7 @@ namespace vk Result result = static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::bindImageMemory" ); + throw std::system_error( result, "vk::Device::bindImageMemory" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -20968,7 +21029,7 @@ namespace vk Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createFence" ); + throw std::system_error( result, "vk::Device::createFence" ); } return fence; } @@ -20997,7 +21058,7 @@ namespace vk Result result = static_cast( vkResetFences( m_device, static_cast( fences.size() ), reinterpret_cast( fences.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::resetFences" ); + throw std::system_error( result, "vk::Device::resetFences" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -21015,7 +21076,7 @@ namespace vk Result result = static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eNotReady ) ) { - throw Exception( result, "vk::Device::getFenceStatus" ); + throw std::system_error( result, "vk::Device::getFenceStatus" ); } return result; } @@ -21032,7 +21093,7 @@ namespace vk Result result = static_cast( vkWaitForFences( m_device, static_cast( fences.size() ), reinterpret_cast( fences.data() ), waitAll, timeout ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eTimeout ) ) { - throw Exception( result, "vk::Device::waitForFences" ); + throw std::system_error( result, "vk::Device::waitForFences" ); } return result; } @@ -21050,7 +21111,7 @@ namespace vk Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &semaphore ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createSemaphore" ); + throw std::system_error( result, "vk::Device::createSemaphore" ); } return semaphore; } @@ -21080,7 +21141,7 @@ namespace vk Result result = static_cast( vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &event ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createEvent" ); + throw std::system_error( result, "vk::Device::createEvent" ); } return event; } @@ -21111,7 +21172,7 @@ namespace vk Result result = static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); if ( ( result != Result::eEventSet ) && ( result != Result::eEventReset ) ) { - throw Exception( result, "vk::Device::getEventStatus" ); + throw std::system_error( result, "vk::Device::getEventStatus" ); } return result; } @@ -21130,7 +21191,7 @@ namespace vk Result result = static_cast( vkSetEvent( m_device, static_cast( event ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::setEvent" ); + throw std::system_error( result, "vk::Device::setEvent" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -21148,7 +21209,7 @@ namespace vk Result result = static_cast( vkResetEvent( m_device, static_cast( event ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::resetEvent" ); + throw std::system_error( result, "vk::Device::resetEvent" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -21165,7 +21226,7 @@ namespace vk Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &queryPool ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createQueryPool" ); + throw std::system_error( result, "vk::Device::createQueryPool" ); } return queryPool; } @@ -21195,7 +21256,7 @@ namespace vk Result result = static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, static_cast( data.size() * sizeof( T ) ), reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eNotReady ) ) { - throw Exception( result, "vk::Device::getQueryPoolResults" ); + throw std::system_error( result, "vk::Device::getQueryPoolResults" ); } return result; } @@ -21213,7 +21274,7 @@ namespace vk Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &buffer ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createBuffer" ); + throw std::system_error( result, "vk::Device::createBuffer" ); } return buffer; } @@ -21243,7 +21304,7 @@ namespace vk Result result = static_cast( vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &view ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createBufferView" ); + throw std::system_error( result, "vk::Device::createBufferView" ); } return view; } @@ -21273,7 +21334,7 @@ namespace vk Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &image ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createImage" ); + throw std::system_error( result, "vk::Device::createImage" ); } return image; } @@ -21317,7 +21378,7 @@ namespace vk Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &view ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createImageView" ); + throw std::system_error( result, "vk::Device::createImageView" ); } return view; } @@ -21347,7 +21408,7 @@ namespace vk Result result = static_cast( vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &shaderModule ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createShaderModule" ); + throw std::system_error( result, "vk::Device::createShaderModule" ); } return shaderModule; } @@ -21377,7 +21438,7 @@ namespace vk Result result = static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &pipelineCache ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createPipelineCache" ); + throw std::system_error( result, "vk::Device::createPipelineCache" ); } return pipelineCache; } @@ -21408,13 +21469,13 @@ namespace vk Result result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::getPipelineCacheData" ); + throw std::system_error( result, "vk::Device::getPipelineCacheData" ); } data.resize( dataSize ); result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::getPipelineCacheData" ); + throw std::system_error( result, "vk::Device::getPipelineCacheData" ); } return std::move( data ); } @@ -21431,7 +21492,7 @@ namespace vk Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), static_cast( srcCaches.size() ), reinterpret_cast( srcCaches.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::mergePipelineCaches" ); + throw std::system_error( result, "vk::Device::mergePipelineCaches" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -21448,7 +21509,7 @@ namespace vk Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), static_cast( createInfos.size() ), reinterpret_cast( createInfos.data() ), reinterpret_cast( &allocator ), reinterpret_cast( pipelines.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createGraphicsPipelines" ); + throw std::system_error( result, "vk::Device::createGraphicsPipelines" ); } return std::move( pipelines ); } @@ -21466,7 +21527,7 @@ namespace vk Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), static_cast( createInfos.size() ), reinterpret_cast( createInfos.data() ), reinterpret_cast( &allocator ), reinterpret_cast( pipelines.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createComputePipelines" ); + throw std::system_error( result, "vk::Device::createComputePipelines" ); } return std::move( pipelines ); } @@ -21496,7 +21557,7 @@ namespace vk Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &pipelineLayout ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createPipelineLayout" ); + throw std::system_error( result, "vk::Device::createPipelineLayout" ); } return pipelineLayout; } @@ -21526,7 +21587,7 @@ namespace vk Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &sampler ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createSampler" ); + throw std::system_error( result, "vk::Device::createSampler" ); } return sampler; } @@ -21556,7 +21617,7 @@ namespace vk Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &setLayout ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createDescriptorSetLayout" ); + throw std::system_error( result, "vk::Device::createDescriptorSetLayout" ); } return setLayout; } @@ -21586,7 +21647,7 @@ namespace vk Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &descriptorPool ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createDescriptorPool" ); + throw std::system_error( result, "vk::Device::createDescriptorPool" ); } return descriptorPool; } @@ -21617,7 +21678,7 @@ namespace vk Result result = static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::resetDescriptorPool" ); + throw std::system_error( result, "vk::Device::resetDescriptorPool" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -21634,7 +21695,7 @@ namespace vk Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::allocateDescriptorSets" ); + throw std::system_error( result, "vk::Device::allocateDescriptorSets" ); } return std::move( descriptorSets ); } @@ -21651,7 +21712,7 @@ namespace vk Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), static_cast( descriptorSets.size() ), reinterpret_cast( descriptorSets.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::freeDescriptorSets" ); + throw std::system_error( result, "vk::Device::freeDescriptorSets" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -21680,7 +21741,7 @@ namespace vk Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &framebuffer ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createFramebuffer" ); + throw std::system_error( result, "vk::Device::createFramebuffer" ); } return framebuffer; } @@ -21710,7 +21771,7 @@ namespace vk Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &renderPass ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createRenderPass" ); + throw std::system_error( result, "vk::Device::createRenderPass" ); } return renderPass; } @@ -21754,7 +21815,7 @@ namespace vk Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &commandPool ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createCommandPool" ); + throw std::system_error( result, "vk::Device::createCommandPool" ); } return commandPool; } @@ -21785,7 +21846,7 @@ namespace vk Result result = static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::resetCommandPool" ); + throw std::system_error( result, "vk::Device::resetCommandPool" ); } } #endif /*VKCPP_ENHANCED_MODE*/ @@ -21802,7 +21863,7 @@ namespace vk Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::allocateCommandBuffers" ); + throw std::system_error( result, "vk::Device::allocateCommandBuffers" ); } return std::move( commandBuffers ); } @@ -21832,7 +21893,7 @@ namespace vk Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, static_cast( createInfos.size() ), reinterpret_cast( createInfos.data() ), reinterpret_cast( &allocator ), reinterpret_cast( swapchains.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createSharedSwapchainsKHR" ); + throw std::system_error( result, "vk::Device::createSharedSwapchainsKHR" ); } return std::move( swapchains ); } @@ -21850,7 +21911,7 @@ namespace vk Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &swapchain ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Device::createSwapchainKHR" ); + throw std::system_error( result, "vk::Device::createSwapchainKHR" ); } return swapchain; } @@ -21880,13 +21941,13 @@ namespace vk Result result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::Device::getSwapchainImagesKHR" ); + throw std::system_error( result, "vk::Device::getSwapchainImagesKHR" ); } swapchainImages.resize( swapchainImageCount ); result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::Device::getSwapchainImagesKHR" ); + throw std::system_error( result, "vk::Device::getSwapchainImagesKHR" ); } return result; } @@ -21903,7 +21964,7 @@ namespace vk 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 ) ) { - throw Exception( result, "vk::Device::acquireNextImageKHR" ); + throw std::system_error( result, "vk::Device::acquireNextImageKHR" ); } return result; } @@ -22036,7 +22097,7 @@ namespace vk Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::PhysicalDevice::getImageFormatProperties" ); + throw std::system_error( result, "vk::PhysicalDevice::getImageFormatProperties" ); } return imageFormatProperties; } @@ -22054,7 +22115,7 @@ namespace vk Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &device ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::PhysicalDevice::createDevice" ); + throw std::system_error( result, "vk::PhysicalDevice::createDevice" ); } return device; } @@ -22072,13 +22133,13 @@ namespace vk Result result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); + throw std::system_error( result, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); } properties.resize( propertyCount ); result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); + throw std::system_error( result, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); } return result; } @@ -22096,13 +22157,13 @@ namespace vk Result result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName.c_str(), &propertyCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); + throw std::system_error( result, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); } properties.resize( propertyCount ); result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName.c_str(), &propertyCount, reinterpret_cast( properties.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); + throw std::system_error( result, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); } return result; } @@ -22137,13 +22198,13 @@ namespace vk Result result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); } properties.resize( propertyCount ); result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); } return result; } @@ -22161,13 +22222,13 @@ namespace vk Result result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); } properties.resize( propertyCount ); result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); } return result; } @@ -22185,13 +22246,13 @@ namespace vk Result result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); } displays.resize( displayCount ); result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); } return result; } @@ -22209,13 +22270,13 @@ namespace vk Result result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); } properties.resize( propertyCount ); result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); } return result; } @@ -22233,7 +22294,7 @@ namespace vk Result result = static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &mode ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::PhysicalDevice::createDisplayModeKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::createDisplayModeKHR" ); } return mode; } @@ -22251,7 +22312,7 @@ namespace vk Result result = static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); } return capabilities; } @@ -22285,7 +22346,7 @@ namespace vk Result result = static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), &supported ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::PhysicalDevice::getSurfaceSupportKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getSurfaceSupportKHR" ); } return supported; } @@ -22302,7 +22363,7 @@ namespace vk Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); } return result; } @@ -22320,13 +22381,13 @@ namespace vk Result result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); } surfaceFormats.resize( surfaceFormatCount ); result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); } return result; } @@ -22344,13 +22405,13 @@ namespace vk Result result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); } presentModes.resize( presentModeCount ); result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); + throw std::system_error( result, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); } return result; } @@ -22656,13 +22717,13 @@ namespace vk Result result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::enumeratePhysicalDevices" ); + throw std::system_error( result, "vk::Instance::enumeratePhysicalDevices" ); } physicalDevices.resize( physicalDeviceCount ); result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::enumeratePhysicalDevices" ); + throw std::system_error( result, "vk::Instance::enumeratePhysicalDevices" ); } return std::move( physicalDevices ); } @@ -22695,7 +22756,7 @@ namespace vk Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &surface ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::createAndroidSurfaceKHR" ); + throw std::system_error( result, "vk::Instance::createAndroidSurfaceKHR" ); } return surface; } @@ -22714,7 +22775,7 @@ namespace vk Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &surface ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::createDisplayPlaneSurfaceKHR" ); + throw std::system_error( result, "vk::Instance::createDisplayPlaneSurfaceKHR" ); } return surface; } @@ -22735,7 +22796,7 @@ namespace vk Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &surface ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::createMirSurfaceKHR" ); + throw std::system_error( result, "vk::Instance::createMirSurfaceKHR" ); } return surface; } @@ -22769,7 +22830,7 @@ namespace vk Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &surface ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::createWaylandSurfaceKHR" ); + throw std::system_error( result, "vk::Instance::createWaylandSurfaceKHR" ); } return surface; } @@ -22791,7 +22852,7 @@ namespace vk Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &surface ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::createWin32SurfaceKHR" ); + throw std::system_error( result, "vk::Instance::createWin32SurfaceKHR" ); } return surface; } @@ -22813,7 +22874,7 @@ namespace vk Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &surface ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::createXlibSurfaceKHR" ); + throw std::system_error( result, "vk::Instance::createXlibSurfaceKHR" ); } return surface; } @@ -22835,7 +22896,7 @@ namespace vk Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &surface ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::createXcbSurfaceKHR" ); + throw std::system_error( result, "vk::Instance::createXcbSurfaceKHR" ); } return surface; } @@ -22854,7 +22915,7 @@ namespace vk Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &callback ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::Instance::createDebugReportCallbackEXT" ); + throw std::system_error( result, "vk::Instance::createDebugReportCallbackEXT" ); } return callback; } @@ -22925,7 +22986,7 @@ namespace vk Result result = static_cast( vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &instance ) ) ); if ( result != Result::eSuccess ) { - throw Exception( result, "vk::createInstance" ); + throw std::system_error( result, "vk::createInstance" ); } return instance; } @@ -22943,13 +23004,13 @@ namespace vk Result result = static_cast( vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::enumerateInstanceLayerProperties" ); + throw std::system_error( result, "vk::enumerateInstanceLayerProperties" ); } properties.resize( propertyCount ); result = static_cast( vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::enumerateInstanceLayerProperties" ); + throw std::system_error( result, "vk::enumerateInstanceLayerProperties" ); } return result; } @@ -22967,13 +23028,13 @@ namespace vk Result result = static_cast( vkEnumerateInstanceExtensionProperties( layerName.c_str(), &propertyCount, nullptr ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::enumerateInstanceExtensionProperties" ); + throw std::system_error( result, "vk::enumerateInstanceExtensionProperties" ); } properties.resize( propertyCount ); result = static_cast( vkEnumerateInstanceExtensionProperties( layerName.c_str(), &propertyCount, reinterpret_cast( properties.data() ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eIncomplete ) ) { - throw Exception( result, "vk::enumerateInstanceExtensionProperties" ); + throw std::system_error( result, "vk::enumerateInstanceExtensionProperties" ); } return result; } @@ -24065,37 +24126,6 @@ namespace vk } } - inline std::string getString(Result value) - { - switch (value) - { - case Result::eSuccess: return "Success"; - case Result::eNotReady: return "NotReady"; - case Result::eTimeout: return "Timeout"; - case Result::eEventSet: return "EventSet"; - case Result::eEventReset: return "EventReset"; - case Result::eIncomplete: return "Incomplete"; - case Result::eErrorOutOfHostMemory: return "ErrorOutOfHostMemory"; - case Result::eErrorOutOfDeviceMemory: return "ErrorOutOfDeviceMemory"; - case Result::eErrorInitializationFailed: return "ErrorInitializationFailed"; - case Result::eErrorDeviceLost: return "ErrorDeviceLost"; - case Result::eErrorMemoryMapFailed: return "ErrorMemoryMapFailed"; - case Result::eErrorLayerNotPresent: return "ErrorLayerNotPresent"; - case Result::eErrorExtensionNotPresent: return "ErrorExtensionNotPresent"; - case Result::eErrorFeatureNotPresent: return "ErrorFeatureNotPresent"; - case Result::eErrorIncompatibleDriver: return "ErrorIncompatibleDriver"; - case Result::eErrorTooManyObjects: return "ErrorTooManyObjects"; - case Result::eErrorFormatNotSupported: return "ErrorFormatNotSupported"; - case Result::eErrorSurfaceLostKHR: return "ErrorSurfaceLostKHR"; - case Result::eErrorNativeWindowInUseKHR: return "ErrorNativeWindowInUseKHR"; - case Result::eSuboptimalKHR: return "SuboptimalKHR"; - case Result::eErrorOutOfDateKHR: return "ErrorOutOfDateKHR"; - case Result::eErrorIncompatibleDisplayKHR: return "ErrorIncompatibleDisplayKHR"; - case Result::eErrorValidationFailedEXT: return "ErrorValidationFailedEXT"; - default: return "unknown"; - } - } - inline std::string getString(DynamicState value) { switch (value)