aboutsummaryrefslogtreecommitdiff
path: root/ui/spice-display.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-05-29 09:21:43 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-06-07 11:52:35 +0200
commit5fc1fb62af354c93b865420f58fe3a9497fd4990 (patch)
tree7200b20f6a3c640a6a2da0c4ce3e765b5ed98e5e /ui/spice-display.c
parenta6c9d5da08e60eac3ec315abf243c2b7d2665089 (diff)
downloadqemu-5fc1fb62af354c93b865420f58fe3a9497fd4990.zip
qemu-5fc1fb62af354c93b865420f58fe3a9497fd4990.tar.gz
qemu-5fc1fb62af354c93b865420f58fe3a9497fd4990.tar.bz2
egl-helpers: add modifier support to egl_get_fd_for_texture().
Add modifier parameter to egl_get_fd_for_texture(), to return the used modifier on dmabuf exports. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20190529072144.26737-4-kraxel@redhat.com
Diffstat (limited to 'ui/spice-display.c')
-rw-r--r--ui/spice-display.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c
index a5e2647..104df23 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -888,7 +888,8 @@ static void spice_gl_switch(DisplayChangeListener *dcl,
if (ssd->ds) {
surface_gl_create_texture(ssd->gls, ssd->ds);
fd = egl_get_fd_for_texture(ssd->ds->texture,
- &stride, &fourcc);
+ &stride, &fourcc,
+ NULL);
if (fd < 0) {
surface_gl_destroy_texture(ssd->gls, ssd->ds);
return;
@@ -945,7 +946,7 @@ static void qemu_spice_gl_scanout_texture(DisplayChangeListener *dcl,
int fd = -1;
assert(tex_id);
- fd = egl_get_fd_for_texture(tex_id, &stride, &fourcc);
+ fd = egl_get_fd_for_texture(tex_id, &stride, &fourcc, NULL);
if (fd < 0) {
fprintf(stderr, "%s: failed to get fd for texture\n", __func__);
return;
@@ -1063,7 +1064,7 @@ static void qemu_spice_gl_update(DisplayChangeListener *dcl,
egl_fb_setup_new_tex(&ssd->blit_fb,
dmabuf->width, dmabuf->height);
fd = egl_get_fd_for_texture(ssd->blit_fb.texture,
- &stride, &fourcc);
+ &stride, &fourcc, NULL);
spice_qxl_gl_scanout(&ssd->qxl, fd,
dmabuf->width, dmabuf->height,
stride, fourcc, false);