Merge pull request #974 from asuessenbach/video

Correct enum values for some video decode enums.
This commit is contained in:
Andreas Süßenbach 2021-05-31 09:08:34 +02:00 committed by GitHub
commit f400280736
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 64 deletions

View File

@ -632,7 +632,7 @@ std::string toUpperCase( std::string const & name )
bool previousIsDigit = false;
for ( auto c : name )
{
if ( ( isupper( c ) && ( previousIsLowerCase || previousIsDigit ) ) || ( isdigit( c ) && !previousIsDigit ) )
if ( ( isupper( c ) && ( previousIsLowerCase || previousIsDigit ) ) || ( isdigit( c ) && previousIsLowerCase ) )
{
convertedName.push_back( '_' );
}
@ -12731,20 +12731,19 @@ void VulkanHppGenerator::readEnum( tinyxml2::XMLElement const * el
if ( attribute.first == "bitpos" )
{
bitpos = attribute.second;
check( !bitpos.empty(), line, "enum with empty bitpos" );
}
else if ( attribute.first == "name" )
{
name = attribute.second;
check( !name.empty(), line, "enum with empty name" );
}
else if ( attribute.first == "value" )
{
value = attribute.second;
check( !value.empty(), line, "enum with empty value" );
}
}
assert( !name.empty() );
warn( beginsWith( name, prefix ),
line,
"encountered enum value <" + name + "> that does not begin with expected prefix <" + prefix + ">" );
std::string tag = findTag( m_tags, name, postfix );

View File

@ -11214,59 +11214,52 @@ namespace VULKAN_HPP_NAMESPACE
enum class VideoEncodeH264InputModeFlagBitsEXT : VkVideoEncodeH264InputModeFlagsEXT
{
eVkVideoEncodeH264InputModeFrame = VK_VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT,
eVkVideoEncodeH264InputModeSlice = VK_VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT,
eVkVideoEncodeH264InputModeNonVcl = VK_VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT
eFrame = VK_VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT,
eSlice = VK_VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT,
eNonVcl = VK_VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT
};
VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264InputModeFlagBitsEXT value )
{
switch ( value )
{
case VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeFrame:
return "VkVideoEncodeH264InputModeFrame";
case VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeSlice:
return "VkVideoEncodeH264InputModeSlice";
case VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeNonVcl:
return "VkVideoEncodeH264InputModeNonVcl";
case VideoEncodeH264InputModeFlagBitsEXT::eFrame: return "Frame";
case VideoEncodeH264InputModeFlagBitsEXT::eSlice: return "Slice";
case VideoEncodeH264InputModeFlagBitsEXT::eNonVcl: return "NonVcl";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
enum class VideoEncodeH264OutputModeFlagBitsEXT : VkVideoEncodeH264OutputModeFlagsEXT
{
eVkVideoEncodeH264OutputModeFrame = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT,
eVkVideoEncodeH264OutputModeSlice = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT,
eVkVideoEncodeH264OutputModeNonVcl = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT
eFrame = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT,
eSlice = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT,
eNonVcl = VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT
};
VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264OutputModeFlagBitsEXT value )
{
switch ( value )
{
case VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeFrame:
return "VkVideoEncodeH264OutputModeFrame";
case VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeSlice:
return "VkVideoEncodeH264OutputModeSlice";
case VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeNonVcl:
return "VkVideoEncodeH264OutputModeNonVcl";
case VideoEncodeH264OutputModeFlagBitsEXT::eFrame: return "Frame";
case VideoEncodeH264OutputModeFlagBitsEXT::eSlice: return "Slice";
case VideoEncodeH264OutputModeFlagBitsEXT::eNonVcl: return "NonVcl";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
enum class VideoEncodeH264CreateFlagBitsEXT : VkVideoEncodeH264CreateFlagsEXT
{
eVkVideoEncodeH264CreateDefault = VK_VIDEO_ENCODE_H264_CREATE_DEFAULT_EXT,
eVkVideoEncodeH264CreateReserved0 = VK_VIDEO_ENCODE_H264_CREATE_RESERVED_0_BIT_EXT
eDefault = VK_VIDEO_ENCODE_H264_CREATE_DEFAULT_EXT,
eReserved0 = VK_VIDEO_ENCODE_H264_CREATE_RESERVED_0_BIT_EXT
};
VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CreateFlagBitsEXT value )
{
switch ( value )
{
case VideoEncodeH264CreateFlagBitsEXT::eVkVideoEncodeH264CreateDefault: return "VkVideoEncodeH264CreateDefault";
case VideoEncodeH264CreateFlagBitsEXT::eVkVideoEncodeH264CreateReserved0:
return "VkVideoEncodeH264CreateReserved0";
case VideoEncodeH264CreateFlagBitsEXT::eDefault: return "Default";
case VideoEncodeH264CreateFlagBitsEXT::eReserved0: return "Reserved0";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@ -11277,10 +11270,9 @@ namespace VULKAN_HPP_NAMESPACE
enum class VideoDecodeH264FieldLayoutFlagBitsEXT : VkVideoDecodeH264FieldLayoutFlagsEXT
{
eVkVideoDecodeH264ProgressivePicturesOnly = VK_VIDEO_DECODE_H264_PROGRESSIVE_PICTURES_ONLY_EXT,
eVkVideoDecodeH264FieldLayoutLineInterlacedPlane = VK_VIDEO_DECODE_H264_FIELD_LAYOUT_LINE_INTERLACED_PLANE_BIT_EXT,
eVkVideoDecodeH264FieldLayoutSeparateInterlacedPlane =
VK_VIDEO_DECODE_H264_FIELD_LAYOUT_SEPARATE_INTERLACED_PLANE_BIT_EXT
eVkVideoDecodeH264ProgressivePicturesOnly = VK_VIDEO_DECODE_H264_PROGRESSIVE_PICTURES_ONLY_EXT,
eLineInterlacedPlane = VK_VIDEO_DECODE_H264_FIELD_LAYOUT_LINE_INTERLACED_PLANE_BIT_EXT,
eSeparateInterlacedPlane = VK_VIDEO_DECODE_H264_FIELD_LAYOUT_SEPARATE_INTERLACED_PLANE_BIT_EXT
};
VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264FieldLayoutFlagBitsEXT value )
@ -11289,10 +11281,8 @@ namespace VULKAN_HPP_NAMESPACE
{
case VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264ProgressivePicturesOnly:
return "VkVideoDecodeH264ProgressivePicturesOnly";
case VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264FieldLayoutLineInterlacedPlane:
return "VkVideoDecodeH264FieldLayoutLineInterlacedPlane";
case VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264FieldLayoutSeparateInterlacedPlane:
return "VkVideoDecodeH264FieldLayoutSeparateInterlacedPlane";
case VideoDecodeH264FieldLayoutFlagBitsEXT::eLineInterlacedPlane: return "LineInterlacedPlane";
case VideoDecodeH264FieldLayoutFlagBitsEXT::eSeparateInterlacedPlane: return "SeparateInterlacedPlane";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@ -17577,9 +17567,9 @@ namespace VULKAN_HPP_NAMESPACE
{
enum : VkFlags
{
allFlags = VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeFrame ) |
VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeSlice ) |
VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeNonVcl )
allFlags = VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eFrame ) |
VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eSlice ) |
VkFlags( VideoEncodeH264InputModeFlagBitsEXT::eNonVcl )
};
};
@ -17613,12 +17603,12 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
std::string result;
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeFrame )
result += "VkVideoEncodeH264InputModeFrame | ";
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeSlice )
result += "VkVideoEncodeH264InputModeSlice | ";
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eVkVideoEncodeH264InputModeNonVcl )
result += "VkVideoEncodeH264InputModeNonVcl | ";
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eFrame )
result += "Frame | ";
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eSlice )
result += "Slice | ";
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eNonVcl )
result += "NonVcl | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@ -17629,9 +17619,9 @@ namespace VULKAN_HPP_NAMESPACE
{
enum : VkFlags
{
allFlags = VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeFrame ) |
VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeSlice ) |
VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeNonVcl )
allFlags = VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eFrame ) |
VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eSlice ) |
VkFlags( VideoEncodeH264OutputModeFlagBitsEXT::eNonVcl )
};
};
@ -17665,12 +17655,12 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
std::string result;
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeFrame )
result += "VkVideoEncodeH264OutputModeFrame | ";
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeSlice )
result += "VkVideoEncodeH264OutputModeSlice | ";
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eVkVideoEncodeH264OutputModeNonVcl )
result += "VkVideoEncodeH264OutputModeNonVcl | ";
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eFrame )
result += "Frame | ";
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eSlice )
result += "Slice | ";
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eNonVcl )
result += "NonVcl | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@ -17681,8 +17671,8 @@ namespace VULKAN_HPP_NAMESPACE
{
enum : VkFlags
{
allFlags = VkFlags( VideoEncodeH264CreateFlagBitsEXT::eVkVideoEncodeH264CreateDefault ) |
VkFlags( VideoEncodeH264CreateFlagBitsEXT::eVkVideoEncodeH264CreateReserved0 )
allFlags =
VkFlags( VideoEncodeH264CreateFlagBitsEXT::eDefault ) | VkFlags( VideoEncodeH264CreateFlagBitsEXT::eReserved0 )
};
};
@ -17716,8 +17706,8 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
std::string result;
if ( value & VideoEncodeH264CreateFlagBitsEXT::eVkVideoEncodeH264CreateReserved0 )
result += "VkVideoEncodeH264CreateReserved0 | ";
if ( value & VideoEncodeH264CreateFlagBitsEXT::eReserved0 )
result += "Reserved0 | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@ -17733,8 +17723,8 @@ namespace VULKAN_HPP_NAMESPACE
enum : VkFlags
{
allFlags = VkFlags( VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264ProgressivePicturesOnly ) |
VkFlags( VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264FieldLayoutLineInterlacedPlane ) |
VkFlags( VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264FieldLayoutSeparateInterlacedPlane )
VkFlags( VideoDecodeH264FieldLayoutFlagBitsEXT::eLineInterlacedPlane ) |
VkFlags( VideoDecodeH264FieldLayoutFlagBitsEXT::eSeparateInterlacedPlane )
};
};
@ -17768,10 +17758,10 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
std::string result;
if ( value & VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264FieldLayoutLineInterlacedPlane )
result += "VkVideoDecodeH264FieldLayoutLineInterlacedPlane | ";
if ( value & VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264FieldLayoutSeparateInterlacedPlane )
result += "VkVideoDecodeH264FieldLayoutSeparateInterlacedPlane | ";
if ( value & VideoDecodeH264FieldLayoutFlagBitsEXT::eLineInterlacedPlane )
result += "LineInterlacedPlane | ";
if ( value & VideoDecodeH264FieldLayoutFlagBitsEXT::eSeparateInterlacedPlane )
result += "SeparateInterlacedPlane | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}