diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-02-23 16:14:17 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-02-23 16:14:17 +0000 |
commit | 1b1624092d1f1f746adea6e1237a07f6788c2e3d (patch) | |
tree | 3dab4aad5542d376ee78ecfb79c14df12d9a7123 /include/ui | |
parent | 3174c64bb7140d847bec33b14d52821d0a8df04d (diff) | |
parent | b82fc321bf02aaceea0beb4dfabb4ca86a9a5ff6 (diff) |
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20160223-1' into staging
spice: initial opengl/virgl support, postcopy migration fix.
# gpg: Signature made Tue 23 Feb 2016 12:30:40 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/spice/tags/pull-spice-20160223-1:
Postcopy+spice: Pass spice migration data earlier
spice/gl: tweak debug messages.
spice/gl: add unblock timer
spice: add opengl/virgl/dmabuf support
spice: reset cursor on resize
egl-helpers: add functions for render nodes and dma-buf passing
configure: add dma-buf support detection.
spice: init dcl before registering qxl interface
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/egl-helpers.h | 13 | ||||
-rw-r--r-- | include/ui/spice-display.h | 16 |
2 files changed, 29 insertions, 0 deletions
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index 8c84398001..03fcf4bba2 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -3,10 +3,23 @@ #include <epoxy/gl.h> #include <epoxy/egl.h> +#include <gbm.h> extern EGLDisplay *qemu_egl_display; extern EGLConfig qemu_egl_config; +#ifdef CONFIG_OPENGL_DMABUF + +extern int qemu_egl_rn_fd; +extern struct gbm_device *qemu_egl_rn_gbm_dev; +extern EGLContext qemu_egl_rn_ctx; + +int qemu_egl_rendernode_open(void); +int egl_rendernode_init(void); +int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc); + +#endif + EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win); int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug); diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h index b25328a6ba..69a222b543 100644 --- a/include/ui/spice-display.h +++ b/include/ui/spice-display.h @@ -24,6 +24,14 @@ #include "ui/console.h" #include "sysemu/sysemu.h" +#if defined(CONFIG_OPENGL_DMABUF) +# if SPICE_SERVER_VERSION >= 0x000d00 /* release 0.13.0 */ +# define HAVE_SPICE_GL 1 +# include "ui/egl-helpers.h" +# include "ui/egl-context.h" +# endif +#endif + #define NUM_MEMSLOTS 8 #define MEMSLOT_GENERATION_BITS 8 #define MEMSLOT_SLOT_BITS 8 @@ -50,6 +58,7 @@ enum { QXL_COOKIE_TYPE_IO, QXL_COOKIE_TYPE_RENDER_UPDATE_AREA, QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG, + QXL_COOKIE_TYPE_GL_DRAW_DONE, }; typedef struct QXLCookie { @@ -104,6 +113,13 @@ struct SimpleSpiceDisplay { QEMUCursor *cursor; int mouse_x, mouse_y; QEMUBH *cursor_bh; + +#ifdef HAVE_SPICE_GL + /* opengl rendering */ + QEMUBH *gl_unblock_bh; + QEMUTimer *gl_unblock_timer; + int dmabuf_fd; +#endif }; struct SimpleSpiceUpdate { |