| 499 | return VK_SUCCESS; |
| 500 | } |
| 501 | static 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 | } |
| 514 | static 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); |
nothing calls this directly
no outgoing calls
no test coverage detected