Module: Mesa
Branch: master
Commit: 2eacfdeec9c1bd3be291e8f9526580da331a8ec4
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2eacfdeec9c1bd3be291e8f9526580da331a8ec4

Author: Jason Ekstrand <jason.ekstr...@intel.com>
Date:   Fri Aug 25 11:27:15 2017 -0700

anv/queue: Allow temporary import of SYNC_FD semaphores

We didn't allow them before because it didn't look like the spec allowed
it.  It certainly doesn't make much sense.  However, there are CTS tests
that apparently hit this.  What the spec actually says is:

    "Importing a payload using handle types with copy transference
    creates a duplicate copy of the payload at the time of import, but
    makes no further reference to it. Fence signaling, waiting, and
    resetting operations performed on the target of copy imports must
    not affect any other fence or payload."

A SYNC_FD has copy transference but the import may be temporary or
permanent.  If you do a permanent import of something with copy
transference, I guess it's supposed to work and end up resetting the
permanent state.  In any case, there seems to be no real harm in
allowing it, so why not.

Reviewed-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>

---

 src/intel/vulkan/anv_queue.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index 0a40ebc2e6..03769beccd 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -751,9 +751,6 @@ VkResult anv_ImportSemaphoreFdKHR(
       anv_semaphore_impl_cleanup(device, &semaphore->temporary);
       semaphore->temporary = new_impl;
    } else {
-      /* SYNC_FILE must be a temporary import */
-      assert(new_impl.type != ANV_SEMAPHORE_TYPE_SYNC_FILE);
-
       anv_semaphore_impl_cleanup(device, &semaphore->permanent);
       semaphore->permanent = new_impl;
    }

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to