All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denys@ti.com>
To: Eric Ruei <e-ruei1@ti.com>
Cc: meta-arago@arago-project.org
Subject: Re: [PATCH 1/4] gtk+3: update wayland dependency and add patches
Date: Tue, 21 Aug 2018 15:48:38 -0400	[thread overview]
Message-ID: <20180821194838.GQ29422@beryl> (raw)
In-Reply-To: <1534879768-59124-2-git-send-email-e-ruei1@ti.com>

On Tue, Aug 21, 2018 at 03:29:25PM -0400, Eric Ruei wrote:
> - replace wayland dependency mesa with virtual/egl

In the past we were using libgbm instead of virtual/egl
http://arago-project.org/git/?p=meta-arago.git;a=blob;f=meta-arago-distro/recipes-graphics/wayland/weston_4.0.0.bbappend;hb=HEAD
http://arago-project.org/git/?p=meta-arago.git;a=blob;f=meta-arago-distro/recipes-gnome/gtk%2B/gtk%2B3_%25.bbappend;hb=HEAD


> - patch to fix egl API calls for GLES2
> 
> Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> ---
>  ...t-wayland.c-cleanup-the-parameters-of-egl.patch | 61 ++++++++++++++++++++++
>  .../recipes-gnome/gtk+/gtk+3_%.bbappend            | 10 ++++
>  2 files changed, 71 insertions(+)
>  create mode 100644 meta-arago-distro/recipes-gnome/gtk+/gtk+3/0001-gdkglcontext-wayland.c-cleanup-the-parameters-of-egl.patch
>  create mode 100644 meta-arago-distro/recipes-gnome/gtk+/gtk+3_%.bbappend
> 
> diff --git a/meta-arago-distro/recipes-gnome/gtk+/gtk+3/0001-gdkglcontext-wayland.c-cleanup-the-parameters-of-egl.patch b/meta-arago-distro/recipes-gnome/gtk+/gtk+3/0001-gdkglcontext-wayland.c-cleanup-the-parameters-of-egl.patch
> new file mode 100644
> index 0000000..174dbdd
> --- /dev/null
> +++ b/meta-arago-distro/recipes-gnome/gtk+/gtk+3/0001-gdkglcontext-wayland.c-cleanup-the-parameters-of-egl.patch
> @@ -0,0 +1,61 @@
> +From d4c8511b845de02271b6dcf57a6edbf01f3f1905 Mon Sep 17 00:00:00 2001
> +From: Eric Ruei <e-ruei1@ti.com>
> +Date: Tue, 21 Aug 2018 11:07:13 -0400
> +Subject: [PATCH] gdkglcontext-wayland.c: cleanup the parameters of egl API
> + calls when GLES is used
> +
> +eglBindAPI: use EGL_OPENGL_ES_API instead of EGL_OPENGL_API
> +eglChooseConfig: need to specify EGL_OPENGL_ES2_BIT as EGL_RENDERABLE_TYPE
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> +---
> + gdk/wayland/gdkglcontext-wayland.c | 10 +++++++++-
> + 1 file changed, 9 insertions(+), 1 deletion(-)
> +
> +diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c
> +index 254900d..3361eb3 100644
> +--- a/gdk/wayland/gdkglcontext-wayland.c
> ++++ b/gdk/wayland/gdkglcontext-wayland.c
> +@@ -314,6 +314,7 @@ gdk_wayland_display_init_gl (GdkDisplay *display)
> +   GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
> +   EGLint major, minor;
> +   EGLDisplay dpy;
> ++  gboolean use_es = (_gdk_gl_flags & GDK_GL_GLES) != 0 ;
> + 
> +   if (display_wayland->have_egl)
> +     return TRUE;
> +@@ -326,7 +327,7 @@ gdk_wayland_display_init_gl (GdkDisplay *display)
> +   if (!eglInitialize (dpy, &major, &minor))
> +     return FALSE;
> + 
> +-  if (!eglBindAPI (EGL_OPENGL_API))
> ++  if (!eglBindAPI (use_es?EGL_OPENGL_ES_API:EGL_OPENGL_API))
> +     return FALSE;
> + 
> +   display_wayland->egl_display = dpy;
> +@@ -379,6 +380,7 @@ find_eglconfig_for_window (GdkWindow  *window,
> +   EGLint count;
> +   EGLConfig *configs, chosen_config;
> +   gboolean use_rgba;
> ++  gboolean use_es = (_gdk_gl_flags & GDK_GL_GLES) != 0 ;
> + 
> +   int i = 0;
> + 
> +@@ -395,6 +397,12 @@ find_eglconfig_for_window (GdkWindow  *window,
> +   attrs[i++] = EGL_BLUE_SIZE;
> +   attrs[i++] = 1;
> + 
> ++  if (use_es)
> ++    {
> ++      attrs[i++] = EGL_RENDERABLE_TYPE;
> ++      attrs[i++] = EGL_OPENGL_ES2_BIT;
> ++    }
> ++
> +   use_rgba = (visual == gdk_screen_get_rgba_visual (gdk_display_get_default_screen (display)));
> + 
> +   if (use_rgba)
> +-- 
> +1.9.1
> +
> diff --git a/meta-arago-distro/recipes-gnome/gtk+/gtk+3_%.bbappend b/meta-arago-distro/recipes-gnome/gtk+/gtk+3_%.bbappend
> new file mode 100644
> index 0000000..d3fe505
> --- /dev/null
> +++ b/meta-arago-distro/recipes-gnome/gtk+/gtk+3_%.bbappend
> @@ -0,0 +1,10 @@
> +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> +
> +PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl wayland-native"
> +GTKGLIBC_RRECOMMENDS = "${GTKBASE_RRECOMMENDS}"
> +
> +PR_append = ".arago0"
> +
> +SRC_URI += "\
> +    file://0001-gdkglcontext-wayland.c-cleanup-the-parameters-of-egl.patch \
> +"
> -- 
> 1.9.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


  reply	other threads:[~2018-08-21 19:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21 19:29 [PATCH 0/4] Enable GTK+3 Eric Ruei
2018-08-21 19:29 ` [PATCH 1/4] gtk+3: update wayland dependency and add patches Eric Ruei
2018-08-21 19:48   ` Denys Dmytriyenko [this message]
2018-08-21 20:38     ` Ruei, Eric
2018-08-21 21:00       ` Denys Dmytriyenko
2018-08-21 21:27         ` Ruei, Eric
2018-08-21 21:29           ` Denys Dmytriyenko
2018-08-21 21:34             ` Denys Dmytriyenko
2018-08-21 19:29 ` [PATCH 2/4] packagegroup-arago-gtk: add package group files for GTK Eric Ruei
2018-08-21 19:29 ` [PATCH 3/4] tisdk-roofs-image: add the GTK packagegroup Eric Ruei
2018-08-21 19:49   ` Denys Dmytriyenko
2018-08-21 20:39     ` Ruei, Eric
2018-08-21 19:29 ` [PATCH 4/4] packagegroup-arago-toolchain-tidsk-target: add " Eric Ruei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180821194838.GQ29422@beryl \
    --to=denys@ti.com \
    --cc=e-ruei1@ti.com \
    --cc=meta-arago@arago-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.