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 |
See Also
VK_VERSION_1_0, VkAccessFlags, VkAcquireProfilingLockFlagsKHR, VkAttachmentDescriptionFlags, VkBufferCreateFlags, VkBufferUsageFlags, VkBufferViewCreateFlags, VkColorComponentFlags, VkCommandBufferResetFlags, VkCommandBufferUsageFlags, VkCommandPoolCreateFlags, VkCommandPoolResetFlags, VkCompositeAlphaFlagsKHR, VkCullModeFlags, VkDebugUtilsMessageSeverityFlagsEXT, VkDebugUtilsMessageTypeFlagsEXT, VkDebugUtilsMessengerCallbackDataFlagsEXT, VkDebugUtilsMessengerCreateFlagsEXT, VkDependencyFlags, VkDescriptorBindingFlags, VkDescriptorPoolCreateFlags, VkDescriptorPoolResetFlags, VkDescriptorSetLayoutCreateFlags, VkDeviceCreateFlags, VkDeviceGroupPresentModeFlagsKHR, VkDeviceQueueCreateFlags, VkDisplayModeCreateFlagsKHR, VkDisplayPlaneAlphaFlagsKHR, VkDisplaySurfaceCreateFlagsKHR, VkEventCreateFlags, VkExternalFenceFeatureFlags, VkExternalFenceHandleTypeFlags, VkExternalMemoryFeatureFlags, VkExternalMemoryHandleTypeFlags, VkExternalSemaphoreFeatureFlags, VkExternalSemaphoreHandleTypeFlags, VkFenceCreateFlags, VkFenceImportFlags, VkFlags64, VkFormatFeatureFlags, VkFramebufferCreateFlags, VkHeadlessSurfaceCreateFlagsEXT, VkImageAspectFlags, VkImageCreateFlags, VkImageUsageFlags, VkImageViewCreateFlags, VkInstanceCreateFlags, VkMemoryAllocateFlags, VkMemoryHeapFlags, VkMemoryMapFlags, VkMemoryPropertyFlags, VkPeerMemoryFeatureFlags, VkPerformanceCounterDescriptionFlagsKHR, VkPipelineCacheCreateFlags, VkPipelineColorBlendStateCreateFlags, VkPipelineCreateFlags, VkPipelineDepthStencilStateCreateFlags, VkPipelineDiscardRectangleStateCreateFlagsEXT, VkPipelineDynamicStateCreateFlags, VkPipelineInputAssemblyStateCreateFlags, VkPipelineLayoutCreateFlags, VkPipelineMultisampleStateCreateFlags, VkPipelineRasterizationConservativeStateCreateFlagsEXT, VkPipelineRasterizationDepthClipStateCreateFlagsEXT, VkPipelineRasterizationStateCreateFlags, VkPipelineShaderStageCreateFlags, VkPipelineStageFlags, VkPipelineTessellationStateCreateFlags, VkPipelineVertexInputStateCreateFlags, VkPipelineViewportStateCreateFlags, VkQueryControlFlags, VkQueryPipelineStatisticFlags, VkQueryPoolCreateFlags, VkQueryResultFlags, VkQueueFlags, VkRefreshObjectFlagsKHR, VkRenderPassCreateFlags, VkResolveModeFlags, VkSampleCountFlags, VkSamplerCreateFlags, VkSemaphoreCreateFlags, VkSemaphoreImportFlags, VkSemaphoreWaitFlags, VkShaderStageFlags, VkStencilFaceFlags, VkSubgroupFeatureFlags, VkSubmitFlags, VkSubpassDescriptionFlags, VkSurfaceCounterFlagsEXT, VkSurfaceTransformFlagsKHR, VkSwapchainCreateFlagsKHR
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.