VkFlags(3)

# VkFlags(3) Manual Page

## Name

VkFlags - Vulkan bitmasks

Loading… please wait.

## C Specification

A collection of flags is represented by a bitmask using the type VkFlags:

    // Provided by VK_VERSION_1_0
    typedef uint32_t VkFlags;

## Description

Bitmasks are passed to many commands and structures to compactly represent options, but VkFlags is not used directly in the API. Instead, a `Vk*Flags` type which is an alias of VkFlags, and whose name matches the corresponding `Vk*FlagBits` that are valid for that type, is used.

Any `Vk*Flags` member or parameter used in the API as an input must be a valid combination of bit flags. A valid combination is either zero or the bitwise OR of valid bit flags.

An individual bit flag is valid for a `Vk*Flags` type if it would be a valid enumerant when used with the equivalent `Vk*FlagBits` type, where the bits type is obtained by taking the flag type and replacing the trailing `Flags` with `FlagBits`. For example, a flag value of type VkColorComponentFlags must contain only bit flags defined by VkColorComponentFlagBits.

Any `Vk*Flags` member or parameter returned from a query command or otherwise output from Vulkan to the application may contain bit flags undefined in its corresponding `Vk*FlagBits` type. An application cannot rely on the state of these unspecified bits.

Only the low-order 31 bits (bit positions zero through 30) are available for use as flag bits.

Note | This restriction is due to poorly defined behavior by C compilers given a C enumerant value of `0x80000000`. In some cases adding this enumerant value may increase the size of the underlying `Vk*FlagBits` type, breaking the ABI.

## See Also

VK_VERSION_1_0, VkAccelerationStructureCreateFlagsKHR, VkAccelerationStructureMotionInfoFlagsNV, VkAccelerationStructureMotionInstanceFlagsNV, VkAccessFlags, VkAcquireProfilingLockFlagsKHR, VkAndroidSurfaceCreateFlagsKHR, VkAttachmentDescriptionFlags, VkBufferCreateFlags, VkBufferUsageFlags, VkBufferViewCreateFlags, VkBuildAccelerationStructureFlagsKHR, VkBuildMicromapFlagsEXT, VkClusterAccelerationStructureAddressResolutionFlagsNV, VkClusterAccelerationStructureClusterFlagsNV, VkClusterAccelerationStructureGeometryFlagsNV, VkClusterAccelerationStructureIndexFormatFlagsNV, VkColorComponentFlags, VkCommandBufferResetFlags, VkCommandBufferUsageFlags, VkCommandPoolCreateFlags, VkCommandPoolResetFlags, VkCommandPoolTrimFlags, VkCompositeAlphaFlagsKHR, VkConditionalRenderingFlagsEXT, VkCullModeFlags, VkDebugReportFlagsEXT, VkDebugUtilsMessageSeverityFlagsEXT, VkDebugUtilsMessageTypeFlagsEXT, VkDebugUtilsMessengerCallbackDataFlagsEXT, VkDebugUtilsMessengerCreateFlagsEXT, VkDependencyFlags, VkDescriptorBindingFlags, VkDescriptorPoolCreateFlags, VkDescriptorPoolResetFlags, VkDescriptorSetLayoutCreateFlags, VkDescriptorUpdateTemplateCreateFlags, VkDeviceAddressBindingFlagsEXT, VkDeviceCreateFlags, VkDeviceDiagnosticsConfigFlagsNV, VkDeviceGroupPresentModeFlagsKHR, VkDeviceMemoryReportFlagsEXT, VkDeviceQueueCreateFlags, VkDirectDriverLoadingFlagsLUNARG, VkDirectFBSurfaceCreateFlagsEXT, VkDisplayModeCreateFlagsKHR, VkDisplayPlaneAlphaFlagsKHR, VkDisplaySurfaceCreateFlagsKHR, VkEventCreateFlags, VkExportMetalObjectTypeFlagsEXT, VkExternalFenceFeatureFlags, VkExternalFenceHandleTypeFlags, VkExternalMemoryFeatureFlags, VkExternalMemoryFeatureFlagsNV, VkExternalMemoryHandleTypeFlags, VkExternalMemoryHandleTypeFlagsNV, VkExternalSemaphoreFeatureFlags, VkExternalSemaphoreHandleTypeFlags, VkFenceCreateFlags, VkFenceImportFlags, VkFlags64, VkFormatFeatureFlags, VkFrameBoundaryFlagsEXT, VkFramebufferCreateFlags, VkGeometryFlagsKHR, VkGeometryInstanceFlagsKHR, VkGraphicsPipelineLibraryFlagsEXT, VkHeadlessSurfaceCreateFlagsEXT, VkHostImageCopyFlags, VkIOSSurfaceCreateFlagsMVK, VkImageAspectFlags, VkImageCompressionFixedRateFlagsEXT, VkImageCompressionFlagsEXT, VkImageConstraintsInfoFlagsFUCHSIA, VkImageCreateFlags, VkImageFormatConstraintsFlagsFUCHSIA, VkImagePipeSurfaceCreateFlagsFUCHSIA, VkImageUsageFlags, VkImageViewCreateFlags, VkIndirectCommandsInputModeFlagsEXT, VkIndirectCommandsLayoutUsageFlagsEXT, VkIndirectCommandsLayoutUsageFlagsNV, VkIndirectStateFlagsNV, VkInstanceCreateFlags, VkMacOSSurfaceCreateFlagsMVK, VkMemoryAllocateFlags, VkMemoryHeapFlags, VkMemoryMapFlags, VkMemoryPropertyFlags, VkMemoryUnmapFlags, VkMetalSurfaceCreateFlagsEXT, VkMicromapCreateFlagsEXT, VkOpticalFlowExecuteFlagsNV, VkOpticalFlowGridSizeFlagsNV, VkOpticalFlowSessionCreateFlagsNV, VkOpticalFlowUsageFlagsNV, VkPartitionedAccelerationStructureInstanceFlagsNV, VkPeerMemoryFeatureFlags, VkPerformanceCounterDescriptionFlagsKHR, VkPipelineCacheCreateFlags, VkPipelineColorBlendStateCreateFlags, VkPipelineCompilerControlFlagsAMD, VkPipelineCoverageModulationStateCreateFlagsNV, VkPipelineCoverageReductionStateCreateFlagsNV, VkPipelineCoverageToColorStateCreateFlagsNV, VkPipelineCreateFlags, VkPipelineCreationFeedbackFlags, VkPipelineDepthStencilStateCreateFlags, VkPipelineDiscardRectangleStateCreateFlagsEXT, VkPipelineDynamicStateCreateFlags, VkPipelineInputAssemblyStateCreateFlags, VkPipelineLayoutCreateFlags, VkPipelineMultisampleStateCreateFlags, VkPipelineRasterizationConservativeStateCreateFlagsEXT, VkPipelineRasterizationDepthClipStateCreateFlagsEXT, VkPipelineRasterizationStateCreateFlags, VkPipelineRasterizationStateStreamCreateFlagsEXT, VkPipelineShaderStageCreateFlags, VkPipelineStageFlags, VkPipelineTessellationStateCreateFlags, VkPipelineVertexInputStateCreateFlags, VkPipelineViewportStateCreateFlags, VkPipelineViewportSwizzleStateCreateFlagsNV, VkPresentGravityFlagsEXT, VkPresentScalingFlagsEXT, VkPrivateDataSlotCreateFlags, VkQueryControlFlags, VkQueryPipelineStatisticFlags, VkQueryPoolCreateFlags, VkQueryResultFlags, VkQueueFlags, VkRenderPassCreateFlags, VkRenderingFlags, VkResolveModeFlags, VkSampleCountFlags, VkSamplerCreateFlags, VkScreenSurfaceCreateFlagsQNX, VkSemaphoreCreateFlags, VkSemaphoreImportFlags, VkSemaphoreWaitFlags, VkShaderCorePropertiesFlagsAMD, VkShaderCreateFlagsEXT, VkShaderModuleCreateFlags, VkShaderStageFlags, VkSparseImageFormatFlags, VkSparseMemoryBindFlags, VkStencilFaceFlags, VkStreamDescriptorSurfaceCreateFlagsGGP, VkSubgroupFeatureFlags, VkSubmitFlags, VkSubpassDescriptionFlags, VkSurfaceCounterFlagsEXT, VkSurfaceTransformFlagsKHR, VkSwapchainCreateFlagsKHR, VkToolPurposeFlags, VkValidationCacheCreateFlagsEXT, VkViSurfaceCreateFlagsNN, VkVideoBeginCodingFlagsKHR, VkVideoCapabilityFlagsKHR, VkVideoChromaSubsamplingFlagsKHR, VkVideoCodecOperationFlagsKHR, VkVideoCodingControlFlagsKHR, VkVideoComponentBitDepthFlagsKHR, VkVideoDecodeCapabilityFlagsKHR, VkVideoDecodeFlagsKHR, VkVideoDecodeH264PictureLayoutFlagsKHR, VkVideoDecodeUsageFlagsKHR, VkVideoEncodeAV1CapabilityFlagsKHR, VkVideoEncodeAV1RateControlFlagsKHR, VkVideoEncodeAV1StdFlagsKHR, VkVideoEncodeAV1SuperblockSizeFlagsKHR, VkVideoEncodeCapabilityFlagsKHR, VkVideoEncodeContentFlagsKHR, VkVideoEncodeFeedbackFlagsKHR, VkVideoEncodeFlagsKHR, VkVideoEncodeH264CapabilityFlagsKHR, VkVideoEncodeH264RateControlFlagsKHR, VkVideoEncodeH264StdFlagsKHR, VkVideoEncodeH265CapabilityFlagsKHR, VkVideoEncodeH265CtbSizeFlagsKHR, VkVideoEncodeH265RateControlFlagsKHR, VkVideoEncodeH265StdFlagsKHR, VkVideoEncodeH265TransformBlockSizeFlagsKHR, VkVideoEncodeRateControlFlagsKHR, VkVideoEncodeRateControlModeFlagsKHR, VkVideoEncodeUsageFlagsKHR, VkVideoEndCodingFlagsKHR, VkVideoSessionCreateFlagsKHR, VkVideoSessionParametersCreateFlagsKHR, VkWaylandSurfaceCreateFlagsKHR, VkWin32SurfaceCreateFlagsKHR, VkXcbSurfaceCreateFlagsKHR, VkXlibSurfaceCreateFlagsKHR

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0