C Specification

The VkBufferCreateInfo structure is defined as:

// Provided by VK_VERSION_1_0
typedef struct VkBufferCreateInfo {
    VkStructureType        sType;
    const void*            pNext;
    VkBufferCreateFlags    flags;
    VkDeviceSize           size;
    VkBufferUsageFlags     usage;
    VkSharingMode          sharingMode;
    uint32_t               queueFamilyIndexCount;
    const uint32_t*        pQueueFamilyIndices;
} VkBufferCreateInfo;


  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • flags is a bitmask of VkBufferCreateFlagBits specifying additional parameters of the buffer.

  • size is the size in bytes of the buffer to be created.

  • usage is a bitmask of VkBufferUsageFlagBits specifying allowed usages of the buffer.

  • sharingMode is a VkSharingMode value specifying the sharing mode of the buffer when it will be accessed by multiple queue families.

  • queueFamilyIndexCount is the number of entries in the pQueueFamilyIndices array.

  • pQueueFamilyIndices is a pointer to an array of queue families that will access this buffer. It is ignored if sharingMode is not VK_SHARING_MODE_CONCURRENT.


Valid Usage
  • VUID-VkBufferCreateInfo-size-00912
    size must be greater than 0

  • VUID-VkBufferCreateInfo-sharingMode-00913
    If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values

  • VUID-VkBufferCreateInfo-sharingMode-00914
    If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1

  • VUID-VkBufferCreateInfo-sharingMode-01419
    If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties2 or vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device

  • VUID-VkBufferCreateInfo-flags-00915
    flags must not contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT

  • VUID-VkBufferCreateInfo-flags-00916
    flags must not contain VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT

  • VUID-VkBufferCreateInfo-flags-00917
    flags must not contain VK_BUFFER_CREATE_SPARSE_ALIASED_BIT

  • VUID-VkBufferCreateInfo-pNext-00920
    If the pNext chain includes a VkExternalMemoryBufferCreateInfo structure, its handleTypes member must only contain bits that are also in VkExternalBufferProperties::externalMemoryProperties.compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalBufferProperties with pExternalBufferInfo->handleType equal to any one of the handle types specified in VkExternalMemoryBufferCreateInfo::handleTypes

  • VUID-VkBufferCreateInfo-flags-01887
    If the protectedMemory feature is not enabled, flags must not contain VK_BUFFER_CREATE_PROTECTED_BIT

  • VUID-VkBufferCreateInfo-opaqueCaptureAddress-03337
    If VkBufferOpaqueCaptureAddressCreateInfo::opaqueCaptureAddress is not zero, flags must include VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT

  • VUID-VkBufferCreateInfo-flags-03338
    If flags includes VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, the bufferDeviceAddressCaptureReplay feature must be enabled

  • VUID-VkBufferCreateInfo-None-09205
    usage must be a valid combination of VkBufferUsageFlagBits values

  • VUID-VkBufferCreateInfo-None-09206
    usage must not be 0

Valid Usage (Implicit)
  • VUID-VkBufferCreateInfo-sType-sType

  • VUID-VkBufferCreateInfo-pNext-pNext
    Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkBufferOpaqueCaptureAddressCreateInfo or VkExternalMemoryBufferCreateInfo

  • VUID-VkBufferCreateInfo-sType-unique
    The sType value of each struct in the pNext chain must be unique

  • VUID-VkBufferCreateInfo-flags-parameter
    flags must be a valid combination of VkBufferCreateFlagBits values

  • VUID-VkBufferCreateInfo-sharingMode-parameter
    sharingMode must be a valid VkSharingMode value

See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0