2015-09-10 12:13 GMT+03:00 Pekka Paalanen <[email protected]>: > On Sat, 5 Sep 2015 15:01:37 +0100 > John Sadler <[email protected]> wrote: > >> Commit a352580285 introduced a dependency on `libdrm` whenever >> EGL support is enabled. However, when building for Raspberry Pi >> with EGL enabled this is an unwelcome dependency, and we don't >> need the GL Renderer anyway. >> >> This commit introduces a separate configure option: >> --disable-gl-renderer >> >> Which allows building of the GL Renderer to be disabled, and >> the `libdrm` dependency along with it. >> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91884 >> >> Signed-off-by: John Sadler <[email protected]> >> --- >> Makefile.am | 2 +- >> configure.ac | 9 +++++++++ >> 2 files changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/Makefile.am b/Makefile.am >> index 62719c9..9968b7f 100644 >> --- a/Makefile.am >> +++ b/Makefile.am >> @@ -198,7 +198,7 @@ westoninclude_HEADERS = \ >> shared/zalloc.h \ >> shared/platform.h >> >> -if ENABLE_EGL >> +if ENABLE_GL_RENDERER >> module_LTLIBRARIES += gl-renderer.la >> gl_renderer_la_LDFLAGS = -module -avoid-version >> gl_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS) >> diff --git a/configure.ac b/configure.ac >> index 17a3754..f832ada 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -80,13 +80,22 @@ if test "x$enable_devdocs" != "xno"; then >> fi >> AM_CONDITIONAL(ENABLE_DEVDOCS, test "x$enable_devdocs" = "xyes") >> >> +AC_ARG_ENABLE(gl-renderer, [ --disable-gl-renderer],, >> + enable_gl_renderer=yes) >> + >> AC_ARG_ENABLE(egl, [ --disable-egl],, >> enable_egl=yes) >> + >> AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes) >> if test x$enable_egl = xyes; then >> AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support]) >> PKG_CHECK_MODULES(EGL, [egl >= 7.10 glesv2]) >> PKG_CHECK_MODULES([EGL_TESTS], [egl >= 7.10 glesv2 wayland-client >> wayland-egl]) >> +fi >> + >> +AM_CONDITIONAL(ENABLE_GL_RENDERER, test x$enable_gl_renderer = xyes -a >> x$enable_egl = xyes) >> +if test x$enable_gl_renderer = xyes -a x$enable_egl = xyes; then >> + AC_DEFINE([ENABLE_GL_RENDERER], [1], [Build GL Renderer]) >> PKG_CHECK_MODULES([GL_RENDERER], [libdrm]) >> fi >> > > Hi John, > > it's hard for me to make my mind on this patch. On one hand, sure, why > not, but on the other hand, the option feels a bit awkward. > > If one uses this option, then all backends that use gl-renderer by > default will fail to init by default. But, I would not like to > litter #ifdef WESTON_GL_RENDERER around either. Automatic fallback to > Pixman on gl-renderer init failure is also a bit subtle for testing, as > you'd have to check the logs to see which renderer came up. > > We already have options to disable every single backend. What if we > disabled gl-renderer automatically when all backends that could > possibly use it are disabled? > > Another alternative that comes to mind is to put rpi-backend's EGL > support behind a --enable-rpi-proprietary-egl, so that you could use > that *and* --disable-egl. That switch would be easy to remove along > with the rpi-backend once the time comes. >
I would rather see the libdrm dependency being turned into a soft dependency, so that the dmabuf stuff would be disabled if libdrm is not present. Not all the EGL stacks are based on libdrm and i see no reason to require that for basic EGL functionality. -- Giulio > Maybe the former approach would be better than the latter? Less options > to confuse users. > > > Thanks, > pq > > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel > _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
