diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-06-14 15:44:09 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-07-06 10:32:14 +0200 |
commit | 9d8256ebc0ef88fb1f35d0405893962d20cc10ad (patch) | |
tree | 7277281fd892119a31e68c5e3bdd1391d67dafb2 /ui | |
parent | c61d8126fcdc1c70581be55d0082f4510e9cfb26 (diff) | |
download | qemu-9d8256ebc0ef88fb1f35d0405893962d20cc10ad.tar.gz qemu-9d8256ebc0ef88fb1f35d0405893962d20cc10ad.tar.bz2 qemu-9d8256ebc0ef88fb1f35d0405893962d20cc10ad.zip |
virgl: pass whole GL scanout dimensions
Spice client needs the whole GL texture dimension to be able to show a
scanout with a monitor offset (different than +0+0).
Furthermore, this fixes a crash when calling surface_{width,height}()
after dpy_gfx_replace_surface(con, NULL) was called in
virgl_cmd_set_scanout()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1465911849-30423-4-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/console.c | 2 | ||||
-rw-r--r-- | ui/gtk-egl.c | 1 | ||||
-rw-r--r-- | ui/sdl2-gl.c | 1 | ||||
-rw-r--r-- | ui/spice-display.c | 6 |
4 files changed, 7 insertions, 3 deletions
diff --git a/ui/console.c b/ui/console.c index ce1e10570f..c24bfe422d 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1709,11 +1709,13 @@ QEMUGLContext dpy_gl_ctx_get_current(QemuConsole *con) void dpy_gl_scanout(QemuConsole *con, uint32_t backing_id, bool backing_y_0_top, + uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t width, uint32_t height) { assert(con->gl); con->gl->ops->dpy_gl_scanout(con->gl, backing_id, backing_y_0_top, + backing_width, backing_height, x, y, width, height); } diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 431457c746..3f5d328c7b 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -172,6 +172,7 @@ QEMUGLContext gd_egl_create_context(DisplayChangeListener *dcl, void gd_egl_scanout(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, + uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h) { diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index a324ecacac..039645df3e 100644 --- a/ui/sdl2-gl.c +++ b/ui/sdl2-gl.c @@ -186,6 +186,7 @@ QEMUGLContext sdl2_gl_get_current_context(DisplayChangeListener *dcl) void sdl2_gl_scanout(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, + uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h) { diff --git a/ui/spice-display.c b/ui/spice-display.c index 67e50e9a84..99132b69b6 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -861,6 +861,8 @@ static QEMUGLContext qemu_spice_gl_create_context(DisplayChangeListener *dcl, static void qemu_spice_gl_scanout(DisplayChangeListener *dcl, uint32_t tex_id, bool y_0_top, + uint32_t backing_width, + uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h) { @@ -883,9 +885,7 @@ static void qemu_spice_gl_scanout(DisplayChangeListener *dcl, assert(!tex_id || fd >= 0); /* note: spice server will close the fd */ - spice_qxl_gl_scanout(&ssd->qxl, fd, - surface_width(ssd->ds), - surface_height(ssd->ds), + spice_qxl_gl_scanout(&ssd->qxl, fd, backing_width, backing_height, stride, fourcc, y_0_top); qemu_spice_gl_monitor_config(ssd, x, y, w, h); |