Patchwork [4/8] mesa: enable GLES v1 and v2

login
register
mail settings
Submitter Ross Burton
Date Aug. 13, 2012, 6:58 p.m.
Message ID <b34f64c55847fdc3bae12b7954e4ad9f90a6f2b9.1344884283.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/34353/
State Accepted
Commit d755fff9c9939cebab9c488c7b14de0a57235d3c
Headers show

Comments

Ross Burton - Aug. 13, 2012, 6:58 p.m.
Patch originally by Damien Lespiau <damien.lespiau@intel.com>.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-graphics/mesa/mesa-common.inc |   12 ++++++++++--
 meta/recipes-graphics/mesa/mesa-dri.inc    |    2 ++
 2 files changed, 12 insertions(+), 2 deletions(-)
Richard Purdie - Aug. 19, 2012, 9:51 a.m.
On Mon, 2012-08-13 at 19:58 +0100, Ross Burton wrote:
> Patch originally by Damien Lespiau <damien.lespiau@intel.com>.
> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/recipes-graphics/mesa/mesa-common.inc |   12 ++++++++++--
>  meta/recipes-graphics/mesa/mesa-dri.inc    |    2 ++
>  2 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc
> index aac3bbe..24cc3d0 100644
> --- a/meta/recipes-graphics/mesa/mesa-common.inc
> +++ b/meta/recipes-graphics/mesa/mesa-common.inc
> @@ -12,7 +12,7 @@ SECTION = "x11"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67"
>  
> -INC_PR = "r0"
> +INC_PR = "r1"
>  PE = "2"
>  
> 
> @@ -21,7 +21,7 @@ LIB_DEPS = "virtual/libx11 libxext libxxf86vm libxdamage libxfixes libxml2-nativ
>  
>  DEPENDS = "makedepend-native flex-native bison-native ${PROTO_DEPS} ${LIB_DEPS}"
>  
> -PROVIDES = "virtual/libgl"
> +PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2"
>  
>  # for mesa-dri and mesa-xlib
>  FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
> @@ -34,6 +34,8 @@ EXTRA_OECONF = "--enable-glu \
>                  --enable-glx-tls \
>                  --enable-shared-glapi"
>  
> +PACKAGECONFIG ??= "${@base_contains('MACHINE_FEATURES', 'x86', 'gles', '', d)}"


I've taken this but could we change this to:

PACKAGECONFIG ??= ""
PACKAGECONFIG_x86 ?= "gles"

since I'd prefer to rely on the architecture override than the
MACHINE_FEATURES. This recipe shouldn't be machine specific if we can
help it.

Cheers,

Richard

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc
index aac3bbe..24cc3d0 100644
--- a/meta/recipes-graphics/mesa/mesa-common.inc
+++ b/meta/recipes-graphics/mesa/mesa-common.inc
@@ -12,7 +12,7 @@  SECTION = "x11"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67"
 
-INC_PR = "r0"
+INC_PR = "r1"
 PE = "2"
 
 
@@ -21,7 +21,7 @@  LIB_DEPS = "virtual/libx11 libxext libxxf86vm libxdamage libxfixes libxml2-nativ
 
 DEPENDS = "makedepend-native flex-native bison-native ${PROTO_DEPS} ${LIB_DEPS}"
 
-PROVIDES = "virtual/libgl"
+PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2"
 
 # for mesa-dri and mesa-xlib
 FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
@@ -34,6 +34,8 @@  EXTRA_OECONF = "--enable-glu \
                 --enable-glx-tls \
                 --enable-shared-glapi"
 
+PACKAGECONFIG ??= "${@base_contains('MACHINE_FEATURES', 'x86', 'gles', '', d)}"
+
 # Multiple virtual/gl providers being built breaks staging
 EXCLUDE_FROM_WORLD = "1"
 
@@ -46,10 +48,14 @@  PACKAGES =+ "libegl libegl-dev libegl-dbg \
              libgl libgl-dev \
              libglapi libglapi-dev \
              libgbm libgbm-dev \
+             libgles1 libgles1-dev \
+             libgles2 libgles2-dev \
             "
 
 FILES_libegl = "${libdir}/libEGL.so.* ${libdir}/egl/*.so"
 FILES_libgbm = "${libdir}/libgbm.so.*"
+FILES_libgles1 = "${libdir}/libGLESv1*.so.*"
+FILES_libgles2 = "${libdir}/libGLESv2.so.*"
 FILES_libgl = "${libdir}/libGL.so.*"
 FILES_libglapi = "${libdir}/libglapi.so.*"
 FILES_libglu = "${libdir}/libGLU.so.*"
@@ -59,6 +65,8 @@  FILES_libegl-dev = "${libdir}/libEGL.* ${includedir}/EGL"
 FILES_libgbm-dev = "${libdir}/libgbm* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
 FILES_libgl-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
 FILES_libglapi-dev = "${libdir}/libglapi.*"
+FILES_libgles1-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
+FILES_libgles2-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
 FILES_libglu-dev = "${libdir}/libGLU.* ${includedir}/GL/glu*.h ${libdir}/pkgconfig/glu.pc"
 FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h"
 
diff --git a/meta/recipes-graphics/mesa/mesa-dri.inc b/meta/recipes-graphics/mesa/mesa-dri.inc
index f8f1fff..32ca4b2 100644
--- a/meta/recipes-graphics/mesa/mesa-dri.inc
+++ b/meta/recipes-graphics/mesa/mesa-dri.inc
@@ -12,6 +12,8 @@  EXTRA_OECONF += "--disable-gallium --without-gallium-drivers"
 EXTRA_OECONF += "--enable-dri --with-dri-drivers=${DRIDRIVERS}"
 EXTRA_OECONF += "--disable-egl --enable-gbm"
 
+PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
+
 python populate_packages_prepend() {
     dri_drivers_root = os.path.join(d.getVar('libdir', True), "dri")