diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2021-02-22 13:57:37 +0200 |
---|---|---|
committer | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2021-03-12 10:25:58 +0200 |
commit | a193060221c4df123e26a562949cae5df3e73cde (patch) | |
tree | 8a5f08d96b9aad90a03a3fe69bb9200eae531ff6 | |
parent | 334a5437a92a6c6318b939886d9d3c1fcefa19a6 (diff) |
anv: reset binary syncobj to be signaled before submission
Before we introduced the submission thread in 829699ba632b2b, once we
returned from vkQueueSubmit, all signaled syncobj would have a
i915_request/dma-fence waiting to be signaled by some work that would
submitted to HW by i915.
After this submission thread that is no longer the case. We added a
few checks in places like vkQueuePresentKHR() to wait for the binary
semaphores to materialize before we would hand things over to the WSI
code.
Unfortunately 829699ba632b2b forgot to reset the signaled binary
semaphore.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 829699ba632b2b ("anv: implement shareable timeline semaphores")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4276
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry-picked from commit cb74cd816c0a0b1d6a715585414f8518cefbba5a)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9554>
-rw-r--r-- | src/intel/vulkan/anv_queue.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index 1b0f7d732e2..3fcd1ea0f8c 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -1054,6 +1054,13 @@ anv_queue_submit(struct anv_queue *queue, break; case ANV_SEMAPHORE_TYPE_DRM_SYNCOBJ: { + /* + * Reset the content of the syncobj so it doesn't contain a + * previously signaled dma-fence, until one is added by EXECBUFFER by + * the submission thread. + */ + anv_gem_syncobj_reset(device, impl->syncobj); + result = anv_queue_submit_add_syncobj(submit, device, impl->syncobj, I915_EXEC_FENCE_SIGNAL, 0); |