Movatterモバイル変換


[0]ホーム

URL:


Vulkan API Reference Pageslatest

vkCreateBuffer(3)

Name

vkCreateBuffer - Create a new buffer object

C Specification

To create buffers, call:

// Provided by VK_VERSION_1_0VkResult vkCreateBuffer(    VkDevice                                    device,    const VkBufferCreateInfo*                   pCreateInfo,    const VkAllocationCallbacks*                pAllocator,    VkBuffer*                                   pBuffer);

Parameters

  • device is the logical device that creates the buffer object.

  • pCreateInfo is a pointer to aVkBufferCreateInfo structurecontaining parameters affecting creation of the buffer.

  • pAllocator controls host memory allocation as described in theMemory Allocation chapter.

  • pBuffer is a pointer to aVkBuffer handle in which theresulting buffer object is returned.

Description

Valid Usage
  • VUID-vkCreateBuffer-device-09664
    devicemust support at least one queue family with one of theVK_QUEUE_VIDEO_ENCODE_BIT_KHR,VK_QUEUE_VIDEO_DECODE_BIT_KHR,VK_QUEUE_SPARSE_BINDING_BIT,VK_QUEUE_TRANSFER_BIT,VK_QUEUE_COMPUTE_BIT, orVK_QUEUE_GRAPHICS_BIT capabilities

  • VUID-vkCreateBuffer-flags-00911
    If theflags member ofpCreateInfo includesVK_BUFFER_CREATE_SPARSE_BINDING_BIT,and theextendedSparseAddressSpace feature is not enabled,creating thisVkBuffermust not cause the total required sparsememory for all currently valid sparse resources on the device to exceedVkPhysicalDeviceLimits::sparseAddressSpaceSize

  • VUID-vkCreateBuffer-flags-09383
    If theflags member ofpCreateInfo includesVK_BUFFER_CREATE_SPARSE_BINDING_BIT, theextendedSparseAddressSpace feature is enabled, and theusage member ofpCreateInfo contains bits not inVkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseBufferUsageFlags,creating thisVkBuffermust not cause the total required sparsememory for all currently valid sparse resources on the device, excludingVkBuffer created withusage member ofpCreateInfocontaining bits inVkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseBufferUsageFlagsandVkImage created withusage member ofpCreateInfocontaining bits inVkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseImageUsageFlags,to exceedVkPhysicalDeviceLimits::sparseAddressSpaceSize

  • VUID-vkCreateBuffer-flags-09384
    If theflags member ofpCreateInfo includesVK_BUFFER_CREATE_SPARSE_BINDING_BIT and theextendedSparseAddressSpace feature is enabled, creating thisVkBuffermust not cause the total required sparse memory for allcurrently valid sparse resources on the device to exceedVkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseAddressSpaceSize

Valid Usage (Implicit)
  • VUID-vkCreateBuffer-device-parameter
    devicemust be a validVkDevice handle

  • VUID-vkCreateBuffer-pCreateInfo-parameter
    pCreateInfomust be a valid pointer to a validVkBufferCreateInfo structure

  • VUID-vkCreateBuffer-pAllocator-parameter
    IfpAllocator is notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacks structure

  • VUID-vkCreateBuffer-pBuffer-parameter
    pBuffermust be a valid pointer to aVkBuffer handle

  • VUID-vkCreateBuffer-device-queuecount
    The devicemust have been created with at least1 queue

See Also

Document Notes

For more information, see theVulkan Specification.

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


[8]ページ先頭

©2009-2026 Movatter.jp