From b0c30b77d4c57d653ed657d069d748b5be88d709 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Kristensen Date: Fri, 12 Feb 2016 15:08:09 -0800 Subject: anv: Submit fence bo only after all command buffers We were submitting the fence bo after each command buffer in a multi command buffer submit, causing us to occasionally complete the fence too early. --- src/vulkan/anv_device.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/vulkan/anv_device.c') diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 5e9c42b2fdc..e2efaafa25d 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -1012,20 +1012,20 @@ VkResult anv_QueueSubmit( "execbuf2 failed: %m"); } - if (fence) { - ret = anv_gem_execbuffer(device, &fence->execbuf); - if (ret != 0) { - /* We don't know the real error. */ - return vk_errorf(VK_ERROR_OUT_OF_DEVICE_MEMORY, - "execbuf2 failed: %m"); - } - } - for (uint32_t k = 0; k < cmd_buffer->execbuf2.bo_count; k++) cmd_buffer->execbuf2.bos[k]->offset = cmd_buffer->execbuf2.objects[k].offset; } } + if (fence) { + ret = anv_gem_execbuffer(device, &fence->execbuf); + if (ret != 0) { + /* We don't know the real error. */ + return vk_errorf(VK_ERROR_OUT_OF_DEVICE_MEMORY, + "execbuf2 failed: %m"); + } + } + return VK_SUCCESS; } -- cgit v1.2.3