Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] mesa: Improve Khronos header handling
@ 2017-07-12 12:11 Jussi Kukkonen
  2017-07-12 12:11 ` [PATCH 1/2] mesa: Avoid installing khrplatfrom.h when not needed Jussi Kukkonen
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jussi Kukkonen @ 2017-07-12 12:11 UTC (permalink / raw)
  To: openembedded-core, gizero, otavio

Andrea: can you please confirm if this fixes the issue with
meta-raspberrypi (the second patch is just cosmetic)?

This should fix mesa-gl and RPi userland conflict by not installing
khrplatform.h in mesa-gl. I decided to do an actual mesa patch instead
of a do_install_append() based on positive comments from upstream.

As a side note: the header is now installed in libegl-mesa-dev which
is not really correct. I'll see about fixing this in a later patch.

Cheers,
  Jussi

The following changes since commit 81498aac9560fbeaeb58eaada32ce80e0ea51628:

  yocto-project-qs: Updated Next Steps list (2017-07-12 00:28:16 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib jku/khr-headers
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/khr-headers

Jussi Kukkonen (2):
  mesa: Avoid installing khrplatfrom.h when not needed
  mesa-gl: Clean recipe

 ...ly-install-khrplatform.h-with-EGL-or-GLES.patch | 52 ++++++++++++++++++++++
 meta/recipes-graphics/mesa/mesa-gl_17.1.4.bb       |  4 --
 meta/recipes-graphics/mesa/mesa_17.1.4.bb          |  1 +
 3 files changed, 53 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-graphics/mesa/files/0001-mapi-Only-install-khrplatform.h-with-EGL-or-GLES.patch

-- 
2.1.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] mesa: Avoid installing khrplatfrom.h when not needed
  2017-07-12 12:11 [PATCH 0/2] mesa: Improve Khronos header handling Jussi Kukkonen
@ 2017-07-12 12:11 ` Jussi Kukkonen
  2017-07-12 12:38   ` Otavio Salvador
  2017-07-12 12:11 ` [PATCH 2/2] mesa-gl: Clean recipe Jussi Kukkonen
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Jussi Kukkonen @ 2017-07-12 12:11 UTC (permalink / raw)
  To: openembedded-core, gizero, otavio

Fix the conflict between mesa and userland (when former is used to
provide GL and letter used to provide EGL+GLES) by not installing
khrplatform.h header when its not needed.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 ...ly-install-khrplatform.h-with-EGL-or-GLES.patch | 52 ++++++++++++++++++++++
 meta/recipes-graphics/mesa/mesa_17.1.4.bb          |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/files/0001-mapi-Only-install-khrplatform.h-with-EGL-or-GLES.patch

diff --git a/meta/recipes-graphics/mesa/files/0001-mapi-Only-install-khrplatform.h-with-EGL-or-GLES.patch b/meta/recipes-graphics/mesa/files/0001-mapi-Only-install-khrplatform.h-with-EGL-or-GLES.patch
new file mode 100644
index 0000000..be61e2e
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-mapi-Only-install-khrplatform.h-with-EGL-or-GLES.patch
@@ -0,0 +1,52 @@
+From 922cb47a5b950ee5545a7a3cb4cd9a88a8b15054 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 12 Jul 2017 12:21:29 +0300
+Subject: [PATCH] mapi: Only install khrplatform.h with EGL or GLES
+
+When mesa is built with "--disable-egl --disable-gles1
+--disable-gles2" the KHR platform headers are not needed.
+
+Not installing the header when not needed allows using mesa for GL
+and another implementation for GLES+EGL (as is done in practice with
+userland on raspberrypi).
+
+Upstream-Status: Pending [waiting for test results before sending]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ src/mapi/Makefile.am | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am
+index 9ff70a14fd..94c77fb82c 100644
+--- a/src/mapi/Makefile.am
++++ b/src/mapi/Makefile.am
+@@ -188,6 +188,8 @@ es1api_libGLESv1_CM_la_LDFLAGS = \
+ 	$(LD_NO_UNDEFINED)
+ 
+ es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la
++
++khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
+ endif
+ 
+ es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
+@@ -233,6 +235,12 @@ es2api_libGLESv2_la_LDFLAGS = \
+ 	$(LD_NO_UNDEFINED)
+ 
+ es2api_libGLESv2_la_LIBADD += shared-glapi/libglapi.la
++
++khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
++endif
++
++if HAVE_EGL
++khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
+ endif
+ 
+ es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
+@@ -243,4 +251,3 @@ es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
+ include $(top_srcdir)/install-lib-links.mk
+ 
+ khrdir = $(includedir)/KHR
+-khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
+-- 
+2.13.2
+
diff --git a/meta/recipes-graphics/mesa/mesa_17.1.4.bb b/meta/recipes-graphics/mesa/mesa_17.1.4.bb
index 3289cd6..2257045 100644
--- a/meta/recipes-graphics/mesa/mesa_17.1.4.bb
+++ b/meta/recipes-graphics/mesa/mesa_17.1.4.bb
@@ -6,6 +6,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://etnaviv_fix-shader-miscompilation.patch \
            file://0001-Use-wayland-scanner-in-the-path.patch \
            file://0002-hardware-gloat.patch \
+           file://0001-mapi-Only-install-khrplatform.h-with-EGL-or-GLES.patch \
 "
 
 SRC_URI[md5sum] = "be2ef7c9edec23b07f74f6512a6a6fa5"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] mesa-gl: Clean recipe
  2017-07-12 12:11 [PATCH 0/2] mesa: Improve Khronos header handling Jussi Kukkonen
  2017-07-12 12:11 ` [PATCH 1/2] mesa: Avoid installing khrplatfrom.h when not needed Jussi Kukkonen
@ 2017-07-12 12:11 ` Jussi Kukkonen
  2017-07-12 14:23 ` [PATCH 0/2] mesa: Improve Khronos header handling Andrea Galbusera
  2017-07-12 16:37 ` Khem Raj
  3 siblings, 0 replies; 6+ messages in thread
From: Jussi Kukkonen @ 2017-07-12 12:11 UTC (permalink / raw)
  To: openembedded-core, gizero, otavio

Don't EXCLUDE_FROM_WORLD, mesa.inc already does this.
Don't add a non-existing path to FILESEXTRAPATHS.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-graphics/mesa/mesa-gl_17.1.4.bb | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa-gl_17.1.4.bb b/meta/recipes-graphics/mesa/mesa-gl_17.1.4.bb
index e3604f3..b9e3b80 100644
--- a/meta/recipes-graphics/mesa/mesa-gl_17.1.4.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl_17.1.4.bb
@@ -2,12 +2,8 @@ require mesa_${PV}.bb
 
 SUMMARY += " (OpenGL only, no EGL/GLES)"
 
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/mesa:"
-
 PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
 PACKAGECONFIG ??= "dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-
-EXCLUDE_FROM_WORLD = "1"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] mesa: Avoid installing khrplatfrom.h when not needed
  2017-07-12 12:11 ` [PATCH 1/2] mesa: Avoid installing khrplatfrom.h when not needed Jussi Kukkonen
@ 2017-07-12 12:38   ` Otavio Salvador
  0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2017-07-12 12:38 UTC (permalink / raw)
  To: Jussi Kukkonen
  Cc: Otavio Salvador, Patches and discussions about the oe-core layer

On Wed, Jul 12, 2017 at 9:11 AM, Jussi Kukkonen
<jussi.kukkonen@intel.com> wrote:
> Fix the conflict between mesa and userland (when former is used to
> provide GL and letter used to provide EGL+GLES) by not installing
> khrplatform.h header when its not needed.
>
> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>

It is fine; if Andrea could test it would be good.


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] mesa: Improve Khronos header handling
  2017-07-12 12:11 [PATCH 0/2] mesa: Improve Khronos header handling Jussi Kukkonen
  2017-07-12 12:11 ` [PATCH 1/2] mesa: Avoid installing khrplatfrom.h when not needed Jussi Kukkonen
  2017-07-12 12:11 ` [PATCH 2/2] mesa-gl: Clean recipe Jussi Kukkonen
@ 2017-07-12 14:23 ` Andrea Galbusera
  2017-07-12 16:37 ` Khem Raj
  3 siblings, 0 replies; 6+ messages in thread
From: Andrea Galbusera @ 2017-07-12 14:23 UTC (permalink / raw)
  To: Jussi Kukkonen
  Cc: Otavio Salvador, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

Il 12 lug 2017 2:11 PM, "Jussi Kukkonen" <jussi.kukkonen@intel.com> ha
scritto:

Andrea: can you please confirm if this fixes the issue with
meta-raspberrypi (the second patch is just cosmetic)?


I'll give it a spin as soon as I find some spare cycles! BTW, thank you
guys for looking into it!


This should fix mesa-gl and RPi userland conflict by not installing
khrplatform.h in mesa-gl. I decided to do an actual mesa patch instead
of a do_install_append() based on positive comments from upstream.

As a side note: the header is now installed in libegl-mesa-dev which
is not really correct. I'll see about fixing this in a later patch.

Cheers,
  Jussi

The following changes since commit 81498aac9560fbeaeb58eaada32ce80e0ea51628:

  yocto-project-qs: Updated Next Steps list (2017-07-12 00:28:16 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib jku/khr-headers
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/khr-headers

Jussi Kukkonen (2):
  mesa: Avoid installing khrplatfrom.h when not needed
  mesa-gl: Clean recipe

 ...ly-install-khrplatform.h-with-EGL-or-GLES.patch | 52
++++++++++++++++++++++
 meta/recipes-graphics/mesa/mesa-gl_17.1.4.bb       |  4 --
 meta/recipes-graphics/mesa/mesa_17.1.4.bb          |  1 +
 3 files changed, 53 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-graphics/mesa/files/0001-mapi-Only-install-
khrplatform.h-with-EGL-or-GLES.patch

--
2.1.4

[-- Attachment #2: Type: text/html, Size: 2656 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] mesa: Improve Khronos header handling
  2017-07-12 12:11 [PATCH 0/2] mesa: Improve Khronos header handling Jussi Kukkonen
                   ` (2 preceding siblings ...)
  2017-07-12 14:23 ` [PATCH 0/2] mesa: Improve Khronos header handling Andrea Galbusera
@ 2017-07-12 16:37 ` Khem Raj
  3 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2017-07-12 16:37 UTC (permalink / raw)
  To: Jussi Kukkonen
  Cc: Otavio Salvador, Patches and discussions about the oe-core layer

On Wed, Jul 12, 2017 at 5:11 AM, Jussi Kukkonen
<jussi.kukkonen@intel.com> wrote:
> Andrea: can you please confirm if this fixes the issue with
> meta-raspberrypi (the second patch is just cosmetic)?
>
> This should fix mesa-gl and RPi userland conflict by not installing
> khrplatform.h in mesa-gl. I decided to do an actual mesa patch instead
> of a do_install_append() based on positive comments from upstream.
>
> As a side note: the header is now installed in libegl-mesa-dev which
> is not really correct. I'll see about fixing this in a later patch.
>

you might have to express dependencies on it explicitly, so it get included
into rootfs. but it looks a good solution for now.

> Cheers,
>   Jussi
>
> The following changes since commit 81498aac9560fbeaeb58eaada32ce80e0ea51628:
>
>   yocto-project-qs: Updated Next Steps list (2017-07-12 00:28:16 +0100)
>
> are available in the git repository at:
>
>   git://git.yoctoproject.org/poky-contrib jku/khr-headers
>   http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/khr-headers
>
> Jussi Kukkonen (2):
>   mesa: Avoid installing khrplatfrom.h when not needed
>   mesa-gl: Clean recipe
>
>  ...ly-install-khrplatform.h-with-EGL-or-GLES.patch | 52 ++++++++++++++++++++++
>  meta/recipes-graphics/mesa/mesa-gl_17.1.4.bb       |  4 --
>  meta/recipes-graphics/mesa/mesa_17.1.4.bb          |  1 +
>  3 files changed, 53 insertions(+), 4 deletions(-)
>  create mode 100644 meta/recipes-graphics/mesa/files/0001-mapi-Only-install-khrplatform.h-with-EGL-or-GLES.patch
>
> --
> 2.1.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-07-12 16:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 12:11 [PATCH 0/2] mesa: Improve Khronos header handling Jussi Kukkonen
2017-07-12 12:11 ` [PATCH 1/2] mesa: Avoid installing khrplatfrom.h when not needed Jussi Kukkonen
2017-07-12 12:38   ` Otavio Salvador
2017-07-12 12:11 ` [PATCH 2/2] mesa-gl: Clean recipe Jussi Kukkonen
2017-07-12 14:23 ` [PATCH 0/2] mesa: Improve Khronos header handling Andrea Galbusera
2017-07-12 16:37 ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox