From cb986ef59710ad7a09de02b8612665992ed867e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 12 May 2015 14:38:12 -0700 Subject: [PATCH] vk: Submit all cmd buffers passed to vkQueueSubmit --- src/vulkan/device.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) 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; -- 2.30.2