Draft: anv: Mark external objects with EXEC_OBJECT_WRITE
anv: Mark external objects with EXEC_OBJECT_WRITE
Exported buffers consumed by software using implicit sync (e.g. libva)
need to be marked with EXEC_OBJECT_WRITE. Otherwise the consumer will
not be made to wait until anv is finished writing to the buffer.
Unfortunately, with the bindless nature of Vulkan, all buffers have to
be added to the execlist so this will cause a lot of unnecessary
synchronization.
This was discovered when enabling the Vulkan renderer in Chrome.
This was discovered as the cause of corruption in the libva-encoded
video stream from Google Meet when the Vulkan renderer in Chrome was
enabled.
I'm not expecting to land this — just to provide a starting point for discussion.
Short of this big hammer, other options that come to mind:
- add explicit fencing support to libva
-- I understand the Intel media-driver supports explicit sync as a requirement of
xe
. We would need it for i915 as well. -
@robclark mentioned i915 perhaps needs a
NO_IMPLICIT
flag like msm has (https://gitlab.freedesktop.org/drm/msm/-/blob/msm-next/include/uapi/drm/msm_drm.h?ref_type=heads#L237). - Some new Vulkan API to mark buffers as implicitly synchronized?
- Some hack in Chrome itself to synchronize at a higher level?
- ???
cc: @linyaa