diff options
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch | 50 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu_3.1.0.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch b/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch new file mode 100644 index 0000000000..d9326c017a --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From 952e5d584f5aabe41298c278065fe628f3f7aa7a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gerd Hoffmann <kraxel@redhat.com> | ||
| 3 | Date: Thu, 29 Nov 2018 13:35:02 +0100 | ||
| 4 | Subject: [PATCH] egl-headless: add egl_create_context | ||
| 5 | |||
| 6 | We must set the correct context (via eglMakeCurrent) before | ||
| 7 | calling qemu_egl_create_context, so we need a thin wrapper and can't | ||
| 8 | hook qemu_egl_create_context directly as ->dpy_gl_ctx_create callback. | ||
| 9 | |||
| 10 | Reported-by: Frederik Carlier <frederik.carlier@quamotion.mobi> | ||
| 11 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
| 12 | Message-id: 20181129123502.30129-1-kraxel@redhat.com | ||
| 13 | |||
| 14 | Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=952e5d584f5aabe41298c278065fe628f3f7aa7a] | ||
| 15 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 16 | --- | ||
| 17 | ui/egl-headless.c | 10 +++++++++- | ||
| 18 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/ui/egl-headless.c b/ui/egl-headless.c | ||
| 21 | index 4cf3bbc0e4..519e7bad32 100644 | ||
| 22 | --- a/ui/egl-headless.c | ||
| 23 | +++ b/ui/egl-headless.c | ||
| 24 | @@ -38,6 +38,14 @@ static void egl_gfx_switch(DisplayChangeListener *dcl, | ||
| 25 | edpy->ds = new_surface; | ||
| 26 | } | ||
| 27 | |||
| 28 | +static QEMUGLContext egl_create_context(DisplayChangeListener *dcl, | ||
| 29 | + QEMUGLParams *params) | ||
| 30 | +{ | ||
| 31 | + eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, | ||
| 32 | + qemu_egl_rn_ctx); | ||
| 33 | + return qemu_egl_create_context(dcl, params); | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | static void egl_scanout_disable(DisplayChangeListener *dcl) | ||
| 37 | { | ||
| 38 | egl_dpy *edpy = container_of(dcl, egl_dpy, dcl); | ||
| 39 | @@ -150,7 +158,7 @@ static const DisplayChangeListenerOps egl_ops = { | ||
| 40 | .dpy_gfx_update = egl_gfx_update, | ||
| 41 | .dpy_gfx_switch = egl_gfx_switch, | ||
| 42 | |||
| 43 | - .dpy_gl_ctx_create = qemu_egl_create_context, | ||
| 44 | + .dpy_gl_ctx_create = egl_create_context, | ||
| 45 | .dpy_gl_ctx_destroy = qemu_egl_destroy_context, | ||
| 46 | .dpy_gl_ctx_make_current = qemu_egl_make_context_current, | ||
| 47 | .dpy_gl_ctx_get_current = qemu_egl_get_current_context, | ||
| 48 | -- | ||
| 49 | 2.17.1 | ||
| 50 | |||
diff --git a/meta/recipes-devtools/qemu/qemu_3.1.0.bb b/meta/recipes-devtools/qemu/qemu_3.1.0.bb index cd7cd67a3f..ea4277edde 100644 --- a/meta/recipes-devtools/qemu/qemu_3.1.0.bb +++ b/meta/recipes-devtools/qemu/qemu_3.1.0.bb | |||
| @@ -22,6 +22,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
| 22 | file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ | 22 | file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ |
| 23 | file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \ | 23 | file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \ |
| 24 | file://0001-Add-a-missing-X11-include.patch \ | 24 | file://0001-Add-a-missing-X11-include.patch \ |
| 25 | file://0001-egl-headless-add-egl_create_context.patch \ | ||
| 25 | " | 26 | " |
| 26 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 27 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
| 27 | 28 | ||
