Patchwork [07/12] mesa: enable GLESv2

login
register
mail settings
Submitter Ross Burton
Date Aug. 1, 2012, 12:31 p.m.
Message ID <6d27974b9045ca97ce135095a9d48715ac5bdc6c.1343823907.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/33503/
State New
Headers show

Comments

Ross Burton - Aug. 1, 2012, 12:31 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 |    7 +++++--
 meta/recipes-graphics/mesa/mesa-dri.inc    |    1 +
 2 files changed, 6 insertions(+), 2 deletions(-)
Martin Jansa - Aug. 1, 2012, 12:44 p.m.
On Wed, Aug 01, 2012 at 01:31:13PM +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 |    7 +++++--
>  meta/recipes-graphics/mesa/mesa-dri.inc    |    1 +
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc
> index 01eb5b3..d9758b9 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 python-native flex-native bison-native ${PROTO_DEPS} ${LIB_DEPS}"
>  
> -PROVIDES = "virtual/libgl"
> +PROVIDES = "virtual/libgl virtual/libgles2"

Shouldn't be this provided only for opengles2 in DISTRO_FEATURES?
  
>  # for mesa-dri and mesa-xlib
>  FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
> @@ -46,10 +46,12 @@ PACKAGES =+ "libegl libegl-dev libegl-dbg \
>               libgl libgl-dev \
>               libglapi libglapi-dev libglapi-dbg\
>               libgbm libgbm-dev libgbm-dbg \
> +             libgles2 libgles2-dev \
>              "
>  
>  FILES_libegl = "${libdir}/libEGL.so.* ${libdir}/egl/*.so"
>  FILES_libgbm = "${libdir}/libgbm.so.*"
> +FILES_libgles2 = "${libdir}/libGLESv2.so.*"
>  FILES_libgl = "${libdir}/libGL.so.*"
>  FILES_libglapi = "${libdir}/libglapi.so.*"
>  FILES_libglu = "${libdir}/libGLU.so.*"
> @@ -59,6 +61,7 @@ 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_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..1d325eb 100644
> --- a/meta/recipes-graphics/mesa/mesa-dri.inc
> +++ b/meta/recipes-graphics/mesa/mesa-dri.inc
> @@ -10,6 +10,7 @@ DRIDRIVERS_append_x86-64 = ",i915,i965"
>  
>  EXTRA_OECONF += "--disable-gallium --without-gallium-drivers"
>  EXTRA_OECONF += "--enable-dri --with-dri-drivers=${DRIDRIVERS}"
> +EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'opengles2', '--enable-gles2', '', d)}"

and maybe explicitly disable when isn't if posible or use PACKAGECONFIG?

>  EXTRA_OECONF += "--disable-egl --enable-gbm"
>  
>  python populate_packages_prepend() {
> -- 
> 1.7.10
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Ross Burton - Aug. 1, 2012, 2:53 p.m.
On 1 August 2012 13:44, Martin Jansa <martin.jansa@gmail.com> wrote:
>> +PROVIDES = "virtual/libgl virtual/libgles2"
>
> Shouldn't be this provided only for opengles2 in DISTRO_FEATURES?

I've changed my mind on this -- gles2 is just another library so if it
isn't used on the distro it won't be installed.

Ross
Koen Kooi - Aug. 1, 2012, 3:14 p.m.
Op 1 aug. 2012, om 16:53 heeft "Burton, Ross" <ross.burton@intel.com> het volgende geschreven:

> On 1 August 2012 13:44, Martin Jansa <martin.jansa@gmail.com> wrote:
>>> +PROVIDES = "virtual/libgl virtual/libgles2"
>> 
>> Shouldn't be this provided only for opengles2 in DISTRO_FEATURES?
> 
> I've changed my mind on this -- gles2 is just another library so if it
> isn't used on the distro it won't be installed.

And shouldn't all this be a machine feature? Making it a distro feature is a bit draconian, no?
Ross Burton - Aug. 1, 2012, 3:15 p.m.
On 1 August 2012 16:14, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> I've changed my mind on this -- gles2 is just another library so if it
>> isn't used on the distro it won't be installed.
>
> And shouldn't all this be a machine feature? Making it a distro feature is a bit draconian, no?

It's not a feature in my local branch.

Ross

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc
index 01eb5b3..d9758b9 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 python-native flex-native bison-native ${PROTO_DEPS} ${LIB_DEPS}"
 
-PROVIDES = "virtual/libgl"
+PROVIDES = "virtual/libgl virtual/libgles2"
 
 # for mesa-dri and mesa-xlib
 FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
@@ -46,10 +46,12 @@  PACKAGES =+ "libegl libegl-dev libegl-dbg \
              libgl libgl-dev \
              libglapi libglapi-dev libglapi-dbg\
              libgbm libgbm-dev libgbm-dbg \
+             libgles2 libgles2-dev \
             "
 
 FILES_libegl = "${libdir}/libEGL.so.* ${libdir}/egl/*.so"
 FILES_libgbm = "${libdir}/libgbm.so.*"
+FILES_libgles2 = "${libdir}/libGLESv2.so.*"
 FILES_libgl = "${libdir}/libGL.so.*"
 FILES_libglapi = "${libdir}/libglapi.so.*"
 FILES_libglu = "${libdir}/libGLU.so.*"
@@ -59,6 +61,7 @@  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_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..1d325eb 100644
--- a/meta/recipes-graphics/mesa/mesa-dri.inc
+++ b/meta/recipes-graphics/mesa/mesa-dri.inc
@@ -10,6 +10,7 @@  DRIDRIVERS_append_x86-64 = ",i915,i965"
 
 EXTRA_OECONF += "--disable-gallium --without-gallium-drivers"
 EXTRA_OECONF += "--enable-dri --with-dri-drivers=${DRIDRIVERS}"
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'opengles2', '--enable-gles2', '', d)}"
 EXTRA_OECONF += "--disable-egl --enable-gbm"
 
 python populate_packages_prepend() {