Skip to content
  • Iago Toral's avatar
    v3dv: implement external semaphore/fence extensions · 1f7d2b49
    Iago Toral authored
    
    
    This provides most of the implementation, but there are some
    things we cannot enable until we improve of kernel submit
    interface, namely:
    
    We don't expose capacity to export SYNC_FD, although we do
    have the implementation in place. This requires that we
    improve our kernel interface and event wait implementation
    first so we can cover the corner case where the application
    submits a command buffer that includes a VkCmdWaitForEvents
    and tries to export a SYNC_FD from its signal semaphores or
    fence before it the event is signaled and the command buffer
    is sent to the kernel for execution in full.
    
    Likewise, we can't currently import semaphores. This is because
    our current kernel submit interface can only take one syncobj.
    We have been working around this so far by waiting on the last
    syncobj produced from the device whenever we had to wait on any
    semaphores (which is obviously suboptimal already), but this
    won't work as soon as we allow importing external semaphores,
    as those could (and would typically) be produced from a
    different device.
    
    Once we address the kernel bits, we should come back and enable
    SYNC_FD exports as well as semaphore imports.
    
    Relevant CTS tests:
    dEQP-VK.api.external.fence.*
    dEQP-VK.api.external.semaphore.*
    dEQP-VK.synchronization.cross_instance.*
    
    Reviewed-by: default avatarAlejandro Piñeiro <apinheiro@igalia.com>
    Part-of: <!11105>
    1f7d2b49