-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
video/out/hwdec/hwdec_vaapi: Remove unnecessary explicit synchronization #12980
base: master
Are you sure you want to change the base?
Conversation
Implicit synchronization will handle that. Extra explicit synchronization here would bring some overheads. Signed-off-by: Lang Yu <[email protected]>
The documentation for vaExportSurfaceHandle explicitly states:
|
We've also empirically observed synchronisation problems (displaying old frames) without the sync call. |
My understanding is it's the consumer's responsibility to do the sync. vaSyncSurface() for decode and process is not implemented in Mesa until https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20133 |
That MR is only relevant for AMD. vaSyncSurface has been meaningful on Intel for much longer. Also remember that we have to support importing to Vulkan, which most assuredly will not do implicit sync - and without a sync object to import (ie: a semaphore) there is no way to make it sync - which is the situation in which I observed the incorrect behaviour mentioned previously. |
Ok, it would be better to do the sync in consumer side(e.g., GL, Vulkan) instead of producer side. |
As far as I know, if the surface is exported as a dma-buf, it will be implicitly synced when imported and mapped either by GL or Vulkan in Linux KMD. |
If you can point us to either the code or developer statements that guarantee this behaviour for both GL and Vulkan and Intel and AMD, then we can consider it. But as I've said, the only evidence I have, is that things look wrong in at least one combination without it. |
Please take a look at this https://docs.kernel.org/next/driver-api/dma-buf.html#c.dma_buf_export_sync_file. |
Download the artifacts for this pull request: |
Ok. If you want to update the PR to include the necessary sync parts, then we can consider merging it. |
Thanks, let me have a try. |
Implicit synchronization will handle that.
Extra explicit synchronization here would bring some overheads.
Read this before you submit this pull request:
https://github.com/mpv-player/mpv/blob/master/DOCS/contribute.md
Reading this link and following the rules will get your pull request reviewed
and merged faster. Nobody wants lazy pull requests.