diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index f601c01..5d01343 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -6117,9 +6117,11 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandEnhanced( std::map skippedParams = determineSkippedParams( commandIt->second.params, initialSkipCount, vectorParams, returnParams, false ); - std::set singularParams = false ? determineSingularParams( returnParams[0], vectorParams ) : std::set(); - std::set templatedParams = determineVoidPointerParams( commandIt->second.params ); + std::set skippedParams = determineSkippedParams( commandIt->second.params, initialSkipCount, vectorParams, returnParams, false ); + std::set singularParams = false ? determineSingularParams( returnParams[0], vectorParams ) : std::set(); + // special handling for vkGetMemoryHostPointerPropertiesEXT: here, we really need to stick with the const void * parameter ! + std::set templatedParams = + ( commandIt->first == "vkGetMemoryHostPointerPropertiesEXT" ) ? std::set() : determineVoidPointerParams( commandIt->second.params ); bool enumerating = determineEnumeration( vectorParams, returnParams ); std::vector dataTypes = determineDataTypes( commandIt->second.params, vectorParams, returnParams, templatedParams ); @@ -6156,7 +6158,7 @@ ${vectorSizeCheck} std::string callSequence = generateCallSequence( commandIt->first, commandIt->second, returnParams, vectorParams, initialSkipCount, singularParams, templatedParams, false, true ); - std::string className = stripPrefix( commandIt->second.params[initialSkipCount - 1].type.type, "Vk" ); + std::string className = initialSkipCount ? stripPrefix( commandIt->second.params[initialSkipCount - 1].type.type, "Vk" ) : "Context"; std::string returnVariable = generateReturnVariable( commandIt->second, returnParams, vectorParams, chained, false ); std::string dataDeclarations = generateDataDeclarations( commandIt->second, returnParams, vectorParams, templatedParams, false, false, chained, false, dataTypes, dataType, returnType, returnVariable ); @@ -7289,9 +7291,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith { switch ( vectorParams.size() ) { - case 0: - str = generateRAIIHandleCommandResultSingleSuccessWithErrors1ReturnValue( commandIt, initialSkipCount, vectorParams, returnParam, definition ); - break; + case 0: str = generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, { returnParam }, vectorParams, definition, false ); break; case 1: if ( returnParam == vectorParams.begin()->first ) { @@ -7359,7 +7359,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith { if ( vectorParams.empty() ) { - str = generateRAIIHandleCommandResultSingleSuccessWithErrors1ReturnValue( commandIt, initialSkipCount, vectorParams, returnParam, definition ); + str = generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, { returnParam }, vectorParams, definition, false ); str += generateRAIIHandleCommandResultSingleSuccessWithErrors1ReturnChain( commandIt, initialSkipCount, vectorParams, { returnParam }, definition ); } } @@ -7367,9 +7367,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith { switch ( vectorParams.size() ) { - case 0: - str = generateRAIIHandleCommandResultSingleSuccessWithErrors1ReturnValue( commandIt, initialSkipCount, vectorParams, returnParam, definition ); - break; + case 0: str = generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, { returnParam }, vectorParams, definition, false ); break; case 2: if ( returnParam == std::next( vectorParams.begin() )->first ) { @@ -7395,68 +7393,6 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith return str; } -std::string - VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWithErrors1ReturnValue( std::map::const_iterator commandIt, - size_t initialSkipCount, - std::map const & vectorParams, - size_t returnParam, - bool definition ) const -{ - std::set skippedParams = determineSkippedParams( commandIt->second.params, initialSkipCount, vectorParams, { returnParam }, false ); - std::string argumentList = - generateArgumentListEnhanced( commandIt->second.params, { returnParam }, vectorParams, skippedParams, {}, {}, definition, false, false, false ); - std::string commandName = generateCommandName( commandIt->first, commandIt->second.params, initialSkipCount, m_tags, false, false ); - std::string returnType = stripPostfix( commandIt->second.params[returnParam].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" ); - std::string typenameT; - if ( returnType == "void" ) - { - returnType = "T"; - typenameT = "template "; - } - - if ( definition ) - { - std::string const definitionTemplate = - R"( - ${typenameT}VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ${returnType} ${className}::${commandName}( ${argumentList} ) const - {${functionPointerCheck} - ${returnType} ${valueName}; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->${vkCommand}( ${callArguments} ) ); - if ( ${failureCheck} ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING"::${className}::${commandName}" ); - } - return ${valueName}; - } -)"; - - std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, {}, true ); - std::string valueName = startLowerCase( stripPrefix( commandIt->second.params[returnParam].name, "p" ) ); - - return replaceWithMap( definitionTemplate, - { { "argumentList", argumentList }, - { "callArguments", callArguments }, - { "className", initialSkipCount ? stripPrefix( commandIt->second.params[initialSkipCount - 1].type.type, "Vk" ) : "Context" }, - { "commandName", commandName }, - { "failureCheck", generateFailureCheck( commandIt->second.successCodes ) }, - { "functionPointerCheck", generateFunctionPointerCheck( commandIt->first, commandIt->second.referencedIn ) }, - { "valueName", valueName }, - { "returnType", returnType }, - { "typenameT", typenameT }, - { "vkCommand", commandIt->first } } ); - } - else - { - std::string const declarationTemplate = - R"( - ${typenameT}VULKAN_HPP_NODISCARD ${returnType} ${commandName}( ${argumentList} ) const; -)"; - - return replaceWithMap( declarationTemplate, - { { "argumentList", argumentList }, { "commandName", commandName }, { "returnType", returnType }, { "typenameT", typenameT } } ); - } -} - std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWithErrors1ReturnValueSingular( std::map::const_iterator commandIt, size_t initialSkipCount, @@ -9565,7 +9501,14 @@ std::string VulkanHppGenerator::generateReturnStatement( std::string const & com if ( ( commandData.successCodes.size() == 1 ) || enumerating ) { assert( commandData.successCodes[0] == "VK_SUCCESS" ); - if ( !commandData.errorCodes.empty() && !raii ) + if ( raii ) + { + if ( !returnVariable.empty() ) + { + returnStatement = "return " + returnVariable + ";"; + } + } + else if ( !commandData.errorCodes.empty() ) { if ( returnVariable.empty() ) { @@ -9694,7 +9637,6 @@ std::string VulkanHppGenerator::generateReturnType( { assert( !unique ); assert( ( commandData.returnType != "void" ) || ( returnParams.size() <= 2 ) ); - assert( ( commandData.returnType != "VkResult" ) || returnParams.empty() ); returnType = modifiedDataType; } else diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 14aff6e..9ad1f3c 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -773,11 +773,6 @@ private: size_t initialSkipCount, bool definition, size_t returnParam ) const; - std::string generateRAIIHandleCommandResultSingleSuccessWithErrors1ReturnValue( std::map::const_iterator commandIt, - size_t initialSkipCount, - std::map const & vectorParamIndices, - size_t returnParam, - bool definition ) const; std::string generateRAIIHandleCommandResultSingleSuccessWithErrors1ReturnValueSingular( std::map::const_iterator commandIt, size_t initialSkipCount, size_t returnParam, diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index 994c971..365575f 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -10184,18 +10184,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ImageCreateFlags flags ) const { VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - reinterpret_cast( &imageFormatProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); - } + VkResult result = getDispatcher()->vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), + static_cast( format ), + static_cast( type ), + static_cast( tiling ), + static_cast( usage ), + static_cast( flags ), + reinterpret_cast( &imageFormatProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); return imageFormatProperties; } @@ -10414,17 +10410,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::MemoryMapFlags flags ) const { - void * pData; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMapMemory( static_cast( m_device ), - static_cast( m_memory ), - static_cast( offset ), - static_cast( size ), - static_cast( flags ), - &pData ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); - } + void * pData; + VkResult result = getDispatcher()->vkMapMemory( static_cast( m_device ), + static_cast( m_memory ), + static_cast( offset ), + static_cast( size ), + static_cast( flags ), + &pData ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); return pData; } @@ -11335,12 +11328,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t Context::enumerateInstanceVersion() const { - uint32_t apiVersion; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); - } + uint32_t apiVersion; + VkResult result = getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); return apiVersion; } @@ -11549,14 +11539,11 @@ namespace VULKAN_HPP_NAMESPACE PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const { VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( + VkResult result = getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - } + reinterpret_cast( &imageFormatProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return imageFormatProperties; } @@ -11813,13 +11800,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Semaphore::getCounterValue() const { - uint64_t value; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( m_semaphore ), &value ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); - } + uint64_t value; + VkResult result = getDispatcher()->vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( m_semaphore ), &value ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); return value; } @@ -12201,16 +12184,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::Bool32 supported; - VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( static_cast( m_physicalDevice ), - queueFamilyIndex, - static_cast( surface ), - reinterpret_cast( &supported ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); - } + VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( + static_cast( m_physicalDevice ), queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); return supported; } @@ -12219,15 +12197,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - reinterpret_cast( &surfaceCapabilities ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); - } + VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + reinterpret_cast( &surfaceCapabilities ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); return surfaceCapabilities; } @@ -12383,13 +12358,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( - static_cast( m_device ), reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); - } + VkResult result = getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( + static_cast( m_device ), reinterpret_cast( &deviceGroupPresentCapabilities ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); return deviceGroupPresentCapabilities; } @@ -12398,13 +12371,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( - static_cast( m_device ), static_cast( surface ), reinterpret_cast( &modes ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); - } + VkResult result = getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( + static_cast( m_device ), static_cast( surface ), reinterpret_cast( &modes ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); return modes; } @@ -12582,16 +12553,13 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), - static_cast( m_displayModeKHR ), - planeIndex, - reinterpret_cast( &capabilities ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); - } + VkResult result = getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), + static_cast( m_displayModeKHR ), + planeIndex, + reinterpret_cast( &capabilities ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); return capabilities; } @@ -12802,15 +12770,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR capabilities; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoProfile ), - reinterpret_cast( &capabilities ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); - } + VkResult result = getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), + reinterpret_cast( &videoProfile ), + reinterpret_cast( &capabilities ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); return capabilities; } @@ -13122,13 +13087,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewAddressNVX && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageViewAddressNVX( - static_cast( m_device ), static_cast( m_imageView ), reinterpret_cast( &properties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::ImageView::getAddressNVX" ); - } + VkResult result = getDispatcher()->vkGetImageViewAddressNVX( + static_cast( m_device ), static_cast( m_imageView ), reinterpret_cast( &properties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ImageView::getAddressNVX" ); return properties; } @@ -13254,8 +13217,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV( + VkResult result = getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), @@ -13263,11 +13227,8 @@ namespace VULKAN_HPP_NAMESPACE static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), - reinterpret_cast( &externalImageFormatProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); - } + reinterpret_cast( &externalImageFormatProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); return externalImageFormatProperties; } @@ -13278,13 +13239,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandleNV && "Function needs extension enabled!" ); - HANDLE handle; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryWin32HandleNV( - static_cast( m_device ), static_cast( m_memory ), static_cast( handleType ), &handle ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::getMemoryWin32HandleNV" ); - } + + HANDLE handle; + VkResult result = getDispatcher()->vkGetMemoryWin32HandleNV( + static_cast( m_device ), static_cast( m_memory ), static_cast( handleType ), &handle ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::getMemoryWin32HandleNV" ); return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -13376,15 +13335,13 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( + VkResult result = getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); - } + reinterpret_cast( &imageFormatProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); return imageFormatProperties; } @@ -13611,13 +13568,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandleKHR && "Function needs extension enabled!" ); - HANDLE handle; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); - } + + HANDLE handle; + VkResult result = getDispatcher()->vkGetMemoryWin32HandleKHR( + static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); return handle; } @@ -13626,16 +13581,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandlePropertiesKHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( + VkResult result = getDispatcher()->vkGetMemoryWin32HandlePropertiesKHR( static_cast( m_device ), static_cast( handleType ), handle, - reinterpret_cast( &memoryWin32HandleProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); - } + reinterpret_cast( &memoryWin32HandleProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); return memoryWin32HandleProperties; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -13645,13 +13598,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdKHR && "Function needs extension enabled!" ); - int fd; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); - } + + int fd; + VkResult result = + getDispatcher()->vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); return fd; } @@ -13660,16 +13611,13 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdPropertiesKHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetMemoryFdPropertiesKHR( static_cast( m_device ), - static_cast( handleType ), - fd, - reinterpret_cast( &memoryFdProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); - } + VkResult result = getDispatcher()->vkGetMemoryFdPropertiesKHR( static_cast( m_device ), + static_cast( handleType ), + fd, + reinterpret_cast( &memoryFdProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); return memoryFdProperties; } @@ -13709,13 +13657,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreWin32HandleKHR && "Function needs extension enabled!" ); - HANDLE handle; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); - } + + HANDLE handle; + VkResult result = getDispatcher()->vkGetSemaphoreWin32HandleKHR( + static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -13735,13 +13681,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreFdKHR && "Function needs extension enabled!" ); - int fd; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); - } + + int fd; + VkResult result = + getDispatcher()->vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); return fd; } @@ -13877,15 +13821,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), - static_cast( surface ), - reinterpret_cast( &surfaceCapabilities ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); - } + VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), + static_cast( surface ), + reinterpret_cast( &surfaceCapabilities ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); return surfaceCapabilities; } @@ -13919,13 +13860,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t SwapchainKHR::getCounterEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainCounterEXT && "Function needs extension enabled!" ); - uint64_t counterValue; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSwapchainCounterEXT( - static_cast( m_device ), static_cast( m_swapchain ), static_cast( counter ), &counterValue ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); - } + + uint64_t counterValue; + VkResult result = getDispatcher()->vkGetSwapchainCounterEXT( + static_cast( m_device ), static_cast( m_swapchain ), static_cast( counter ), &counterValue ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); return counterValue; } @@ -13935,15 +13874,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRefreshCycleDurationGOOGLE && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetRefreshCycleDurationGOOGLE( static_cast( m_device ), - static_cast( m_swapchain ), - reinterpret_cast( &displayTimingProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getRefreshCycleDurationGOOGLE" ); - } + VkResult result = getDispatcher()->vkGetRefreshCycleDurationGOOGLE( static_cast( m_device ), + static_cast( m_swapchain ), + reinterpret_cast( &displayTimingProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getRefreshCycleDurationGOOGLE" ); return displayTimingProperties; } @@ -14102,13 +14038,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceWin32HandleKHR && "Function needs extension enabled!" ); - HANDLE handle; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetFenceWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); - } + + HANDLE handle; + VkResult result = getDispatcher()->vkGetFenceWin32HandleKHR( + static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -14127,13 +14061,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceFdKHR && "Function needs extension enabled!" ); - int fd; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); - } + + int fd; + VkResult result = getDispatcher()->vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); return fd; } @@ -14218,15 +14149,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - } + VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return surfaceCapabilities; } @@ -14444,15 +14372,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayPlaneCapabilities2KHR && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &displayPlaneInfo ), - reinterpret_cast( &capabilities ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); - } + VkResult result = getDispatcher()->vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &displayPlaneInfo ), + reinterpret_cast( &capabilities ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); return capabilities; } @@ -14579,13 +14504,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); - } + VkResult result = getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( + static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); return properties; } @@ -14609,13 +14532,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID && "Function needs extension enabled!" ); - struct AHardwareBuffer * buffer; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID( - static_cast( m_device ), reinterpret_cast( &info ), &buffer ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); - } + + struct AHardwareBuffer * buffer; + VkResult result = getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID( + static_cast( m_device ), reinterpret_cast( &info ), &buffer ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); return buffer; } # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ @@ -15056,13 +14977,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( - static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); - } + VkResult result = getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( + static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); return properties; } @@ -15470,16 +15389,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryHostPointerPropertiesEXT && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( + VkResult result = getDispatcher()->vkGetMemoryHostPointerPropertiesEXT( static_cast( m_device ), static_cast( handleType ), pHostPointer, - reinterpret_cast( &memoryHostPointerProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); - } + reinterpret_cast( &memoryHostPointerProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); return memoryHostPointerProperties; } @@ -15657,13 +15574,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreCounterValueKHR && "Function needs extension enabled!" ); - uint64_t value; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetSemaphoreCounterValueKHR( static_cast( m_device ), static_cast( m_semaphore ), &value ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValueKHR" ); - } + + uint64_t value; + VkResult result = getDispatcher()->vkGetSemaphoreCounterValueKHR( static_cast( m_device ), static_cast( m_semaphore ), &value ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValueKHR" ); return value; } @@ -15761,13 +15675,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPerformanceParameterINTEL && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPerformanceParameterINTEL( - static_cast( m_device ), static_cast( parameter ), reinterpret_cast( &value ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); - } + VkResult result = getDispatcher()->vkGetPerformanceParameterINTEL( + static_cast( m_device ), static_cast( parameter ), reinterpret_cast( &value ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); return value; } @@ -16059,15 +15971,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT( static_cast( m_device ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &modes ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); - } + VkResult result = getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT( static_cast( m_device ), + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &modes ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); return modes; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -16982,13 +16891,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryZirconHandleFUCHSIA && "Function needs extension enabled!" ); - zx_handle_t zirconHandle; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryZirconHandleFUCHSIA( - static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); - } + + zx_handle_t zirconHandle; + VkResult result = getDispatcher()->vkGetMemoryZirconHandleFUCHSIA( + static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); return zirconHandle; } @@ -16997,16 +16904,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA memoryZirconHandleProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA( - static_cast( m_device ), - static_cast( handleType ), - zirconHandle, - reinterpret_cast( &memoryZirconHandleProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); - } + VkResult result = + getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA( static_cast( m_device ), + static_cast( handleType ), + zirconHandle, + reinterpret_cast( &memoryZirconHandleProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); return memoryZirconHandleProperties; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -17030,13 +16935,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA && "Function needs extension enabled!" ); - zx_handle_t zirconHandle; - VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA( - static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); - } + + zx_handle_t zirconHandle; + VkResult result = getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA( + static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); return zirconHandle; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -17080,15 +16983,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA properties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA( static_cast( m_device ), - static_cast( m_collection ), - reinterpret_cast( &properties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::getProperties" ); - } + VkResult result = getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA( static_cast( m_device ), + static_cast( m_collection ), + reinterpret_cast( &properties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::getProperties" ); return properties; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -17137,15 +17037,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryRemoteAddressNV && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::RemoteAddressNV address; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetMemoryRemoteAddressNV( static_cast( m_device ), - reinterpret_cast( &memoryGetRemoteAddressInfo ), - reinterpret_cast( &address ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); - } + VkResult result = getDispatcher()->vkGetMemoryRemoteAddressNV( static_cast( m_device ), + reinterpret_cast( &memoryGetRemoteAddressInfo ), + reinterpret_cast( &address ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); return address; } @@ -17156,15 +17053,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelinePropertiesEXT && "Function needs extension enabled!" ); + VULKAN_HPP_NAMESPACE::BaseOutStructure pipelineProperties; - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetPipelinePropertiesEXT( static_cast( m_device ), - reinterpret_cast( &pipelineInfo ), - reinterpret_cast( &pipelineProperties ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); - } + VkResult result = getDispatcher()->vkGetPipelinePropertiesEXT( static_cast( m_device ), + reinterpret_cast( &pipelineInfo ), + reinterpret_cast( &pipelineProperties ) ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); return pipelineProperties; }