vkCreateBuffer
vkCreateBuffer is a Vulkan API function used to create a new buffer resource on a logical device. A buffer represents a linear region of memory that can store data for various purposes such as vertex data, uniform buffers, storage buffers, or transfer sources and destinations. Importantly, creating a buffer does not allocate or bind memory by itself; memory must be allocated separately and bound to the buffer.
The function signature is: VkResult vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer). The
Typical usage follows creation with vkCreateBuffer, then querying memory requirements via vkGetBufferMemoryRequirements, selecting a suitable memory
Return values indicate success or failure. VK_SUCCESS indicates creation succeeded. Possible error codes include VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY,
Owner processes should ensure that the buffer’s usage flags and memory properties are compatible with intended