diff options
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 |