From patchwork Sat Apr 5 12:10:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 337154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B6FF81400FA for ; Sat, 5 Apr 2014 23:10:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 656719207A; Sat, 5 Apr 2014 12:10:36 +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 8fWvVIBloelt; Sat, 5 Apr 2014 12:10:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B77A493124; Sat, 5 Apr 2014 12:10:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 7EADE1BFA6C for ; Sat, 5 Apr 2014 12:10:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7B5A931CC8 for ; Sat, 5 Apr 2014 12:10:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uDeyO2IFBlTe for ; Sat, 5 Apr 2014 12:10:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by silver.osuosl.org (Postfix) with ESMTPS id B0E1131CB4 for ; Sat, 5 Apr 2014 12:10:29 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id bs8so3901531wib.3 for ; Sat, 05 Apr 2014 05:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=bXFN3tNxOuluhcFqjD5JHxyLA0poSh4PY0Z12JygiAg=; b=gCFYHx05sIdx9ZZa5l9cvA9IE1shBiQNyPvkXCkhzN5ksdH6Mcr/LtLElfuvHXW10B K2xa0vVP4Hw/9zNVkbVA7asMdpTk61el0DFt5q6bY4EOYSppHQkYI2n+TreWn24MhqHG 011+ZSKptcSAn8CY9rVMuz0UfVsYr23hlzLQ9cLDDRcdYjmqfzyTWxmbLaejzCxDPwjP Kbp8AKE3XQN+TGzQgsNVKuvcuxDwksKMJAWCrKRfRMEJDCjngftd7JSmMR5qUxIAmcLr fg1FFIyCz2v60wijRFB3Rg0ubCDFMVnHMgzhjcBZw0TaVSmjiLfKSPTuuUSSb1qYIGSe HfVg== X-Received: by 10.180.189.43 with SMTP id gf11mr11591175wic.32.1396699828369; Sat, 05 Apr 2014 05:10:28 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id u8sm5384084wjq.1.2014.04.05.05.10.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 05 Apr 2014 05:10:27 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 5 Apr 2014 14:10:11 +0200 Message-Id: <73095adccb04f8bc24a6ee28a292c3d5d1cb9b66.1396699629.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: References: Cc: Paul Cercueil , Bernd Kuhls , "Yann E. MORIN" Subject: [Buildroot] [PATCH 07/13] package/mesa3d: simplify the code enabling full-OpenGL X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net From: "Yann E. MORIN" Currently, full-OpenGL is enabled by checking that at least one driver is enabled. This is done by checking that the just-constructed lists of drivers are not empty. But we already have a variable that is set to 'y' as soon as a driver is selected: - DRI drivers select BR2_PACKAGE_MESA3D_DRI_DRIVER - Gallium drivers select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER - both BR2_PACKAGE_MESA3D_DRI_DRIVER and BR2_PACKAGE_MESA3D_GALLIUM_DRIVER select BR2_PACKAGE_MESA3D_DRIVER So, BR2_PACKAGE_MESA3D_DRIVER is set to 'y' as soon as at least one driver is selected. WE can use that variable rather than comparing the lists of drivers. Also, rearrange the code in a more logical way, by moving the code that enables OpenGL nearer to the code enabling EGL and GLES. Signed-off-by: "Yann E. MORIN" Cc: Paul Cercueil Cc: Bernd Kuhls --- package/mesa3d/mesa3d.mk | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk index f40b2ee..511fc51 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk @@ -57,16 +57,6 @@ MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon -# at least one API is required, for buildroot enable OpenGL API by default -# other APIs (EGL, EGL_ES) are optional -ifeq ($(MESA3D_GALLIUM_DRIVERS-y)$(MESA3D_DRI_DRIVERS-y),) -MESA3D_CONF_OPT += \ - --disable-opengl -else -MESA3D_CONF_OPT += \ - --enable-opengl -endif - ifeq ($(MESA3D_GALLIUM_DRIVERS-y),) MESA3D_CONF_OPT += \ --without-gallium-drivers @@ -89,6 +79,14 @@ endif # APIs +# at least one API is required, for buildroot enable OpenGL API by default +# other APIs (EGL, EGL_ES) are optional +ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y) +MESA3D_CONF_OPT += --enable-opengl +else +MESA3D_CONF_OPT += --disable-opengl +endif + ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) # egl depends on gbm, gbm depends on udev MESA3D_DEPENDENCIES += udev