From patchwork Wed Sep 7 21:08:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 667159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sTx0N5rYMz9s2Q for ; Thu, 8 Sep 2016 07:08:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=e2EXrya8; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3E9FEC0BF5; Wed, 7 Sep 2016 21:08:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mu7yxHDMjIDE; Wed, 7 Sep 2016 21:08:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 98578C0C2A; Wed, 7 Sep 2016 21:08:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 139B11C2C11 for ; Wed, 7 Sep 2016 21:08:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0EF3D88D76 for ; Wed, 7 Sep 2016 21:08:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gxbOmZVsjuUe for ; Wed, 7 Sep 2016 21:08:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 4785589935 for ; Wed, 7 Sep 2016 21:08:49 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id b187so898152wme.0 for ; Wed, 07 Sep 2016 14:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=/Ecaiav4JLGwoqoLZKT4IjZWeuHvVZqDovK4to8m8d0=; b=e2EXrya8eG2pGHJwDofoEuPyD9eG/7juVZu5vsdbdafSD42tgzP+SRvGRS8eLnUF/O NEh5UPEje8AQC7BqvoTzBawfFqCPUTPUAKSGrNYKtvfu92GTFXHRawTwq2tineLMrm5t dEulsTJtZxSC+NnT5nqwNhmnw5bDfxT8vbKTec939SVGzqG+4bY+e2+5n29zZinfvGwC YM92JDX7A57K53owre7G65kmSX1le9a1+Gakk0pBw4P8hMTKB9RwXJgM0x5oOnL0g3Ze CvG3tIVRgi/+ebgsZ2e4AIqVx7FTRyuTxz919Ou3m38U06EcTw8XciGNumdwYtMYvAz7 CXNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/Ecaiav4JLGwoqoLZKT4IjZWeuHvVZqDovK4to8m8d0=; b=JYBvEK5QT/5Wk6tSNIM2cfEsw7VIjfe2MEs3P5LkmwvIzVIM1dQ+8HighpltuKm9n5 WhhAOnzD7GJLPGeVmufcfPTf9+fCai3fa5cdc3lYb3Kojyd23U8elsIdCScJn9UvigZJ TmviELZXnIi6nE92+QPaBuLfuNrI1+FViG3DFtjRqdTP6t4Q7TfvRTDr8J17AoUDD2Dz 1aF0Ci3z6bENnr3VfJIdL9gNFN274FvQDXJWwVCO0A3fWL+8hC9710YKeUf59j6LsMVn TWNGCa/jB1out7/dS+rFjYGpBrXNutTW/5JZwtD8xhKpjEJzAgnAo//LbpR3f5gOjK2p 2j+A== X-Gm-Message-State: AE9vXwObGFLoBx4DgJNbh/yvQmDsmig/Rpi+8g8sIrOK2peHL/c4dlCOGdJBlJwbfuBcwg== X-Received: by 10.28.69.85 with SMTP id s82mr5410959wma.37.1473282527786; Wed, 07 Sep 2016 14:08:47 -0700 (PDT) Received: from atlas.localdomain.localdomain (gam75-1-81-57-22-125.fbx.proxad.net. [81.57.22.125]) by smtp.gmail.com with ESMTPSA id x6sm40563004wjk.26.2016.09.07.14.08.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 14:08:47 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Wed, 7 Sep 2016 23:08:40 +0200 Message-Id: <1473282523-12796-1-git-send-email-romain.naour@gmail.com> X-Mailer: git-send-email 2.5.5 Cc: Romain Naour Subject: [Buildroot] [PATCH 1/4] package/efl: add OpenGL/OpenGLES support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Allow to enable graphic acceleration using OpenGL or OpenGLES with efl libraries. The full OpenGL option depend on X11, because full OpenGL means GLX, which means X11. Also select efl xlib support when full OpenGL is selected. Enable OpenGL ES when EGL API is enabled, otherwise the build fail with this error: configure: error: OpenGL ES requires EGL, please add --enable-egl to your configure options to switch to EGL + OpenGL ES. With the upcomming Wayland support in EFL Buildroot packaging, OpenGL ES support is recommended. Signed-off-by: Romain Naour --- v1: patch rework. s/opengles/OpenGL ES/ as for Mesa3d package. Add a dependency on EGL API for OpenGL ES support. (from an old efl series) http://lists.busybox.net/pipermail/buildroot/2015-December/146401.html v8: Select efl xlib support with the full opengl support is selected. (Yann E.Morin) Ref: http://lists.busybox.net/pipermail/buildroot/2015-December/146646.html v6: Rename OpenGL options (Yann E.Morin) Only full OpenGL support depends on X11. --- package/efl/Config.in | 30 ++++++++++++++++++++++++++++++ package/efl/efl.mk | 19 ++++++++++++++++--- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/package/efl/Config.in b/package/efl/Config.in index 1cc681c..f4d88bc 100644 --- a/package/efl/Config.in +++ b/package/efl/Config.in @@ -155,6 +155,36 @@ config BR2_PACKAGE_EFL_X_XLIB select BR2_PACKAGE_XLIB_LIBXTST select BR2_PACKAGE_XPROTO_GLPROTO +choice + bool "OpenGL support" + default BR2_PACKAGE_EFL_OPENGL if BR2_PACKAGE_HAS_LIBGL && BR2_PACKAGE_XORG7 + default BR2_PACKAGE_EFL_OPENGLES if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES + help + libevas can be configured to use HW acceleration with OpenGL or + OpenGL ES. + +config BR2_PACKAGE_EFL_OPENGL_NONE + bool "none" + +config BR2_PACKAGE_EFL_OPENGL + bool "OpenGL" + depends on BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_EFL_X_XLIB + +comment "OpenGL support needs X11 and an OpenGL provider" + depends on !BR2_PACKAGE_HAS_LIBGL || !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_EFL_OPENGLES + bool "OpenGL ES (w/ EGL)" + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGLES + +comment "OpenGL ES support needs an OpenGL ES w/ EGL provider" + depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL + +endchoice # OpenGL support + comment "libevas loaders" config BR2_PACKAGE_EFL_PNG diff --git a/package/efl/efl.mk b/package/efl/efl.mk index 83588c1..44649d5 100644 --- a/package/efl/efl.mk +++ b/package/efl/efl.mk @@ -28,7 +28,6 @@ EFL_DEPENDENCIES = host-pkgconf host-efl host-luajit dbus freetype \ # --disable-sdl: disable sdl2 support. # --disable-spectre: disable spectre image loader. # --disable-xinput22: disable X11 XInput v2.2+ support. -# --with-opengl=none: disable opengl support. # --with-doxygen: disable doxygen documentation EFL_CONF_OPTS = \ --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ @@ -43,8 +42,7 @@ EFL_CONF_OPTS = \ --disable-sdl \ --disable-spectre \ --disable-xinput22 \ - --with-doxygen=no \ - --with-opengl=none + --with-doxygen=no # Disable untested configuration warning. ifeq ($(BR2_PACKAGE_EFL_HAS_RECOMMENDED_CONFIG),) @@ -182,6 +180,21 @@ else EFL_CONF_OPTS += --with-x11=none endif +ifeq ($(BR2_PACKAGE_EFL_OPENGL),y) +EFL_CONF_OPTS += --with-opengl=full +EFL_DEPENDENCIES += libgl +endif + +# OpenGL ES requires EGL +ifeq ($(BR2_PACKAGE_EFL_OPENGLES),y) +EFL_CONF_OPTS += --with-opengl=es --enable-egl +EFL_DEPENDENCIES += libegl libgles +endif + +ifeq ($(BR2_PACKAGE_EFL_OPENGL_NONE),y) +EFL_CONF_OPTS += --with-opengl=none +endif + # Loaders that need external dependencies needs to be --enable-XXX=yes # otherwise the default is '=static'. # All other loaders are statically built-in