Combine two types of commands into one generation function

This commit is contained in:
asuessenbach 2022-06-14 09:08:56 +02:00
parent 15788c576c
commit 4630feb760
5 changed files with 73 additions and 133 deletions

View File

@ -6531,71 +6531,12 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE
std::map<size_t, size_t> vectorParams = determineVectorParams( commandIt->second.params ); std::map<size_t, size_t> vectorParams = determineVectorParams( commandIt->second.params );
if ( vectorParams.empty() ) if ( vectorParams.empty() )
{ {
str = generateRAIIHandleCommandResultMultiSuccessWithErrors1ReturnValue( commandIt, initialSkipCount, vectorParams, { returnParam }, definition ); str = generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, { returnParam }, vectorParams, definition, false );
} }
} }
return str; return str;
} }
std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithErrors1ReturnValue( std::map<std::string, CommandData>::const_iterator commandIt,
size_t initialSkipCount,
std::map<size_t, size_t> const & vectorParams,
std::vector<size_t> const & returnParams,
bool definition ) const
{
std::set<size_t> skippedParams = determineSkippedParams( commandIt->second.params, initialSkipCount, vectorParams, returnParams, false );
std::string argumentList =
generateArgumentListEnhanced( commandIt->second.params, returnParams, vectorParams, skippedParams, {}, {}, definition, false, false, false );
generateArgumentListEnhanced( commandIt->second.params, returnParams, 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[returnParams[0]].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" );
if ( definition )
{
std::string const definitionTemplate =
R"(
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair<VULKAN_HPP_NAMESPACE::Result, ${returnType}> ${className}::${commandName}( ${argumentList} ) const
{${functionPointerCheck}
${returnType} ${valueName};
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->${vkCommand}( ${callArguments} ) );
if ( ${failureCheck} )
{
throwResultException( result, VULKAN_HPP_NAMESPACE_STRING"::${className}::${commandName}" );
}
return std::make_pair( result, ${valueName} );
}
)";
std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, {}, true );
std::string valueName = startLowerCase( stripPrefix( commandIt->second.params[returnParams[0]].name, "p" ) );
return replaceWithMap( definitionTemplate,
{ { "argumentList", argumentList },
{ "callArguments", callArguments },
{ "className", stripPrefix( commandIt->second.params[initialSkipCount - 1].type.type, "Vk" ) },
{ "commandName", commandName },
{ "failureCheck", generateFailureCheck( commandIt->second.successCodes ) },
{ "functionPointerCheck", generateFunctionPointerCheck( commandIt->first, commandIt->second.referencedIn ) },
{ "valueName", valueName },
{ "returnType", returnType },
{ "vkCommand", commandIt->first } } );
}
else
{
std::string const declarationTemplate =
R"(
VULKAN_HPP_NODISCARD std::pair<VULKAN_HPP_NAMESPACE::Result, ${returnType}> ${commandName}( ${argumentList} ) const;
)";
return replaceWithMap( declarationTemplate,
{
{ "argumentList", argumentList },
{ "commandName", commandName },
{ "returnType", returnType },
} );
}
}
std::string std::string
VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithErrors1ReturnVoidSingular( std::map<std::string, CommandData>::const_iterator commandIt, VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithErrors1ReturnVoidSingular( std::map<std::string, CommandData>::const_iterator commandIt,
size_t initialSkipCount, size_t initialSkipCount,
@ -9514,8 +9455,9 @@ std::string VulkanHppGenerator::generateReturnStatement( std::string const & com
} }
else else
{ {
assert( beginsWith( returnType, "ResultValue<" ) && endsWith( returnType, ">" ) ); assert( beginsWith( returnType, raii ? "std::pair<VULKAN_HPP_NAMESPACE::Result, " : "ResultValue<" ) && endsWith( returnType, ">" ) );
returnStatement = "return " + returnType + "( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), " + returnVariable + " );"; returnStatement =
"return " + ( raii ? "std::make_pair" : returnType ) + "( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), " + returnVariable + " );";
} }
} }
} }
@ -9599,7 +9541,7 @@ std::string VulkanHppGenerator::generateReturnType(
if ( ( 1 < commandData.successCodes.size() ) && ( returnParams.size() == 1 ) ) if ( ( 1 < commandData.successCodes.size() ) && ( returnParams.size() == 1 ) )
{ {
assert( !commandData.errorCodes.empty() && !chained ); assert( !commandData.errorCodes.empty() && !chained );
returnType = "ResultValue<" + modifiedDataType + ">"; returnType = ( raii ? "std::pair<VULKAN_HPP_NAMESPACE::Result, " : "ResultValue<" ) + modifiedDataType + ">";
} }
else else
{ {

View File

@ -712,11 +712,6 @@ private:
size_t initialSkipCount, size_t initialSkipCount,
bool definition, bool definition,
size_t returnParam ) const; size_t returnParam ) const;
std::string generateRAIIHandleCommandResultMultiSuccessWithErrors1ReturnValue( std::map<std::string, CommandData>::const_iterator commandIt,
size_t initialSkipCount,
std::map<size_t, size_t> const & vectorParamIndices,
std::vector<size_t> const & returnParamIndices,
bool definition ) const;
std::string generateRAIIHandleCommandResultMultiSuccessWithErrors1ReturnVoidSingular( std::map<std::string, CommandData>::const_iterator commandIt, std::string generateRAIIHandleCommandResultMultiSuccessWithErrors1ReturnVoidSingular( std::map<std::string, CommandData>::const_iterator commandIt,
size_t initialSkipCount, size_t initialSkipCount,
std::map<size_t, size_t> const & vectorParamIndices, std::map<size_t, size_t> const & vectorParamIndices,

View File

@ -8583,12 +8583,12 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags( FormatFeatureFlagBits::eDisjoint ) | VkFlags( FormatFeatureFlagBits::eCositedChromaSamples ) | VkFlags( FormatFeatureFlagBits::eDisjoint ) | VkFlags( FormatFeatureFlagBits::eCositedChromaSamples ) |
VkFlags( FormatFeatureFlagBits::eSampledImageFilterMinmax ) | VkFlags( FormatFeatureFlagBits::eSampledImageFilterCubicIMG ) VkFlags( FormatFeatureFlagBits::eSampledImageFilterMinmax ) | VkFlags( FormatFeatureFlagBits::eSampledImageFilterCubicIMG )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( FormatFeatureFlagBits::eVideoDecodeOutputKHR ) | VkFlags( FormatFeatureFlagBits::eVideoDecodeDpbKHR ) | VkFlags( FormatFeatureFlagBits::eVideoDecodeOutputKHR ) | VkFlags( FormatFeatureFlagBits::eVideoDecodeDpbKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags( FormatFeatureFlagBits::eAccelerationStructureVertexBufferKHR ) | VkFlags( FormatFeatureFlagBits::eFragmentDensityMapEXT ) | | VkFlags( FormatFeatureFlagBits::eAccelerationStructureVertexBufferKHR ) | VkFlags( FormatFeatureFlagBits::eFragmentDensityMapEXT ) |
VkFlags( FormatFeatureFlagBits::eFragmentShadingRateAttachmentKHR ) VkFlags( FormatFeatureFlagBits::eFragmentShadingRateAttachmentKHR )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( FormatFeatureFlagBits::eVideoEncodeInputKHR ) | VkFlags( FormatFeatureFlagBits::eVideoEncodeDpbKHR ) | VkFlags( FormatFeatureFlagBits::eVideoEncodeInputKHR ) | VkFlags( FormatFeatureFlagBits::eVideoEncodeDpbKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
}; };
}; };
@ -8783,15 +8783,15 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags( ImageUsageFlagBits::eDepthStencilAttachment ) | VkFlags( ImageUsageFlagBits::eTransientAttachment ) | VkFlags( ImageUsageFlagBits::eDepthStencilAttachment ) | VkFlags( ImageUsageFlagBits::eTransientAttachment ) |
VkFlags( ImageUsageFlagBits::eInputAttachment ) VkFlags( ImageUsageFlagBits::eInputAttachment )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( ImageUsageFlagBits::eVideoDecodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoDecodeSrcKHR ) | | VkFlags( ImageUsageFlagBits::eVideoDecodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoDecodeSrcKHR ) |
VkFlags( ImageUsageFlagBits::eVideoDecodeDpbKHR ) VkFlags( ImageUsageFlagBits::eVideoDecodeDpbKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags( ImageUsageFlagBits::eFragmentDensityMapEXT ) | VkFlags( ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR ) | VkFlags( ImageUsageFlagBits::eFragmentDensityMapEXT ) | VkFlags( ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( ImageUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoEncodeSrcKHR ) | | VkFlags( ImageUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoEncodeSrcKHR ) |
VkFlags( ImageUsageFlagBits::eVideoEncodeDpbKHR ) VkFlags( ImageUsageFlagBits::eVideoEncodeDpbKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags( ImageUsageFlagBits::eInvocationMaskHUAWEI ) | VkFlags( ImageUsageFlagBits::eInvocationMaskHUAWEI )
}; };
}; };
@ -9024,7 +9024,7 @@ namespace VULKAN_HPP_NAMESPACE
allFlags = VkFlags( QueueFlagBits::eGraphics ) | VkFlags( QueueFlagBits::eCompute ) | VkFlags( QueueFlagBits::eTransfer ) | allFlags = VkFlags( QueueFlagBits::eGraphics ) | VkFlags( QueueFlagBits::eCompute ) | VkFlags( QueueFlagBits::eTransfer ) |
VkFlags( QueueFlagBits::eSparseBinding ) | VkFlags( QueueFlagBits::eProtected ) VkFlags( QueueFlagBits::eSparseBinding ) | VkFlags( QueueFlagBits::eProtected )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( QueueFlagBits::eVideoDecodeKHR ) | VkFlags( QueueFlagBits::eVideoEncodeKHR ) | VkFlags( QueueFlagBits::eVideoDecodeKHR ) | VkFlags( QueueFlagBits::eVideoEncodeKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
}; };
}; };
@ -9634,7 +9634,7 @@ namespace VULKAN_HPP_NAMESPACE
allFlags = VkFlags( QueryResultFlagBits::e64 ) | VkFlags( QueryResultFlagBits::eWait ) | VkFlags( QueryResultFlagBits::eWithAvailability ) | allFlags = VkFlags( QueryResultFlagBits::e64 ) | VkFlags( QueryResultFlagBits::eWait ) | VkFlags( QueryResultFlagBits::eWithAvailability ) |
VkFlags( QueryResultFlagBits::ePartial ) VkFlags( QueryResultFlagBits::ePartial )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( QueryResultFlagBits::eWithStatusKHR ) | VkFlags( QueryResultFlagBits::eWithStatusKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
}; };
}; };
@ -9747,13 +9747,13 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags( BufferUsageFlagBits::eIndexBuffer ) | VkFlags( BufferUsageFlagBits::eVertexBuffer ) | VkFlags( BufferUsageFlagBits::eIndexBuffer ) | VkFlags( BufferUsageFlagBits::eVertexBuffer ) |
VkFlags( BufferUsageFlagBits::eIndirectBuffer ) | VkFlags( BufferUsageFlagBits::eShaderDeviceAddress ) VkFlags( BufferUsageFlagBits::eIndirectBuffer ) | VkFlags( BufferUsageFlagBits::eShaderDeviceAddress )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( BufferUsageFlagBits::eVideoDecodeSrcKHR ) | VkFlags( BufferUsageFlagBits::eVideoDecodeDstKHR ) | VkFlags( BufferUsageFlagBits::eVideoDecodeSrcKHR ) | VkFlags( BufferUsageFlagBits::eVideoDecodeDstKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags( BufferUsageFlagBits::eTransformFeedbackBufferEXT ) | VkFlags( BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT ) | | VkFlags( BufferUsageFlagBits::eTransformFeedbackBufferEXT ) | VkFlags( BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT ) |
VkFlags( BufferUsageFlagBits::eConditionalRenderingEXT ) | VkFlags( BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR ) | VkFlags( BufferUsageFlagBits::eConditionalRenderingEXT ) | VkFlags( BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR ) |
VkFlags( BufferUsageFlagBits::eAccelerationStructureStorageKHR ) | VkFlags( BufferUsageFlagBits::eShaderBindingTableKHR ) VkFlags( BufferUsageFlagBits::eAccelerationStructureStorageKHR ) | VkFlags( BufferUsageFlagBits::eShaderBindingTableKHR )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( BufferUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( BufferUsageFlagBits::eVideoEncodeSrcKHR ) | VkFlags( BufferUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( BufferUsageFlagBits::eVideoEncodeSrcKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
}; };
}; };
@ -11427,13 +11427,13 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D12Heap ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D12Heap ) |
VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D12Resource ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eDmaBufEXT ) VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D12Resource ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eDmaBufEXT )
#if defined( VK_USE_PLATFORM_ANDROID_KHR ) #if defined( VK_USE_PLATFORM_ANDROID_KHR )
| VkFlags( ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID )
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/
| VkFlags( ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT )
#if defined( VK_USE_PLATFORM_FUCHSIA ) #if defined( VK_USE_PLATFORM_FUCHSIA )
| VkFlags( ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA )
#endif /*VK_USE_PLATFORM_FUCHSIA*/ #endif /*VK_USE_PLATFORM_FUCHSIA*/
| VkFlags( ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV )
}; };
}; };
@ -11761,7 +11761,7 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags( ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt ) | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence ) | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt ) | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence ) |
VkFlags( ExternalSemaphoreHandleTypeFlagBits::eSyncFd ) VkFlags( ExternalSemaphoreHandleTypeFlagBits::eSyncFd )
#if defined( VK_USE_PLATFORM_FUCHSIA ) #if defined( VK_USE_PLATFORM_FUCHSIA )
| VkFlags( ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA ) | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA )
#endif /*VK_USE_PLATFORM_FUCHSIA*/ #endif /*VK_USE_PLATFORM_FUCHSIA*/
}; };
}; };
@ -12159,9 +12159,9 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags64( PipelineStageFlagBits2::eClear ) | VkFlags64( PipelineStageFlagBits2::eIndexInput ) | VkFlags64( PipelineStageFlagBits2::eClear ) | VkFlags64( PipelineStageFlagBits2::eIndexInput ) |
VkFlags64( PipelineStageFlagBits2::eVertexAttributeInput ) | VkFlags64( PipelineStageFlagBits2::ePreRasterizationShaders ) VkFlags64( PipelineStageFlagBits2::eVertexAttributeInput ) | VkFlags64( PipelineStageFlagBits2::ePreRasterizationShaders )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags64( PipelineStageFlagBits2::eVideoDecodeKHR ) | VkFlags64( PipelineStageFlagBits2::eVideoEncodeKHR ) | VkFlags64( PipelineStageFlagBits2::eVideoDecodeKHR ) | VkFlags64( PipelineStageFlagBits2::eVideoEncodeKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags64( PipelineStageFlagBits2::eTransformFeedbackEXT ) | VkFlags64( PipelineStageFlagBits2::eConditionalRenderingEXT ) | | VkFlags64( PipelineStageFlagBits2::eTransformFeedbackEXT ) | VkFlags64( PipelineStageFlagBits2::eConditionalRenderingEXT ) |
VkFlags64( PipelineStageFlagBits2::eCommandPreprocessNV ) | VkFlags64( PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR ) | VkFlags64( PipelineStageFlagBits2::eCommandPreprocessNV ) | VkFlags64( PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR ) |
VkFlags64( PipelineStageFlagBits2::eAccelerationStructureBuildKHR ) | VkFlags64( PipelineStageFlagBits2::eRayTracingShaderKHR ) | VkFlags64( PipelineStageFlagBits2::eAccelerationStructureBuildKHR ) | VkFlags64( PipelineStageFlagBits2::eRayTracingShaderKHR ) |
VkFlags64( PipelineStageFlagBits2::eFragmentDensityProcessEXT ) | VkFlags64( PipelineStageFlagBits2::eTaskShaderNV ) | VkFlags64( PipelineStageFlagBits2::eFragmentDensityProcessEXT ) | VkFlags64( PipelineStageFlagBits2::eTaskShaderNV ) |
@ -12297,10 +12297,10 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags64( AccessFlagBits2::eShaderSampledRead ) | VkFlags64( AccessFlagBits2::eShaderStorageRead ) | VkFlags64( AccessFlagBits2::eShaderSampledRead ) | VkFlags64( AccessFlagBits2::eShaderStorageRead ) |
VkFlags64( AccessFlagBits2::eShaderStorageWrite ) VkFlags64( AccessFlagBits2::eShaderStorageWrite )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags64( AccessFlagBits2::eVideoDecodeReadKHR ) | VkFlags64( AccessFlagBits2::eVideoDecodeWriteKHR ) | | VkFlags64( AccessFlagBits2::eVideoDecodeReadKHR ) | VkFlags64( AccessFlagBits2::eVideoDecodeWriteKHR ) |
VkFlags64( AccessFlagBits2::eVideoEncodeReadKHR ) | VkFlags64( AccessFlagBits2::eVideoEncodeWriteKHR ) VkFlags64( AccessFlagBits2::eVideoEncodeReadKHR ) | VkFlags64( AccessFlagBits2::eVideoEncodeWriteKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags64( AccessFlagBits2::eTransformFeedbackWriteEXT ) | VkFlags64( AccessFlagBits2::eTransformFeedbackCounterReadEXT ) | | VkFlags64( AccessFlagBits2::eTransformFeedbackWriteEXT ) | VkFlags64( AccessFlagBits2::eTransformFeedbackCounterReadEXT ) |
VkFlags64( AccessFlagBits2::eTransformFeedbackCounterWriteEXT ) | VkFlags64( AccessFlagBits2::eConditionalRenderingReadEXT ) | VkFlags64( AccessFlagBits2::eTransformFeedbackCounterWriteEXT ) | VkFlags64( AccessFlagBits2::eConditionalRenderingReadEXT ) |
VkFlags64( AccessFlagBits2::eCommandPreprocessReadNV ) | VkFlags64( AccessFlagBits2::eCommandPreprocessWriteNV ) | VkFlags64( AccessFlagBits2::eCommandPreprocessReadNV ) | VkFlags64( AccessFlagBits2::eCommandPreprocessWriteNV ) |
VkFlags64( AccessFlagBits2::eFragmentShadingRateAttachmentReadKHR ) | VkFlags64( AccessFlagBits2::eAccelerationStructureReadKHR ) | VkFlags64( AccessFlagBits2::eFragmentShadingRateAttachmentReadKHR ) | VkFlags64( AccessFlagBits2::eAccelerationStructureReadKHR ) |
@ -12537,14 +12537,14 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags64( FormatFeatureFlagBits2::eStorageReadWithoutFormat ) | VkFlags64( FormatFeatureFlagBits2::eStorageWriteWithoutFormat ) | VkFlags64( FormatFeatureFlagBits2::eStorageReadWithoutFormat ) | VkFlags64( FormatFeatureFlagBits2::eStorageWriteWithoutFormat ) |
VkFlags64( FormatFeatureFlagBits2::eSampledImageDepthComparison ) VkFlags64( FormatFeatureFlagBits2::eSampledImageDepthComparison )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags64( FormatFeatureFlagBits2::eVideoDecodeOutputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeDpbKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeOutputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeDpbKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags64( FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR ) | VkFlags64( FormatFeatureFlagBits2::eFragmentDensityMapEXT ) | | VkFlags64( FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR ) | VkFlags64( FormatFeatureFlagBits2::eFragmentDensityMapEXT ) |
VkFlags64( FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR ) VkFlags64( FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR )
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags64( FormatFeatureFlagBits2::eVideoEncodeInputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeDpbKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeInputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeDpbKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags64( FormatFeatureFlagBits2::eLinearColorAttachmentNV ) | VkFlags64( FormatFeatureFlagBits2::eLinearColorAttachmentNV )
}; };
}; };
@ -13068,7 +13068,7 @@ namespace VULKAN_HPP_NAMESPACE
{ {
allFlags = VkFlags( VideoCodecOperationFlagBitsKHR::eInvalid ) allFlags = VkFlags( VideoCodecOperationFlagBitsKHR::eInvalid )
# if defined( VK_ENABLE_BETA_EXTENSIONS ) # if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH265EXT ) | | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH265EXT ) |
VkFlags( VideoCodecOperationFlagBitsKHR::eDecodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eDecodeH265EXT ) VkFlags( VideoCodecOperationFlagBitsKHR::eDecodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eDecodeH265EXT )
# endif /*VK_ENABLE_BETA_EXTENSIONS*/ # endif /*VK_ENABLE_BETA_EXTENSIONS*/
}; };

View File

@ -12340,20 +12340,21 @@ namespace VULKAN_HPP_NAMESPACE
SwapchainKHR::acquireNextImage( uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence ) const SwapchainKHR::acquireNextImage( uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence ) const
{ {
VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImageKHR && "Function <vkAcquireNextImageKHR> needs extension <VK_KHR_swapchain> enabled!" ); VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImageKHR && "Function <vkAcquireNextImageKHR> needs extension <VK_KHR_swapchain> enabled!" );
uint32_t imageIndex;
VULKAN_HPP_NAMESPACE::Result result = uint32_t imageIndex;
static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkAcquireNextImageKHR( static_cast<VkDevice>( m_device ), VkResult result = getDispatcher()->vkAcquireNextImageKHR( static_cast<VkDevice>( m_device ),
static_cast<VkSwapchainKHR>( m_swapchain ), static_cast<VkSwapchainKHR>( m_swapchain ),
timeout, timeout,
static_cast<VkSemaphore>( semaphore ), static_cast<VkSemaphore>( semaphore ),
static_cast<VkFence>( fence ), static_cast<VkFence>( fence ),
&imageIndex ) ); &imageIndex );
if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) && resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
( result != VULKAN_HPP_NAMESPACE::Result::eNotReady ) && ( result != VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR ) ) VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireNextImage",
{ { VULKAN_HPP_NAMESPACE::Result::eSuccess,
throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireNextImage" ); VULKAN_HPP_NAMESPACE::Result::eTimeout,
} VULKAN_HPP_NAMESPACE::Result::eNotReady,
return std::make_pair( result, imageIndex ); VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } );
return std::make_pair( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), imageIndex );
} }
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo ) const VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo ) const
@ -12433,15 +12434,17 @@ namespace VULKAN_HPP_NAMESPACE
Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo ) const Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo ) const
{ {
VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImage2KHR && "Function <vkAcquireNextImage2KHR> needs extension <VK_KHR_swapchain> enabled!" ); VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImage2KHR && "Function <vkAcquireNextImage2KHR> needs extension <VK_KHR_swapchain> enabled!" );
uint32_t imageIndex;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkAcquireNextImage2KHR( uint32_t imageIndex;
static_cast<VkDevice>( m_device ), reinterpret_cast<const VkAcquireNextImageInfoKHR *>( &acquireInfo ), &imageIndex ) ); VkResult result = getDispatcher()->vkAcquireNextImage2KHR(
if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) && static_cast<VkDevice>( m_device ), reinterpret_cast<const VkAcquireNextImageInfoKHR *>( &acquireInfo ), &imageIndex );
( result != VULKAN_HPP_NAMESPACE::Result::eNotReady ) && ( result != VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR ) ) resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
{ VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR",
throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR" ); { VULKAN_HPP_NAMESPACE::Result::eSuccess,
} VULKAN_HPP_NAMESPACE::Result::eTimeout,
return std::make_pair( result, imageIndex ); VULKAN_HPP_NAMESPACE::Result::eNotReady,
VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } );
return std::make_pair( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), imageIndex );
} }
//=== VK_KHR_display === //=== VK_KHR_display ===
@ -17030,14 +17033,14 @@ namespace VULKAN_HPP_NAMESPACE
{ {
VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI && VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI &&
"Function <vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI> needs extension <VK_HUAWEI_subpass_shading> enabled!" ); "Function <vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI> needs extension <VK_HUAWEI_subpass_shading> enabled!" );
VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( VkResult result = getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
static_cast<VkDevice>( m_device ), static_cast<VkRenderPass>( m_renderPass ), reinterpret_cast<VkExtent2D *>( &maxWorkgroupSize ) ) ); static_cast<VkDevice>( m_device ), static_cast<VkRenderPass>( m_renderPass ), reinterpret_cast<VkExtent2D *>( &maxWorkgroupSize ) );
if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) ) resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
{ VULKAN_HPP_NAMESPACE_STRING "::RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI",
throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI" ); { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } );
} return std::make_pair( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), maxWorkgroupSize );
return std::make_pair( result, maxWorkgroupSize );
} }
VULKAN_HPP_INLINE void CommandBuffer::subpassShadingHUAWEI() const VULKAN_HPP_NOEXCEPT VULKAN_HPP_INLINE void CommandBuffer::subpassShadingHUAWEI() const VULKAN_HPP_NOEXCEPT

View File

@ -2611,10 +2611,10 @@ namespace VULKAN_HPP_NAMESPACE
public: public:
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {}; VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {};
uint32_t instanceCustomIndex : 24; uint32_t instanceCustomIndex : 24;
uint32_t mask : 8; uint32_t mask : 8;
uint32_t instanceShaderBindingTableRecordOffset : 24; uint32_t instanceShaderBindingTableRecordOffset : 24;
VkGeometryInstanceFlagsKHR flags : 8; VkGeometryInstanceFlagsKHR flags : 8;
uint64_t accelerationStructureReference = {}; uint64_t accelerationStructureReference = {};
}; };
VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR ) == sizeof( VkAccelerationStructureInstanceKHR ), VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR ) == sizeof( VkAccelerationStructureInstanceKHR ),
@ -2763,10 +2763,10 @@ namespace VULKAN_HPP_NAMESPACE
public: public:
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0 = {}; VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0 = {};
VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1 = {}; VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1 = {};
uint32_t instanceCustomIndex : 24; uint32_t instanceCustomIndex : 24;
uint32_t mask : 8; uint32_t mask : 8;
uint32_t instanceShaderBindingTableRecordOffset : 24; uint32_t instanceShaderBindingTableRecordOffset : 24;
VkGeometryInstanceFlagsKHR flags : 8; VkGeometryInstanceFlagsKHR flags : 8;
uint64_t accelerationStructureReference = {}; uint64_t accelerationStructureReference = {};
}; };
VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV ) == VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV ) ==
@ -3380,10 +3380,10 @@ namespace VULKAN_HPP_NAMESPACE
public: public:
VULKAN_HPP_NAMESPACE::SRTDataNV transformT0 = {}; VULKAN_HPP_NAMESPACE::SRTDataNV transformT0 = {};
VULKAN_HPP_NAMESPACE::SRTDataNV transformT1 = {}; VULKAN_HPP_NAMESPACE::SRTDataNV transformT1 = {};
uint32_t instanceCustomIndex : 24; uint32_t instanceCustomIndex : 24;
uint32_t mask : 8; uint32_t mask : 8;
uint32_t instanceShaderBindingTableRecordOffset : 24; uint32_t instanceShaderBindingTableRecordOffset : 24;
VkGeometryInstanceFlagsKHR flags : 8; VkGeometryInstanceFlagsKHR flags : 8;
uint64_t accelerationStructureReference = {}; uint64_t accelerationStructureReference = {};
}; };
VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV ) == sizeof( VkAccelerationStructureSRTMotionInstanceNV ), VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV ) == sizeof( VkAccelerationStructureSRTMotionInstanceNV ),