vulkan: move AllocateCommandBuffers_Bottom
Move it from loader.cpp to driver.cpp and rename it to
driver::AllocateCommandBuffers. No functional change.
Change-Id: I0abdca7dea128df0b313b90cfb5d5825566fc790
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp
index 1641e31..1301912 100644
--- a/vulkan/libvulkan/driver.cpp
+++ b/vulkan/libvulkan/driver.cpp
@@ -215,5 +215,21 @@
SetData(*pQueue, data);
}
+VKAPI_ATTR VkResult
+AllocateCommandBuffers(VkDevice device,
+ const VkCommandBufferAllocateInfo* pAllocateInfo,
+ VkCommandBuffer* pCommandBuffers) {
+ const auto& data = GetData(device);
+
+ VkResult result = data.driver.AllocateCommandBuffers(device, pAllocateInfo,
+ pCommandBuffers);
+ if (result == VK_SUCCESS) {
+ for (uint32_t i = 0; i < pAllocateInfo->commandBufferCount; i++)
+ SetData(pCommandBuffers[i], data);
+ }
+
+ return result;
+}
+
} // namespace driver
} // namespace vulkan