Fix vkAllocateCommandBuffers with failing allocation

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
Jason Macnak
2024-08-12 13:06:27 -07:00
committed by Marge Bot
parent 8dbe8e0b1e
commit 089c5162b8

View File

@@ -126,6 +126,9 @@ VkResult gfxstream_vk_AllocateCommandBuffers(VkDevice device,
VK_FROM_HANDLE(gfxstream_vk_device, gfxstream_device, device);
VK_FROM_HANDLE(gfxstream_vk_command_pool, gfxstream_commandPool, pAllocateInfo->commandPool);
VkResult result = (VkResult)0;
for (uint32_t i = 0; i < pAllocateInfo->commandBufferCount; i++) {
pCommandBuffers[i] = VK_NULL_HANDLE;
}
std::vector<gfxstream_vk_command_buffer*> gfxstream_commandBuffers(
pAllocateInfo->commandBufferCount);
for (uint32_t i = 0; i < pAllocateInfo->commandBufferCount; i++) {