-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
linux-capture: Implement EGL backend for xcomposite capture #6474
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
da3ec65
to
ec66b45
Compare
I have this in WIP since its dependent on the rewrite but its fairly well tested and should be basically done. |
This needs manual rebase |
Thanks for the merge :) rebased and removed wip. |
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.
This looks mostly good to me, just a few nitpicks and questions
This updates glad for EGL and adds in several extensions. EGL_EXT_platform_base EGL_EXT_platform_xcb EGL_KHR_image_base EGL_KHR_image_pixmap The xcb platform extension is unused but good to include if we want to try removing more Xlib dependencies. platform_base is included for good measure as other platform extensions technically build on it. image_base and image_pixmap are for upcoming xcomposite over EGL support. It also drops the unused create_context_no_error extensions.
create_texture_from_pixmap is only implemented for X11/EGL where it will bind the provided X11 pixmap to a texture with glEGLImageTargetTexture2DOES
When running on EGL we can use the new create_texture_from_pixmap functions to implement xcomposite capture. This removes the texture indirection previously implemented for GLX due to not using the spriting functionality in the built in shaders. Now that we texture directly from the pixmap we can remove the red/blue swap workarounds.
7de875d
to
0c57bee
Compare
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
Description
Enables us to provide xcomposite capture when running on X11 on EGL and makes minor improvements to GLX implementation.
Right now its rebased on the xcomposite rewrite but that should be merged soon and ill rebase this.
Motivation and Context
Some drivers (such as nvidia) have very limited functionality for pixmap capture such as only allowing a single mapping. On popular compositors such as gnome they capture before OBS has started and so users are unable to capture windows. However these drivers dont have such a restriction when using the EGL extensions, which makes the user experience more pleasant.
How Has This Been Tested?
Tested on nvidia and intel. Everything seems to be working as expected but we have some extra code for software renders like LLVMPipe which I have not tested on the newer GLX setup or EGL.
Types of changes
Checklist: