C Specification
To create buffers, call:
// Provided by VK_VERSION_1_0
VkResult vkCreateBuffer(
VkDevice device,
const VkBufferCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkBuffer* pBuffer);
Parameters
-
deviceis the logical device that creates the buffer object. -
pCreateInfois a pointer to a VkBufferCreateInfo structure containing parameters affecting creation of the buffer. -
pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter. -
pBufferis a pointer to a VkBuffer handle in which the resulting buffer object is returned.
Description
Implementations may fail to create a buffer if the
effective usage includes the
VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and size is
greater than the maximum of
maxResourceHeapSize and
maxSamplerHeapSize.
If this happens, VK_ERROR_OUT_OF_DEVICE_MEMORY will be returned.
|
Note
|
This is an issue identified with VK_EXT_descriptor_heap, which we plan to tighten up for the KHR version. Applications using VK_EXT_descriptor_heap may wish to avoid suballocating heaps from the same buffer, instead creating one buffer per heap, to avoid situations where this causes issues. |
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.