Closed Bug 1215085 Opened 9 years ago Closed 7 years ago

[Wayland] - Enable EGL on Linux

Categories

(Core :: Graphics, enhancement, P3)

All
Linux
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1433081
Tracking Status
firefox44 --- affected

People

(Reporter: stransky, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #635134 +++

AFAIK GLX can't work on non-X11 displays so we need to disable it there.
Attached patch patch (deleted) — Splinter Review
Again, I wonder who is a correct reviewer here.
Attachment #8674189 - Flags: review?(jmuizelaar)
Comment on attachment 8674189 [details] [diff] [review]
patch

Review of attachment 8674189 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/gl/GLContextProviderGLX.cpp
@@ +79,5 @@
> +        mGLXMinorVersion = 0;
> +        return false;
> +    }
> +#endif
> +

It feels like this should be avoided by not trying initialize GLContextProviderGLX instead of having it fail.
Attachment #8674189 - Flags: review?(jmuizelaar) → review-
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> Comment on attachment 8674189 [details] [diff] [review]
> patch
> 
> Review of attachment 8674189 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/gl/GLContextProviderGLX.cpp
> @@ +79,5 @@
> > +        mGLXMinorVersion = 0;
> > +        return false;
> > +    }
> > +#endif
> > +
> 
> It feels like this should be avoided by not trying initialize
> GLContextProviderGLX instead of having it fail.

Is Wayland something we know at build time, or are we supposed to support running both X and Wayland with same binary?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #3)
> Is Wayland something we know at build time, or are we supposed to support
> running both X and Wayland with same binary?

It's just a different Gtk backend and it's switched at run time. It's possible to build for Wayland only but IMHO better to support both (and other possible non-X11 backends) in one binary.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> Comment on attachment 8674189 [details] [diff] [review]
> patch
> 
> Review of attachment 8674189 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/gl/GLContextProviderGLX.cpp
> @@ +79,5 @@
> > +        mGLXMinorVersion = 0;
> > +        return false;
> > +    }
> > +#endif
> > +
> 
> It feels like this should be avoided by not trying initialize
> GLContextProviderGLX instead of having it fail.

What's the best way to do that? Fail in GLContextProviderGLX::GetGlobalContext?
Whiteboard: [gfx-noted]
So this brings up a bit of an issue. We currently only support a single GLContextProvider type per build (i.e. GLX or EGL). For now, I'd suggest switching the wayland builds to a build time configuration and moving them to use the GLContextProviderEGL.

Do you know what the recommended way of dealing with GLX vs EGL with GTK is supposed to be?
Flags: needinfo?(stransky)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #6)
> Do you know what the recommended way of dealing with GLX vs EGL with GTK is
> supposed to be?

I asked Gtk guys and they don't have any clear recommendation here. Also the build-time configuration looks impractical - GL would be only reason to have extra binary for X11 and for Wayland.
Flags: needinfo?(stransky)
According to Bug 788319 we should use EGL everywhere. Unfortunately the --with-gl-providel=EGL param does not work right now.
Summary: [Wayland] - Disable GLX for non-X11 displays → [Wayland] - Enable EGL on Linux
Blocks: gem
(In reply to Martin Stránský from comment #8)
> According to Bug 788319 we should use EGL everywhere. Unfortunately the
> --with-gl-providel=EGL param does not work right now.

Is this still true? What's the plan for this bug now? Bug 788319 confused me a bit here.
Depends on: linux-egl
Attached patch EGL build patch (deleted) — Splinter Review
This patch allows to build trunk with --with-gl-providel=EGL and it actually works (at least with Wayland) when sandbox is weakened - it tries to load gl libraries which is disabled by sandbox right now.
Blocks: wayland
No longer depends on: wayland
Let's fix that at Bug 1433081
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
No longer blocks: gem
No longer depends on: linux-egl
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: