diff options
author | 2016-03-24 16:29:51 +0800 | |
---|---|---|
committer | 2016-04-07 21:15:04 +0800 | |
commit | 6a58a8a7813450038cb15575e3333b83f268c972 (patch) | |
tree | ad6fadd874b389606f387d76e4b845997af2bedc /vulkan/libvulkan/driver.cpp | |
parent | ba0be41afe39dcbed0a712a32d1ab6c341797007 (diff) |
vulkan: move AllocateCommandBuffers_Bottom
Move it from loader.cpp to driver.cpp and rename it to
driver::AllocateCommandBuffers. No functional change.
Change-Id: I0abdca7dea128df0b313b90cfb5d5825566fc790
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
-rw-r--r-- | vulkan/libvulkan/driver.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index 1641e31bc3..1301912dd6 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -215,5 +215,21 @@ void GetDeviceQueue(VkDevice device, 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 |