From: Kristian Høgsberg Kristensen Date: Fri, 12 Feb 2016 23:08:09 +0000 (-0800) Subject: anv: Submit fence bo only after all command buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0c30b77d4c57d653ed657d069d748b5be88d709;p=mesa.git 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. --- 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; }