summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg Kristensen <[email protected]>2016-02-12 15:08:09 -0800
committerKristian Høgsberg Kristensen <[email protected]>2016-02-12 15:08:09 -0800
commitb0c30b77d4c57d653ed657d069d748b5be88d709 (patch)
treed7dd0f3aebb0ec23840c16d27336502c7e21de8f /src
parent39a120aefe43f7b664713b5d0aff13f0a2a19168 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/anv_device.c18
1 files changed, 9 insertions, 9 deletions
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;
}