mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-25 13:30:04 +00:00
Fix name of enum values with more than one "BIT" in its name (#1848)
This commit is contained in:
parent
4bf2835dd1
commit
0eafe7e55a
@ -6899,7 +6899,7 @@ std::string VulkanHppGenerator::generateEnumValueName( std::string const & enumN
|
|||||||
std::string result = "e" + toCamelCase( stripPostfix( stripPrefix( valueName, prefix ), postfix ) );
|
std::string result = "e" + toCamelCase( stripPostfix( stripPrefix( valueName, prefix ), postfix ) );
|
||||||
if ( bitmask )
|
if ( bitmask )
|
||||||
{
|
{
|
||||||
const size_t pos = result.find( "Bit" );
|
const size_t pos = result.rfind( "Bit" );
|
||||||
if ( pos != std::string::npos )
|
if ( pos != std::string::npos )
|
||||||
{
|
{
|
||||||
result.erase( pos, 3 );
|
result.erase( pos, 3 );
|
||||||
|
@ -6214,7 +6214,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
enum class VideoEncodeCapabilityFlagBitsKHR : VkVideoEncodeCapabilityFlagsKHR
|
enum class VideoEncodeCapabilityFlagBitsKHR : VkVideoEncodeCapabilityFlagsKHR
|
||||||
{
|
{
|
||||||
ePrecedingExternallyEncodedBytes = VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR,
|
ePrecedingExternallyEncodedBytes = VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR,
|
||||||
eInsufficientstreamBufferRangeDetectionBit = VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR
|
eInsufficientBitstreamBufferRangeDetection = VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR
|
||||||
};
|
};
|
||||||
|
|
||||||
using VideoEncodeCapabilityFlagsKHR = Flags<VideoEncodeCapabilityFlagBitsKHR>;
|
using VideoEncodeCapabilityFlagsKHR = Flags<VideoEncodeCapabilityFlagBitsKHR>;
|
||||||
@ -6224,14 +6224,14 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
{
|
{
|
||||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true;
|
static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true;
|
||||||
static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeCapabilityFlagsKHR allFlags =
|
static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeCapabilityFlagsKHR allFlags =
|
||||||
VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes | VideoEncodeCapabilityFlagBitsKHR::eInsufficientstreamBufferRangeDetectionBit;
|
VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes | VideoEncodeCapabilityFlagBitsKHR::eInsufficientBitstreamBufferRangeDetection;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class VideoEncodeFeedbackFlagBitsKHR : VkVideoEncodeFeedbackFlagsKHR
|
enum class VideoEncodeFeedbackFlagBitsKHR : VkVideoEncodeFeedbackFlagsKHR
|
||||||
{
|
{
|
||||||
estreamBufferOffsetBit = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR,
|
eBitstreamBufferOffset = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR,
|
||||||
estreamBytesWrittenBit = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR,
|
eBitstreamBytesWritten = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR,
|
||||||
estreamHasOverridesBit = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR
|
eBitstreamHasOverrides = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR
|
||||||
};
|
};
|
||||||
|
|
||||||
using VideoEncodeFeedbackFlagsKHR = Flags<VideoEncodeFeedbackFlagBitsKHR>;
|
using VideoEncodeFeedbackFlagsKHR = Flags<VideoEncodeFeedbackFlagBitsKHR>;
|
||||||
@ -6240,9 +6240,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
struct FlagTraits<VideoEncodeFeedbackFlagBitsKHR>
|
struct FlagTraits<VideoEncodeFeedbackFlagBitsKHR>
|
||||||
{
|
{
|
||||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true;
|
static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true;
|
||||||
static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeFeedbackFlagsKHR allFlags = VideoEncodeFeedbackFlagBitsKHR::estreamBufferOffsetBit |
|
static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeFeedbackFlagsKHR allFlags = VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset |
|
||||||
VideoEncodeFeedbackFlagBitsKHR::estreamBytesWrittenBit |
|
VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten |
|
||||||
VideoEncodeFeedbackFlagBitsKHR::estreamHasOverridesBit;
|
VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class VideoEncodeUsageFlagBitsKHR : VkVideoEncodeUsageFlagsKHR
|
enum class VideoEncodeUsageFlagBitsKHR : VkVideoEncodeUsageFlagsKHR
|
||||||
|
@ -2915,8 +2915,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
std::string result;
|
std::string result;
|
||||||
if ( value & VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes )
|
if ( value & VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes )
|
||||||
result += "PrecedingExternallyEncodedBytes | ";
|
result += "PrecedingExternallyEncodedBytes | ";
|
||||||
if ( value & VideoEncodeCapabilityFlagBitsKHR::eInsufficientstreamBufferRangeDetectionBit )
|
if ( value & VideoEncodeCapabilityFlagBitsKHR::eInsufficientBitstreamBufferRangeDetection )
|
||||||
result += "InsufficientstreamBufferRangeDetectionBit | ";
|
result += "InsufficientBitstreamBufferRangeDetection | ";
|
||||||
|
|
||||||
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
|
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
|
||||||
}
|
}
|
||||||
@ -2927,12 +2927,12 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return "{}";
|
return "{}";
|
||||||
|
|
||||||
std::string result;
|
std::string result;
|
||||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::estreamBufferOffsetBit )
|
if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset )
|
||||||
result += "streamBufferOffsetBit | ";
|
result += "BitstreamBufferOffset | ";
|
||||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::estreamBytesWrittenBit )
|
if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten )
|
||||||
result += "streamBytesWrittenBit | ";
|
result += "BitstreamBytesWritten | ";
|
||||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::estreamHasOverridesBit )
|
if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides )
|
||||||
result += "streamHasOverridesBit | ";
|
result += "BitstreamHasOverrides | ";
|
||||||
|
|
||||||
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
|
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
|
||||||
}
|
}
|
||||||
@ -8247,7 +8247,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
switch ( value )
|
switch ( value )
|
||||||
{
|
{
|
||||||
case VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes: return "PrecedingExternallyEncodedBytes";
|
case VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes: return "PrecedingExternallyEncodedBytes";
|
||||||
case VideoEncodeCapabilityFlagBitsKHR::eInsufficientstreamBufferRangeDetectionBit: return "InsufficientstreamBufferRangeDetectionBit";
|
case VideoEncodeCapabilityFlagBitsKHR::eInsufficientBitstreamBufferRangeDetection: return "InsufficientBitstreamBufferRangeDetection";
|
||||||
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
|
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8256,9 +8256,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
{
|
{
|
||||||
switch ( value )
|
switch ( value )
|
||||||
{
|
{
|
||||||
case VideoEncodeFeedbackFlagBitsKHR::estreamBufferOffsetBit: return "streamBufferOffsetBit";
|
case VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset: return "BitstreamBufferOffset";
|
||||||
case VideoEncodeFeedbackFlagBitsKHR::estreamBytesWrittenBit: return "streamBytesWrittenBit";
|
case VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten: return "BitstreamBytesWritten";
|
||||||
case VideoEncodeFeedbackFlagBitsKHR::estreamHasOverridesBit: return "streamHasOverridesBit";
|
case VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides: return "BitstreamHasOverrides";
|
||||||
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
|
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user