MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / CreateBuffer

Function CreateBuffer

icd/generated/function_definitions.h:501–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499 return VK_SUCCESS;
500}
501static VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo,
502 const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) {
503 unique_lock_t lock(global_lock);
504 *pBuffer = (VkBuffer)global_unique_handle++;
505 buffer_map[device][*pBuffer] = {pCreateInfo->size, current_available_address};
506 current_available_address += pCreateInfo->size;
507 // Always align to next 64-bit pointer
508 const uint64_t alignment = current_available_address % 64;
509 if (alignment != 0) {
510 current_available_address += (64 - alignment);
511 }
512 return VK_SUCCESS;
513}
514static VKAPI_ATTR void VKAPI_CALL DestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) {
515 unique_lock_t lock(global_lock);
516 buffer_map[device].erase(buffer);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected