mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-29 07:01:08 +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 ) );
|
||||
if ( bitmask )
|
||||
{
|
||||
const size_t pos = result.find( "Bit" );
|
||||
const size_t pos = result.rfind( "Bit" );
|
||||
if ( pos != std::string::npos )
|
||||
{
|
||||
result.erase( pos, 3 );
|
||||
|
@ -6214,7 +6214,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
enum class VideoEncodeCapabilityFlagBitsKHR : VkVideoEncodeCapabilityFlagsKHR
|
||||
{
|
||||
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>;
|
||||
@ -6224,14 +6224,14 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true;
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeCapabilityFlagsKHR allFlags =
|
||||
VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes | VideoEncodeCapabilityFlagBitsKHR::eInsufficientstreamBufferRangeDetectionBit;
|
||||
VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes | VideoEncodeCapabilityFlagBitsKHR::eInsufficientBitstreamBufferRangeDetection;
|
||||
};
|
||||
|
||||
enum class VideoEncodeFeedbackFlagBitsKHR : VkVideoEncodeFeedbackFlagsKHR
|
||||
{
|
||||
estreamBufferOffsetBit = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR,
|
||||
estreamBytesWrittenBit = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR,
|
||||
estreamHasOverridesBit = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR
|
||||
eBitstreamBufferOffset = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR,
|
||||
eBitstreamBytesWritten = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR,
|
||||
eBitstreamHasOverrides = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR
|
||||
};
|
||||
|
||||
using VideoEncodeFeedbackFlagsKHR = Flags<VideoEncodeFeedbackFlagBitsKHR>;
|
||||
@ -6240,9 +6240,9 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
struct FlagTraits<VideoEncodeFeedbackFlagBitsKHR>
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true;
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeFeedbackFlagsKHR allFlags = VideoEncodeFeedbackFlagBitsKHR::estreamBufferOffsetBit |
|
||||
VideoEncodeFeedbackFlagBitsKHR::estreamBytesWrittenBit |
|
||||
VideoEncodeFeedbackFlagBitsKHR::estreamHasOverridesBit;
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeFeedbackFlagsKHR allFlags = VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset |
|
||||
VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten |
|
||||
VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides;
|
||||
};
|
||||
|
||||
enum class VideoEncodeUsageFlagBitsKHR : VkVideoEncodeUsageFlagsKHR
|
||||
|
@ -2915,8 +2915,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
std::string result;
|
||||
if ( value & VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes )
|
||||
result += "PrecedingExternallyEncodedBytes | ";
|
||||
if ( value & VideoEncodeCapabilityFlagBitsKHR::eInsufficientstreamBufferRangeDetectionBit )
|
||||
result += "InsufficientstreamBufferRangeDetectionBit | ";
|
||||
if ( value & VideoEncodeCapabilityFlagBitsKHR::eInsufficientBitstreamBufferRangeDetection )
|
||||
result += "InsufficientBitstreamBufferRangeDetection | ";
|
||||
|
||||
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
|
||||
}
|
||||
@ -2927,12 +2927,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
return "{}";
|
||||
|
||||
std::string result;
|
||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::estreamBufferOffsetBit )
|
||||
result += "streamBufferOffsetBit | ";
|
||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::estreamBytesWrittenBit )
|
||||
result += "streamBytesWrittenBit | ";
|
||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::estreamHasOverridesBit )
|
||||
result += "streamHasOverridesBit | ";
|
||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset )
|
||||
result += "BitstreamBufferOffset | ";
|
||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten )
|
||||
result += "BitstreamBytesWritten | ";
|
||||
if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides )
|
||||
result += "BitstreamHasOverrides | ";
|
||||
|
||||
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
|
||||
}
|
||||
@ -8247,7 +8247,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
switch ( value )
|
||||
{
|
||||
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 ) ) + " )";
|
||||
}
|
||||
}
|
||||
@ -8256,9 +8256,9 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
switch ( value )
|
||||
{
|
||||
case VideoEncodeFeedbackFlagBitsKHR::estreamBufferOffsetBit: return "streamBufferOffsetBit";
|
||||
case VideoEncodeFeedbackFlagBitsKHR::estreamBytesWrittenBit: return "streamBytesWrittenBit";
|
||||
case VideoEncodeFeedbackFlagBitsKHR::estreamHasOverridesBit: return "streamHasOverridesBit";
|
||||
case VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset: return "BitstreamBufferOffset";
|
||||
case VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten: return "BitstreamBytesWritten";
|
||||
case VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides: return "BitstreamHasOverrides";
|
||||
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user