-
Faith Ekstrand authored
In 83b943cc , we started making all VkDeviceMemory BOs resident all the time. One unfortunate side-effect of this is that every vkQueueSubmit sets EXEC_OBJECT_WRITE on every WSI memory object which means that X server or Wayland compositor, instead of waiting on the last vkQueueSubmit to actually write the buffer, now waits on the last vkQueueSubmit to from that driver instance relative to whenever the compositor's GL driver instance calls execbuf. This potentially leads to a lot of extra synchronization that we didn't intend to have. Instead, this commit makes it so that we leave WSI memory objects with EXEC_OBJECT_ASYNC most of the time and only unset EXEC_OBJECT_ASYNC and set EXEC_OBJECT_WRITE in the dummy execbuf that we do as part of vkQueuePresent. This should hopefully result in tighter integration with the compositor, lower latency, and better performance. Testing with DOOM 2016, this seems to reduce latency by at least a frame if not two and makes the game much more responsive. Testing was, however, subjective, so we don't have any hard data on that. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
ccb7d606