From: Kristian Høgsberg Date: Tue, 12 May 2015 21:38:12 +0000 (-0700) Subject: vk: Submit all cmd buffers passed to vkQueueSubmit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb986ef59710ad7a09de02b8612665992ed867e3;p=mesa.git vk: Submit all cmd buffers passed to vkQueueSubmit --- diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 98e1570372b..dcd0c380f6c 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -567,23 +567,25 @@ VkResult VKAPI vkQueueSubmit( { struct anv_queue *queue = (struct anv_queue *) _queue; struct anv_device *device = queue->device; - struct anv_cmd_buffer *cmd_buffer = (struct anv_cmd_buffer *) pCmdBuffers[0]; int ret; - assert(cmdBufferCount == 1); + for (uint32_t i = 0; i < cmdBufferCount; i++) { + struct anv_cmd_buffer *cmd_buffer = + (struct anv_cmd_buffer *) pCmdBuffers[i]; - if (device->dump_aub) - anv_cmd_buffer_dump(cmd_buffer); + if (device->dump_aub) + anv_cmd_buffer_dump(cmd_buffer); - if (!device->no_hw) { - ret = anv_gem_execbuffer(device, &cmd_buffer->execbuf); - if (ret != 0) - goto fail; + if (!device->no_hw) { + ret = anv_gem_execbuffer(device, &cmd_buffer->execbuf); + if (ret != 0) + goto fail; - for (uint32_t i = 0; i < cmd_buffer->bo_count; i++) - cmd_buffer->exec2_bos[i]->offset = cmd_buffer->exec2_objects[i].offset; - } else { - *(uint32_t *)queue->completed_serial.map = cmd_buffer->serial; + for (uint32_t i = 0; i < cmd_buffer->bo_count; i++) + cmd_buffer->exec2_bos[i]->offset = cmd_buffer->exec2_objects[i].offset; + } else { + *(uint32_t *)queue->completed_serial.map = cmd_buffer->serial; + } } return VK_SUCCESS;