egl-headless: add egl_create_context
PATCH 1/1 egl-headless: add egl_create_context
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.
--- ui/egl-headless.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
ui/egl-headless.c +9 -1
@@ -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,
Signature · 1 line
2.9.3
Quoted 9 lines · Gerd Hoffmann
We must set the correct context (via eglMakeCurrent) before calling
qemu_egl_create_context, so we need a thin wrapper and can't hookqemu_egl_create_contextdirectly as ->dpy_gl_ctx_create callback.Reported-by Frederik Carlier <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- ui/egl-headless.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
How severe is this? Is it something that would warrant 3.1-rc4, or are we safe deferring it to 4.0?
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 5 lines · Eric Blake
Quoted 4 lines · Gerd Hoffmann
We must set the correct context (via eglMakeCurrent) before calling
qemu_egl_create_context, so we need a thin wrapper and can't hookqemu_egl_create_contextdirectly as ->dpy_gl_ctx_create callback.
Quoted 8 lines
Quoted 5 lines
Reported-by Frederik Carlier <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- ui/egl-headless.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)How severe is this? Is it something that would warrant 3.1-rc4, or are we safe deferring it to 4.0?
Fixes segfaults (should probably update the commit message to say so), therefore 3.1 material IMHO.
cheers,
Gerd
Quoted 13 lines · Gerd Hoffmann
Quoted 11 lines · Eric Blake
Quoted 9 lines · Gerd Hoffmann
We must set the correct context (via eglMakeCurrent) before calling
qemu_egl_create_context, so we need a thin wrapper and can't hookqemu_egl_create_contextdirectly as ->dpy_gl_ctx_create callback.Reported-by Frederik Carlier <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- ui/egl-headless.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines
How severe is this? Is it something that would warrant 3.1-rc4, or are we safe deferring it to 4.0?
Fixes segfaults (should probably update the commit message to say so), therefore 3.1 material IMHO.
Original reporter seems to be saying in the bug report that this doesn't actually fix his bug ?
Is this a regression from 3.0? It doesn't look like it from a quick look at the git history, so given that plus the uncertainty about whether it's actually fixing the bug I'm inclined to defer this to 4.0.
thanks
-- PMM