summaryrefslogtreecommitdiffstats
path: root/ui/egl-headless.c
Commit message (Collapse)AuthorAgeFilesLines
* ui: remove gl_ctx_get_currentMarc-André Lureau2021-02-041-1/+0Star
| | | | | | | | There are no users left. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210204105232.834642-7-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ui/egl: fix framebuffer readsGerd Hoffmann2019-09-171-3/+1Star
| | | | | | | | | | | | | | | Fix egl_fb_read() to use the (destination) surface size instead of the (source) framebuffer source for glReadPixels. Pass the DisplaySurface instead of the pixeldata pointer to egl_fb_read() to make this possible. With that in place framebuffer reads work fine even if the surface and framebuffer sizes don't match, so we can remove the guest-triggerable asserts in egl_scanout_flush(). Buglink: https://bugzilla.redhat.com//show_bug.cgi?id=1749659 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20190909073911.24787-1-kraxel@redhat.com
* Include qemu/module.h where needed, drop it from qemu-common.hMarkus Armbruster2019-06-121-1/+1
| | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-4-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for hw/usb/dev-hub.c hw/misc/exynos4210_rng.c hw/misc/bcm2835_rng.c hw/misc/aspeed_scu.c hw/display/virtio-vga.c hw/arm/stm32f205_soc.c; ui/cocoa.m fixed up]
* ui/egl-helpers: Augment parameter list of egl_texture_blend() to convey ↵Chen Zhang2019-02-051-1/+2
| | | | | | | | | | | | scales of viewport This would help gtk-egl display showing scaled DMABuf cursor images when gtk window was zoomed. A default scale of (1.0, 1.0) was presumed for call sites where no scaling is needed. Signed-off-by: Chen Zhang <tgfbeta@me.com> Message-id: 23B229B3-3095-4DFB-8369-866784808D30@me.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* egl-headless: add egl_create_contextGerd Hoffmann2019-01-101-1/+9
| | | | | | | | | | 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: Allow specifying 'rendernode' display option for egl-headlessErik Skultety2018-11-161-1/+1
| | | | | | | | | | | | | As libvirt can't predict which rendernode QEMU would pick, it won't adjust the permissions on the device, hence QEMU getting "Permission denied" when opening the DRI device. Therefore, enable 'rendernode' option for egl-headless display type. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1648236 Signed-off-by: Erik Skultety <eskultet@redhat.com> Message-id: 27f4617f19aa1072114f10f1aa9dd199735ef982.1542362949.git.eskultet@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Add gles support to egl-helpers, wire up in egl-headless and gtk.Gerd Hoffmann2018-06-261-1/+2
| | | | | | | | | | | | | | | | Add support for OpenGL ES to egl-helpers. Wire up the new option for egl-headless and gtk UIs. egl-headless actually works fine. gtk hits a not-yet implemented code path in libEGL when trying to use gles mode: libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering. (This is mesa 17.2.3). Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Message-id: 20180618112141.23398-1-kraxel@redhat.com
* egl-headless: switch over to new display registryGerd Hoffmann2018-03-051-1/+19
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-6-kraxel@redhat.com
* egl-headless: cursor_dmabuf: handle NULL cursorGerd Hoffmann2018-02-221-6/+9
| | | | | | | | The cursor dmabuf can be NULL, in case no cursor defined by the guest. Happens for example when linux guests show the framebuffer console. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180220110433.20353-3-kraxel@redhat.com
* console/opengl: split up dpy_gl_cursor opsGerd Hoffmann2018-02-221-5/+12
| | | | | | | | Split the cursor callback into two, one for setting the dmabuf, one for setting the position. Also add hotspot information. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180220110433.20353-2-kraxel@redhat.com
* egl-headless: use DisplayOptionsGerd Hoffmann2018-02-201-1/+1
| | | | | | | | | Switch egl-headless ui to use qapi DisplayOptions for configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-8-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* egl-headless: add dmabuf supportGerd Hoffmann2017-10-171-2/+57
| | | | | | | Add support for the new dmabuf interface. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20171010135453.6704-7-kraxel@redhat.com
* egl: misc framebuffer helper improvements.Gerd Hoffmann2017-09-291-3/+3
| | | | | | | | | | | Rename the functions to to say "setup" instead of "create" because they support being called multiple times on the same egl framebuffer. Properly delete unused textures, update function interfaces to support this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170927115031.12063-1-kraxel@redhat.com
* egl-headless: use framebuffer helper functions.Gerd Hoffmann2017-06-211-51/+18Star
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170614084149.31314-3-kraxel@redhat.com
* opengl: add egl-headless displayGerd Hoffmann2017-05-121-0/+158
Add egl-headless user interface. It doesn't provide a real user interface, it only provides opengl support using drm render nodes. It will copy back the bits rendered by the guest using virgl back to a DisplaySurface and kick the usual display update code paths, so spice and vnc and screendump can pick it up. Use it this way: qemu -display egl-headless -vnc $display qemu -display egl-headless -spice gl=off,$args Note that you should prefer native spice opengl support (-spice gl=on) if possible because that delivers better performance. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170505104101.30589-7-kraxel@redhat.com