Add operator~() on Flags<> and FlagBits

This commit is contained in:
Andreas Süßenbach 2016-10-25 16:31:18 +02:00
parent c8df19c07b
commit 8a5636c9eb
2 changed files with 534 additions and 17 deletions

View File

@ -62,6 +62,11 @@ const std::string exceptionHeader(
);
const std::string flagsHeader(
" template <typename FlagBitsType> struct FlagTraits\n"
" {\n"
" enum { allFlags = 0 };\n"
" };\n"
"\n"
" template <typename BitType, typename MaskType = VkFlags>\n"
" class Flags\n"
" {\n"
@ -131,6 +136,13 @@ const std::string flagsHeader(
" return !m_mask;\n"
" }\n"
"\n"
" Flags<BitType> operator~() const\n"
" {\n"
" Flags<BitType> result(*this);\n"
" result.m_mask ^= FlagTraits<BitType>::allFlags;\n"
" return result;\n"
" }\n"
"\n"
" bool operator==(Flags<BitType> const& rhs) const\n"
" {\n"
" return m_mask == rhs.m_mask;\n"
@ -309,20 +321,20 @@ std::string const versionCheckHeader = (
);
std::string const inlineHeader = {R"(
#if !defined(VULKAN_HPP_INLINE)
# if defined(__clang___)
# if __has_attribute(always_inline)
# define VULKAN_HPP_INLINE __attribute__((always_inline)) __inline__
# else
# define VULKAN_HPP_INLINE inline
# endif
# elif defined(__GNUC__)
# define VULKAN_HPP_INLINE __attribute__((always_inline)) __inline__
# elif defined(_MSC_VER)
# define VULKAN_HPP_INLINE __forceinline
# else
# define VULKAN_HPP_INLINE inline
# endif
#if !defined(VULKAN_HPP_INLINE)
# if defined(__clang___)
# if __has_attribute(always_inline)
# define VULKAN_HPP_INLINE __attribute__((always_inline)) __inline__
# else
# define VULKAN_HPP_INLINE inline
# endif
# elif defined(__GNUC__)
# define VULKAN_HPP_INLINE __attribute__((always_inline)) __inline__
# elif defined(_MSC_VER)
# define VULKAN_HPP_INLINE __forceinline
# else
# define VULKAN_HPP_INLINE inline
# endif
#endif
)"
@ -602,7 +614,7 @@ void writeTypeCommand(std::ofstream & ofs, VkData const& vkData, DependencyData
void writeTypeCommandEnhanced(std::ofstream & ofs, VkData const& vkData, std::string const& indentation, std::string const& className, std::string const& functionName, DependencyData const& dependencyData, CommandData const& commandData);
void writeTypeCommandStandard(std::ofstream & ofs, std::string const& indentation, std::string const& functionName, DependencyData const& dependencyData, CommandData const& commandData, std::set<std::string> const& vkTypes);
void writeTypeEnum(std::ofstream & ofs, DependencyData const& dependencyData, EnumData const& enumData);
void writeTypeFlags( std::ofstream & ofs, DependencyData const& dependencyData, FlagData const& flagData );
void writeTypeFlags(std::ofstream & ofs, DependencyData const& dependencyData, FlagData const& flagData, std::map<std::string, EnumData>::const_iterator enumData);
void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData const& dependencyData, HandleData const& handle, std::list<DependencyData> const& dependencies);
void writeTypeScalar( std::ofstream & ofs, DependencyData const& dependencyData );
void writeTypeStruct( std::ofstream & ofs, VkData const& vkData, DependencyData const& dependencyData, std::map<std::string,std::string> const& defaultValues );
@ -2650,7 +2662,7 @@ void writeEnumsToString(std::ofstream & ofs, VkData const& vkData)
}
}
void writeTypeFlags( std::ofstream & ofs, DependencyData const& dependencyData, FlagData const& flagData )
void writeTypeFlags(std::ofstream & ofs, DependencyData const& dependencyData, FlagData const& flagData, std::map<std::string, EnumData>::const_iterator enumData)
{
assert( dependencyData.dependencies.size() == 1 );
enterProtect(ofs, flagData.protect);
@ -2660,6 +2672,31 @@ void writeTypeFlags( std::ofstream & ofs, DependencyData const& dependencyData,
<< " {" << std::endl
<< " return " << dependencyData.name << "( bit0 ) | bit1;" << std::endl
<< " }" << std::endl;
if (!enumData->second.members.empty())
{
ofs << std::endl
<< " VULKAN_HPP_INLINE " << dependencyData.name << " operator~( " << *dependencyData.dependencies.begin() << " bits )" << std::endl
<< " {" << std::endl
<< " return ~( " << dependencyData.name << "( bits ) );" << std::endl
<< " }" << std::endl
<< std::endl
<< " template <> struct FlagTraits<" << *dependencyData.dependencies.begin() << ">" << std::endl
<< " {" << std::endl
<< " enum" << std::endl
<< " {" << std::endl
<< " allFlags = ";
for (size_t i = 0; i < enumData->second.members.size(); i++)
{
if (i != 0)
{
ofs << " | ";
}
ofs << "VkFlags(" << *dependencyData.dependencies.begin() << "::" << enumData->second.members[i].name << ")";
}
ofs << std::endl
<< " };" << std::endl
<< " };" << std::endl;
}
leaveProtect(ofs, flagData.protect);
ofs << std::endl;
}
@ -3007,7 +3044,7 @@ void writeTypes(std::ofstream & ofs, VkData const& vkData, std::map<std::string,
break;
case DependencyData::Category::FLAGS :
assert(vkData.flags.find(it->name) != vkData.flags.end());
writeTypeFlags( ofs, *it, vkData.flags.find( it->name)->second );
writeTypeFlags( ofs, *it, vkData.flags.find( it->name)->second, vkData.enums.find(generateEnumNameForFlags(it->name)) );
break;
case DependencyData::Category::FUNC_POINTER :
case DependencyData::Category::REQUIRED :

View File

@ -85,6 +85,11 @@ static_assert( VK_HEADER_VERSION == 31 , "Wrong VK_HEADER_VERSION!" );
namespace vk
{
template <typename FlagBitsType> struct FlagTraits
{
enum { allFlags = 0 };
};
template <typename BitType, typename MaskType = VkFlags>
class Flags
{
@ -154,6 +159,13 @@ namespace vk
return !m_mask;
}
Flags<BitType> operator~() const
{
Flags<BitType> result(*this);
result.m_mask ^= FlagTraits<BitType>::allFlags;
return result;
}
bool operator==(Flags<BitType> const& rhs) const
{
return m_mask == rhs.m_mask;
@ -4783,6 +4795,19 @@ namespace vk
return CullModeFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE CullModeFlags operator~( CullModeFlagBits bits )
{
return ~( CullModeFlags( bits ) );
}
template <> struct FlagTraits<CullModeFlagBits>
{
enum
{
allFlags = VkFlags(CullModeFlagBits::eNone) | VkFlags(CullModeFlagBits::eFront) | VkFlags(CullModeFlagBits::eBack) | VkFlags(CullModeFlagBits::eFrontAndBack)
};
};
enum class FrontFace
{
eCounterClockwise = VK_FRONT_FACE_COUNTER_CLOCKWISE,
@ -9183,6 +9208,19 @@ namespace vk
return QueueFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE QueueFlags operator~( QueueFlagBits bits )
{
return ~( QueueFlags( bits ) );
}
template <> struct FlagTraits<QueueFlagBits>
{
enum
{
allFlags = VkFlags(QueueFlagBits::eGraphics) | VkFlags(QueueFlagBits::eCompute) | VkFlags(QueueFlagBits::eTransfer) | VkFlags(QueueFlagBits::eSparseBinding)
};
};
struct QueueFamilyProperties
{
operator const VkQueueFamilyProperties&() const
@ -9226,6 +9264,19 @@ namespace vk
return MemoryPropertyFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE MemoryPropertyFlags operator~( MemoryPropertyFlagBits bits )
{
return ~( MemoryPropertyFlags( bits ) );
}
template <> struct FlagTraits<MemoryPropertyFlagBits>
{
enum
{
allFlags = VkFlags(MemoryPropertyFlagBits::eDeviceLocal) | VkFlags(MemoryPropertyFlagBits::eHostVisible) | VkFlags(MemoryPropertyFlagBits::eHostCoherent) | VkFlags(MemoryPropertyFlagBits::eHostCached) | VkFlags(MemoryPropertyFlagBits::eLazilyAllocated)
};
};
struct MemoryType
{
operator const VkMemoryType&() const
@ -9261,6 +9312,19 @@ namespace vk
return MemoryHeapFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE MemoryHeapFlags operator~( MemoryHeapFlagBits bits )
{
return ~( MemoryHeapFlags( bits ) );
}
template <> struct FlagTraits<MemoryHeapFlagBits>
{
enum
{
allFlags = VkFlags(MemoryHeapFlagBits::eDeviceLocal)
};
};
struct MemoryHeap
{
operator const VkMemoryHeap&() const
@ -9339,6 +9403,19 @@ namespace vk
return AccessFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE AccessFlags operator~( AccessFlagBits bits )
{
return ~( AccessFlags( bits ) );
}
template <> struct FlagTraits<AccessFlagBits>
{
enum
{
allFlags = VkFlags(AccessFlagBits::eIndirectCommandRead) | VkFlags(AccessFlagBits::eIndexRead) | VkFlags(AccessFlagBits::eVertexAttributeRead) | VkFlags(AccessFlagBits::eUniformRead) | VkFlags(AccessFlagBits::eInputAttachmentRead) | VkFlags(AccessFlagBits::eShaderRead) | VkFlags(AccessFlagBits::eShaderWrite) | VkFlags(AccessFlagBits::eColorAttachmentRead) | VkFlags(AccessFlagBits::eColorAttachmentWrite) | VkFlags(AccessFlagBits::eDepthStencilAttachmentRead) | VkFlags(AccessFlagBits::eDepthStencilAttachmentWrite) | VkFlags(AccessFlagBits::eTransferRead) | VkFlags(AccessFlagBits::eTransferWrite) | VkFlags(AccessFlagBits::eHostRead) | VkFlags(AccessFlagBits::eHostWrite) | VkFlags(AccessFlagBits::eMemoryRead) | VkFlags(AccessFlagBits::eMemoryWrite)
};
};
struct MemoryBarrier
{
MemoryBarrier( AccessFlags srcAccessMask_ = AccessFlags(), AccessFlags dstAccessMask_ = AccessFlags() )
@ -9550,6 +9627,19 @@ namespace vk
return BufferUsageFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE BufferUsageFlags operator~( BufferUsageFlagBits bits )
{
return ~( BufferUsageFlags( bits ) );
}
template <> struct FlagTraits<BufferUsageFlagBits>
{
enum
{
allFlags = VkFlags(BufferUsageFlagBits::eTransferSrc) | VkFlags(BufferUsageFlagBits::eTransferDst) | VkFlags(BufferUsageFlagBits::eUniformTexelBuffer) | VkFlags(BufferUsageFlagBits::eStorageTexelBuffer) | VkFlags(BufferUsageFlagBits::eUniformBuffer) | VkFlags(BufferUsageFlagBits::eStorageBuffer) | VkFlags(BufferUsageFlagBits::eIndexBuffer) | VkFlags(BufferUsageFlagBits::eVertexBuffer) | VkFlags(BufferUsageFlagBits::eIndirectBuffer)
};
};
enum class BufferCreateFlagBits
{
eSparseBinding = VK_BUFFER_CREATE_SPARSE_BINDING_BIT,
@ -9564,6 +9654,19 @@ namespace vk
return BufferCreateFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE BufferCreateFlags operator~( BufferCreateFlagBits bits )
{
return ~( BufferCreateFlags( bits ) );
}
template <> struct FlagTraits<BufferCreateFlagBits>
{
enum
{
allFlags = VkFlags(BufferCreateFlagBits::eSparseBinding) | VkFlags(BufferCreateFlagBits::eSparseResidency) | VkFlags(BufferCreateFlagBits::eSparseAliased)
};
};
struct BufferCreateInfo
{
BufferCreateInfo( BufferCreateFlags flags_ = BufferCreateFlags(), DeviceSize size_ = 0, BufferUsageFlags usage_ = BufferUsageFlags(), SharingMode sharingMode_ = SharingMode::eExclusive, uint32_t queueFamilyIndexCount_ = 0, const uint32_t* pQueueFamilyIndices_ = nullptr )
@ -9692,6 +9795,19 @@ namespace vk
return ShaderStageFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE ShaderStageFlags operator~( ShaderStageFlagBits bits )
{
return ~( ShaderStageFlags( bits ) );
}
template <> struct FlagTraits<ShaderStageFlagBits>
{
enum
{
allFlags = VkFlags(ShaderStageFlagBits::eVertex) | VkFlags(ShaderStageFlagBits::eTessellationControl) | VkFlags(ShaderStageFlagBits::eTessellationEvaluation) | VkFlags(ShaderStageFlagBits::eGeometry) | VkFlags(ShaderStageFlagBits::eFragment) | VkFlags(ShaderStageFlagBits::eCompute) | VkFlags(ShaderStageFlagBits::eAllGraphics) | VkFlags(ShaderStageFlagBits::eAll)
};
};
struct DescriptorSetLayoutBinding
{
DescriptorSetLayoutBinding( uint32_t binding_ = 0, DescriptorType descriptorType_ = DescriptorType::eSampler, uint32_t descriptorCount_ = 0, ShaderStageFlags stageFlags_ = ShaderStageFlags(), const Sampler* pImmutableSamplers_ = nullptr )
@ -10133,6 +10249,19 @@ namespace vk
return ImageUsageFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE ImageUsageFlags operator~( ImageUsageFlagBits bits )
{
return ~( ImageUsageFlags( bits ) );
}
template <> struct FlagTraits<ImageUsageFlagBits>
{
enum
{
allFlags = VkFlags(ImageUsageFlagBits::eTransferSrc) | VkFlags(ImageUsageFlagBits::eTransferDst) | VkFlags(ImageUsageFlagBits::eSampled) | VkFlags(ImageUsageFlagBits::eStorage) | VkFlags(ImageUsageFlagBits::eColorAttachment) | VkFlags(ImageUsageFlagBits::eDepthStencilAttachment) | VkFlags(ImageUsageFlagBits::eTransientAttachment) | VkFlags(ImageUsageFlagBits::eInputAttachment)
};
};
enum class ImageCreateFlagBits
{
eSparseBinding = VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
@ -10149,6 +10278,19 @@ namespace vk
return ImageCreateFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE ImageCreateFlags operator~( ImageCreateFlagBits bits )
{
return ~( ImageCreateFlags( bits ) );
}
template <> struct FlagTraits<ImageCreateFlagBits>
{
enum
{
allFlags = VkFlags(ImageCreateFlagBits::eSparseBinding) | VkFlags(ImageCreateFlagBits::eSparseResidency) | VkFlags(ImageCreateFlagBits::eSparseAliased) | VkFlags(ImageCreateFlagBits::eMutableFormat) | VkFlags(ImageCreateFlagBits::eCubeCompatible)
};
};
enum class PipelineCreateFlagBits
{
eDisableOptimization = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT,
@ -10163,6 +10305,19 @@ namespace vk
return PipelineCreateFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE PipelineCreateFlags operator~( PipelineCreateFlagBits bits )
{
return ~( PipelineCreateFlags( bits ) );
}
template <> struct FlagTraits<PipelineCreateFlagBits>
{
enum
{
allFlags = VkFlags(PipelineCreateFlagBits::eDisableOptimization) | VkFlags(PipelineCreateFlagBits::eAllowDerivatives) | VkFlags(PipelineCreateFlagBits::eDerivative)
};
};
struct ComputePipelineCreateInfo
{
ComputePipelineCreateInfo( PipelineCreateFlags flags_ = PipelineCreateFlags(), PipelineShaderStageCreateInfo stage_ = PipelineShaderStageCreateInfo(), PipelineLayout layout_ = PipelineLayout(), Pipeline basePipelineHandle_ = Pipeline(), int32_t basePipelineIndex_ = 0 )
@ -10278,6 +10433,19 @@ namespace vk
return ColorComponentFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE ColorComponentFlags operator~( ColorComponentFlagBits bits )
{
return ~( ColorComponentFlags( bits ) );
}
template <> struct FlagTraits<ColorComponentFlagBits>
{
enum
{
allFlags = VkFlags(ColorComponentFlagBits::eR) | VkFlags(ColorComponentFlagBits::eG) | VkFlags(ColorComponentFlagBits::eB) | VkFlags(ColorComponentFlagBits::eA)
};
};
struct PipelineColorBlendAttachmentState
{
PipelineColorBlendAttachmentState( Bool32 blendEnable_ = 0, BlendFactor srcColorBlendFactor_ = BlendFactor::eZero, BlendFactor dstColorBlendFactor_ = BlendFactor::eZero, BlendOp colorBlendOp_ = BlendOp::eAdd, BlendFactor srcAlphaBlendFactor_ = BlendFactor::eZero, BlendFactor dstAlphaBlendFactor_ = BlendFactor::eZero, BlendOp alphaBlendOp_ = BlendOp::eAdd, ColorComponentFlags colorWriteMask_ = ColorComponentFlags() )
@ -10505,6 +10673,19 @@ namespace vk
return FenceCreateFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE FenceCreateFlags operator~( FenceCreateFlagBits bits )
{
return ~( FenceCreateFlags( bits ) );
}
template <> struct FlagTraits<FenceCreateFlagBits>
{
enum
{
allFlags = VkFlags(FenceCreateFlagBits::eSignaled)
};
};
struct FenceCreateInfo
{
FenceCreateInfo( FenceCreateFlags flags_ = FenceCreateFlags() )
@ -10594,6 +10775,19 @@ namespace vk
return FormatFeatureFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE FormatFeatureFlags operator~( FormatFeatureFlagBits bits )
{
return ~( FormatFeatureFlags( bits ) );
}
template <> struct FlagTraits<FormatFeatureFlagBits>
{
enum
{
allFlags = VkFlags(FormatFeatureFlagBits::eSampledImage) | VkFlags(FormatFeatureFlagBits::eStorageImage) | VkFlags(FormatFeatureFlagBits::eStorageImageAtomic) | VkFlags(FormatFeatureFlagBits::eUniformTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBufferAtomic) | VkFlags(FormatFeatureFlagBits::eVertexBuffer) | VkFlags(FormatFeatureFlagBits::eColorAttachment) | VkFlags(FormatFeatureFlagBits::eColorAttachmentBlend) | VkFlags(FormatFeatureFlagBits::eDepthStencilAttachment) | VkFlags(FormatFeatureFlagBits::eBlitSrc) | VkFlags(FormatFeatureFlagBits::eBlitDst) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterLinear) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterCubicIMG)
};
};
struct FormatProperties
{
operator const VkFormatProperties&() const
@ -10631,6 +10825,19 @@ namespace vk
return QueryControlFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE QueryControlFlags operator~( QueryControlFlagBits bits )
{
return ~( QueryControlFlags( bits ) );
}
template <> struct FlagTraits<QueryControlFlagBits>
{
enum
{
allFlags = VkFlags(QueryControlFlagBits::ePrecise)
};
};
enum class QueryResultFlagBits
{
e64 = VK_QUERY_RESULT_64_BIT,
@ -10646,6 +10853,19 @@ namespace vk
return QueryResultFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE QueryResultFlags operator~( QueryResultFlagBits bits )
{
return ~( QueryResultFlags( bits ) );
}
template <> struct FlagTraits<QueryResultFlagBits>
{
enum
{
allFlags = VkFlags(QueryResultFlagBits::e64) | VkFlags(QueryResultFlagBits::eWait) | VkFlags(QueryResultFlagBits::eWithAvailability) | VkFlags(QueryResultFlagBits::ePartial)
};
};
enum class CommandBufferUsageFlagBits
{
eOneTimeSubmit = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
@ -10660,6 +10880,19 @@ namespace vk
return CommandBufferUsageFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE CommandBufferUsageFlags operator~( CommandBufferUsageFlagBits bits )
{
return ~( CommandBufferUsageFlags( bits ) );
}
template <> struct FlagTraits<CommandBufferUsageFlagBits>
{
enum
{
allFlags = VkFlags(CommandBufferUsageFlagBits::eOneTimeSubmit) | VkFlags(CommandBufferUsageFlagBits::eRenderPassContinue) | VkFlags(CommandBufferUsageFlagBits::eSimultaneousUse)
};
};
enum class QueryPipelineStatisticFlagBits
{
eInputAssemblyVertices = VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT,
@ -10682,6 +10915,19 @@ namespace vk
return QueryPipelineStatisticFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE QueryPipelineStatisticFlags operator~( QueryPipelineStatisticFlagBits bits )
{
return ~( QueryPipelineStatisticFlags( bits ) );
}
template <> struct FlagTraits<QueryPipelineStatisticFlagBits>
{
enum
{
allFlags = VkFlags(QueryPipelineStatisticFlagBits::eInputAssemblyVertices) | VkFlags(QueryPipelineStatisticFlagBits::eInputAssemblyPrimitives) | VkFlags(QueryPipelineStatisticFlagBits::eVertexShaderInvocations) | VkFlags(QueryPipelineStatisticFlagBits::eGeometryShaderInvocations) | VkFlags(QueryPipelineStatisticFlagBits::eGeometryShaderPrimitives) | VkFlags(QueryPipelineStatisticFlagBits::eClippingInvocations) | VkFlags(QueryPipelineStatisticFlagBits::eClippingPrimitives) | VkFlags(QueryPipelineStatisticFlagBits::eFragmentShaderInvocations) | VkFlags(QueryPipelineStatisticFlagBits::eTessellationControlShaderPatches) | VkFlags(QueryPipelineStatisticFlagBits::eTessellationEvaluationShaderInvocations) | VkFlags(QueryPipelineStatisticFlagBits::eComputeShaderInvocations)
};
};
struct CommandBufferInheritanceInfo
{
CommandBufferInheritanceInfo( RenderPass renderPass_ = RenderPass(), uint32_t subpass_ = 0, Framebuffer framebuffer_ = Framebuffer(), Bool32 occlusionQueryEnable_ = 0, QueryControlFlags queryFlags_ = QueryControlFlags(), QueryPipelineStatisticFlags pipelineStatistics_ = QueryPipelineStatisticFlags() )
@ -10970,6 +11216,19 @@ namespace vk
return ImageAspectFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE ImageAspectFlags operator~( ImageAspectFlagBits bits )
{
return ~( ImageAspectFlags( bits ) );
}
template <> struct FlagTraits<ImageAspectFlagBits>
{
enum
{
allFlags = VkFlags(ImageAspectFlagBits::eColor) | VkFlags(ImageAspectFlagBits::eDepth) | VkFlags(ImageAspectFlagBits::eStencil) | VkFlags(ImageAspectFlagBits::eMetadata)
};
};
struct ImageSubresource
{
ImageSubresource( ImageAspectFlags aspectMask_ = ImageAspectFlags(), uint32_t mipLevel_ = 0, uint32_t arrayLayer_ = 0 )
@ -11795,6 +12054,19 @@ namespace vk
return SparseImageFormatFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE SparseImageFormatFlags operator~( SparseImageFormatFlagBits bits )
{
return ~( SparseImageFormatFlags( bits ) );
}
template <> struct FlagTraits<SparseImageFormatFlagBits>
{
enum
{
allFlags = VkFlags(SparseImageFormatFlagBits::eSingleMiptail) | VkFlags(SparseImageFormatFlagBits::eAlignedMipSize) | VkFlags(SparseImageFormatFlagBits::eNonstandardBlockSize)
};
};
struct SparseImageFormatProperties
{
operator const VkSparseImageFormatProperties&() const
@ -11861,6 +12133,19 @@ namespace vk
return SparseMemoryBindFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE SparseMemoryBindFlags operator~( SparseMemoryBindFlagBits bits )
{
return ~( SparseMemoryBindFlags( bits ) );
}
template <> struct FlagTraits<SparseMemoryBindFlagBits>
{
enum
{
allFlags = VkFlags(SparseMemoryBindFlagBits::eMetadata)
};
};
struct SparseMemoryBind
{
SparseMemoryBind( DeviceSize resourceOffset_ = 0, DeviceSize size_ = 0, DeviceMemory memory_ = DeviceMemory(), DeviceSize memoryOffset_ = 0, SparseMemoryBindFlags flags_ = SparseMemoryBindFlags() )
@ -12384,6 +12669,19 @@ namespace vk
return PipelineStageFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE PipelineStageFlags operator~( PipelineStageFlagBits bits )
{
return ~( PipelineStageFlags( bits ) );
}
template <> struct FlagTraits<PipelineStageFlagBits>
{
enum
{
allFlags = VkFlags(PipelineStageFlagBits::eTopOfPipe) | VkFlags(PipelineStageFlagBits::eDrawIndirect) | VkFlags(PipelineStageFlagBits::eVertexInput) | VkFlags(PipelineStageFlagBits::eVertexShader) | VkFlags(PipelineStageFlagBits::eTessellationControlShader) | VkFlags(PipelineStageFlagBits::eTessellationEvaluationShader) | VkFlags(PipelineStageFlagBits::eGeometryShader) | VkFlags(PipelineStageFlagBits::eFragmentShader) | VkFlags(PipelineStageFlagBits::eEarlyFragmentTests) | VkFlags(PipelineStageFlagBits::eLateFragmentTests) | VkFlags(PipelineStageFlagBits::eColorAttachmentOutput) | VkFlags(PipelineStageFlagBits::eComputeShader) | VkFlags(PipelineStageFlagBits::eTransfer) | VkFlags(PipelineStageFlagBits::eBottomOfPipe) | VkFlags(PipelineStageFlagBits::eHost) | VkFlags(PipelineStageFlagBits::eAllGraphics) | VkFlags(PipelineStageFlagBits::eAllCommands)
};
};
enum class CommandPoolCreateFlagBits
{
eTransient = VK_COMMAND_POOL_CREATE_TRANSIENT_BIT,
@ -12397,6 +12695,19 @@ namespace vk
return CommandPoolCreateFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE CommandPoolCreateFlags operator~( CommandPoolCreateFlagBits bits )
{
return ~( CommandPoolCreateFlags( bits ) );
}
template <> struct FlagTraits<CommandPoolCreateFlagBits>
{
enum
{
allFlags = VkFlags(CommandPoolCreateFlagBits::eTransient) | VkFlags(CommandPoolCreateFlagBits::eResetCommandBuffer)
};
};
struct CommandPoolCreateInfo
{
CommandPoolCreateInfo( CommandPoolCreateFlags flags_ = CommandPoolCreateFlags(), uint32_t queueFamilyIndex_ = 0 )
@ -12482,6 +12793,19 @@ namespace vk
return CommandPoolResetFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE CommandPoolResetFlags operator~( CommandPoolResetFlagBits bits )
{
return ~( CommandPoolResetFlags( bits ) );
}
template <> struct FlagTraits<CommandPoolResetFlagBits>
{
enum
{
allFlags = VkFlags(CommandPoolResetFlagBits::eReleaseResources)
};
};
enum class CommandBufferResetFlagBits
{
eReleaseResources = VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
@ -12494,6 +12818,19 @@ namespace vk
return CommandBufferResetFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE CommandBufferResetFlags operator~( CommandBufferResetFlagBits bits )
{
return ~( CommandBufferResetFlags( bits ) );
}
template <> struct FlagTraits<CommandBufferResetFlagBits>
{
enum
{
allFlags = VkFlags(CommandBufferResetFlagBits::eReleaseResources)
};
};
enum class SampleCountFlagBits
{
e1 = VK_SAMPLE_COUNT_1_BIT,
@ -12512,6 +12849,19 @@ namespace vk
return SampleCountFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE SampleCountFlags operator~( SampleCountFlagBits bits )
{
return ~( SampleCountFlags( bits ) );
}
template <> struct FlagTraits<SampleCountFlagBits>
{
enum
{
allFlags = VkFlags(SampleCountFlagBits::e1) | VkFlags(SampleCountFlagBits::e2) | VkFlags(SampleCountFlagBits::e4) | VkFlags(SampleCountFlagBits::e8) | VkFlags(SampleCountFlagBits::e16) | VkFlags(SampleCountFlagBits::e32) | VkFlags(SampleCountFlagBits::e64)
};
};
struct ImageFormatProperties
{
operator const VkImageFormatProperties&() const
@ -13319,6 +13669,19 @@ namespace vk
return AttachmentDescriptionFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE AttachmentDescriptionFlags operator~( AttachmentDescriptionFlagBits bits )
{
return ~( AttachmentDescriptionFlags( bits ) );
}
template <> struct FlagTraits<AttachmentDescriptionFlagBits>
{
enum
{
allFlags = VkFlags(AttachmentDescriptionFlagBits::eMayAlias)
};
};
struct AttachmentDescription
{
AttachmentDescription( AttachmentDescriptionFlags flags_ = AttachmentDescriptionFlags(), Format format_ = Format::eUndefined, SampleCountFlagBits samples_ = SampleCountFlagBits::e1, AttachmentLoadOp loadOp_ = AttachmentLoadOp::eLoad, AttachmentStoreOp storeOp_ = AttachmentStoreOp::eStore, AttachmentLoadOp stencilLoadOp_ = AttachmentLoadOp::eLoad, AttachmentStoreOp stencilStoreOp_ = AttachmentStoreOp::eStore, ImageLayout initialLayout_ = ImageLayout::eUndefined, ImageLayout finalLayout_ = ImageLayout::eUndefined )
@ -13448,6 +13811,19 @@ namespace vk
return StencilFaceFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE StencilFaceFlags operator~( StencilFaceFlagBits bits )
{
return ~( StencilFaceFlags( bits ) );
}
template <> struct FlagTraits<StencilFaceFlagBits>
{
enum
{
allFlags = VkFlags(StencilFaceFlagBits::eFront) | VkFlags(StencilFaceFlagBits::eBack) | VkFlags(StencilFaceFlagBits::eVkStencilFrontAndBack)
};
};
enum class DescriptorPoolCreateFlagBits
{
eFreeDescriptorSet = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
@ -13460,6 +13836,19 @@ namespace vk
return DescriptorPoolCreateFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE DescriptorPoolCreateFlags operator~( DescriptorPoolCreateFlagBits bits )
{
return ~( DescriptorPoolCreateFlags( bits ) );
}
template <> struct FlagTraits<DescriptorPoolCreateFlagBits>
{
enum
{
allFlags = VkFlags(DescriptorPoolCreateFlagBits::eFreeDescriptorSet)
};
};
struct DescriptorPoolCreateInfo
{
DescriptorPoolCreateInfo( DescriptorPoolCreateFlags flags_ = DescriptorPoolCreateFlags(), uint32_t maxSets_ = 0, uint32_t poolSizeCount_ = 0, const DescriptorPoolSize* pPoolSizes_ = nullptr )
@ -13563,6 +13952,19 @@ namespace vk
return DependencyFlags( bit0 ) | bit1;
}
VULKAN_HPP_INLINE DependencyFlags operator~( DependencyFlagBits bits )
{
return ~( DependencyFlags( bits ) );
}
template <> struct FlagTraits<DependencyFlagBits>
{
enum
{
allFlags = VkFlags(DependencyFlagBits::eByRegion)
};
};
class CommandBuffer
{
public:
@ -14816,6 +15218,19 @@ namespace vk
return DisplayPlaneAlphaFlagsKHR( bit0 ) | bit1;
}
VULKAN_HPP_INLINE DisplayPlaneAlphaFlagsKHR operator~( DisplayPlaneAlphaFlagBitsKHR bits )
{
return ~( DisplayPlaneAlphaFlagsKHR( bits ) );
}
template <> struct FlagTraits<DisplayPlaneAlphaFlagBitsKHR>
{
enum
{
allFlags = VkFlags(DisplayPlaneAlphaFlagBitsKHR::eOpaque) | VkFlags(DisplayPlaneAlphaFlagBitsKHR::eGlobal) | VkFlags(DisplayPlaneAlphaFlagBitsKHR::ePerPixel) | VkFlags(DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied)
};
};
struct DisplayPlaneCapabilitiesKHR
{
operator const VkDisplayPlaneCapabilitiesKHR&() const
@ -14868,6 +15283,19 @@ namespace vk
return CompositeAlphaFlagsKHR( bit0 ) | bit1;
}
VULKAN_HPP_INLINE CompositeAlphaFlagsKHR operator~( CompositeAlphaFlagBitsKHR bits )
{
return ~( CompositeAlphaFlagsKHR( bits ) );
}
template <> struct FlagTraits<CompositeAlphaFlagBitsKHR>
{
enum
{
allFlags = VkFlags(CompositeAlphaFlagBitsKHR::eOpaque) | VkFlags(CompositeAlphaFlagBitsKHR::ePreMultiplied) | VkFlags(CompositeAlphaFlagBitsKHR::ePostMultiplied) | VkFlags(CompositeAlphaFlagBitsKHR::eInherit)
};
};
enum class SurfaceTransformFlagBitsKHR
{
eIdentity = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR,
@ -14888,6 +15316,19 @@ namespace vk
return SurfaceTransformFlagsKHR( bit0 ) | bit1;
}
VULKAN_HPP_INLINE SurfaceTransformFlagsKHR operator~( SurfaceTransformFlagBitsKHR bits )
{
return ~( SurfaceTransformFlagsKHR( bits ) );
}
template <> struct FlagTraits<SurfaceTransformFlagBitsKHR>
{
enum
{
allFlags = VkFlags(SurfaceTransformFlagBitsKHR::eIdentity) | VkFlags(SurfaceTransformFlagBitsKHR::eRotate90) | VkFlags(SurfaceTransformFlagBitsKHR::eRotate180) | VkFlags(SurfaceTransformFlagBitsKHR::eRotate270) | VkFlags(SurfaceTransformFlagBitsKHR::eHorizontalMirror) | VkFlags(SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate90) | VkFlags(SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate180) | VkFlags(SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate270) | VkFlags(SurfaceTransformFlagBitsKHR::eInherit)
};
};
struct DisplayPropertiesKHR
{
operator const VkDisplayPropertiesKHR&() const
@ -15302,6 +15743,19 @@ namespace vk
return DebugReportFlagsEXT( bit0 ) | bit1;
}
VULKAN_HPP_INLINE DebugReportFlagsEXT operator~( DebugReportFlagBitsEXT bits )
{
return ~( DebugReportFlagsEXT( bits ) );
}
template <> struct FlagTraits<DebugReportFlagBitsEXT>
{
enum
{
allFlags = VkFlags(DebugReportFlagBitsEXT::eInformation) | VkFlags(DebugReportFlagBitsEXT::eWarning) | VkFlags(DebugReportFlagBitsEXT::ePerformanceWarning) | VkFlags(DebugReportFlagBitsEXT::eError) | VkFlags(DebugReportFlagBitsEXT::eDebug)
};
};
struct DebugReportCallbackCreateInfoEXT
{
DebugReportCallbackCreateInfoEXT( DebugReportFlagsEXT flags_ = DebugReportFlagsEXT(), PFN_vkDebugReportCallbackEXT pfnCallback_ = nullptr, void* pUserData_ = nullptr )
@ -15690,6 +16144,19 @@ namespace vk
return ExternalMemoryHandleTypeFlagsNV( bit0 ) | bit1;
}
VULKAN_HPP_INLINE ExternalMemoryHandleTypeFlagsNV operator~( ExternalMemoryHandleTypeFlagBitsNV bits )
{
return ~( ExternalMemoryHandleTypeFlagsNV( bits ) );
}
template <> struct FlagTraits<ExternalMemoryHandleTypeFlagBitsNV>
{
enum
{
allFlags = VkFlags(ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32) | VkFlags(ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt) | VkFlags(ExternalMemoryHandleTypeFlagBitsNV::eD3D11Image) | VkFlags(ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt)
};
};
class Device
{
public:
@ -17087,6 +17554,19 @@ namespace vk
return ExternalMemoryFeatureFlagsNV( bit0 ) | bit1;
}
VULKAN_HPP_INLINE ExternalMemoryFeatureFlagsNV operator~( ExternalMemoryFeatureFlagBitsNV bits )
{
return ~( ExternalMemoryFeatureFlagsNV( bits ) );
}
template <> struct FlagTraits<ExternalMemoryFeatureFlagBitsNV>
{
enum
{
allFlags = VkFlags(ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly) | VkFlags(ExternalMemoryFeatureFlagBitsNV::eExportable) | VkFlags(ExternalMemoryFeatureFlagBitsNV::eImportable)
};
};
struct ExternalImageFormatPropertiesNV
{
ExternalImageFormatPropertiesNV( ImageFormatProperties imageFormatProperties_ = ImageFormatProperties(), ExternalMemoryFeatureFlagsNV externalMemoryFeatures_ = ExternalMemoryFeatureFlagsNV(), ExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes_ = ExternalMemoryHandleTypeFlagsNV(), ExternalMemoryHandleTypeFlagsNV compatibleHandleTypes_ = ExternalMemoryHandleTypeFlagsNV() )