aboutsummaryrefslogtreecommitdiff
path: root/ui/egl-helpers.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/egl-helpers.c
parenta6c9d5da08e60eac3ec315abf243c2b7d2665089 (diff)
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/egl-helpers.c')
-rw-r--r--ui/egl-helpers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
index e90eef8c9c..0c9716067c 100644
--- a/ui/egl-helpers.c
+++ b/ui/egl-helpers.c
@@ -200,7 +200,8 @@ err:
return -1;
}
-int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc)
+int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc,
+ EGLuint64KHR *modifier)
{
EGLImageKHR image;
EGLint num_planes, fd;
@@ -214,7 +215,7 @@ int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc)
}
eglExportDMABUFImageQueryMESA(qemu_egl_display, image, fourcc,
- &num_planes, NULL);
+ &num_planes, modifier);
if (num_planes != 1) {
eglDestroyImageKHR(qemu_egl_display, image);
return -1;