From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [Qemu-devel] [PULL 1/8] egl-headless: add egl_create_context
Date: Thu, 10 Jan 2019 09:47:45 +0100 [thread overview]
Message-ID: <20190110084752.30510-2-kraxel@redhat.com> (raw)
In-Reply-To: <20190110084752.30510-1-kraxel@redhat.com>
We must set the correct context (via eglMakeCurrent) before
calling qemu_egl_create_context, so we need a thin wrapper and can't
hook qemu_egl_create_context directly as ->dpy_gl_ctx_create callback.
Reported-by: Frederik Carlier <frederik.carlier@quamotion.mobi>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20181129123502.30129-1-kraxel@redhat.com
---
ui/egl-headless.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/ui/egl-headless.c b/ui/egl-headless.c
index 4cf3bbc0e4..519e7bad32 100644
--- a/ui/egl-headless.c
+++ b/ui/egl-headless.c
@@ -38,6 +38,14 @@ static void egl_gfx_switch(DisplayChangeListener *dcl,
edpy->ds = new_surface;
}
+static QEMUGLContext egl_create_context(DisplayChangeListener *dcl,
+ QEMUGLParams *params)
+{
+ eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
+ qemu_egl_rn_ctx);
+ return qemu_egl_create_context(dcl, params);
+}
+
static void egl_scanout_disable(DisplayChangeListener *dcl)
{
egl_dpy *edpy = container_of(dcl, egl_dpy, dcl);
@@ -150,7 +158,7 @@ static const DisplayChangeListenerOps egl_ops = {
.dpy_gfx_update = egl_gfx_update,
.dpy_gfx_switch = egl_gfx_switch,
- .dpy_gl_ctx_create = qemu_egl_create_context,
+ .dpy_gl_ctx_create = egl_create_context,
.dpy_gl_ctx_destroy = qemu_egl_destroy_context,
.dpy_gl_ctx_make_current = qemu_egl_make_context_current,
.dpy_gl_ctx_get_current = qemu_egl_get_current_context,
--
2.9.3
next prev parent reply other threads:[~2019-01-10 8:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 8:47 [Qemu-devel] [PULL 0/8] Ui 20190110 patches Gerd Hoffmann
2019-01-10 8:47 ` Gerd Hoffmann [this message]
2019-01-10 8:47 ` [Qemu-devel] [PULL 2/8] configure: bump spice-server required version to 0.12.5 Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 3/8] ui/console: Remove qemu_create_display_surface_guestmem() Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 4/8] keymaps: remove modifiers include Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 5/8] keymaps: drop nl-be map Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 6/8] keymaps: remove common include Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 7/8] keymaps: drop support for include files Gerd Hoffmann
2019-01-10 8:47 ` [Qemu-devel] [PULL 8/8] spice: Remove unused include Gerd Hoffmann
2019-01-11 14:10 ` Philippe Mathieu-Daudé
2019-01-10 17:49 ` [Qemu-devel] [PULL 0/8] Ui 20190110 patches Peter Maydell
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=20190110084752.30510-2-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).