-
Notifications
You must be signed in to change notification settings - Fork 146
kms/surface: Don't send screencopysuccess()
until sync point is reached
#1595
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Actually, |
I think this should be good to merge pending Smithay/smithay#1805. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There is always optimizations to be had here regarding deferring the copy, but those are difficult, when you have to deal with GLs global state.
Adding anything else to this tuple is awkward; defining a simple struct makes this cleaner. This also adds a `sync` property, which will come in handy later. Containing simply the same-named argument that was passed to `submit_buffer`.
A little annoying to add a `loop_handle` argument to `render_output`, but generally straightforward.
Shouldn't really matter, but no need to check the fence after this. It would be good if shm screencopy didn't block here...
Yeah, that part could be easier with Vulkan, though synchronization is known to be one of the more challenging aspects of Vulkan, so it has it's own difficulties. Probably should be possible to improve this on GL too, but that can be done later. Rebased and updated for merged smithay changes , so this should be good now. |
Uses Smithay/smithay#1805 to get a sync point from the blit, and then waits on it in a calloop source without blocking the thread.
Like #1580, this should fix some screen capture synchronization issues, but without the overhead of a
glFinish
.