diff options
| author | Qiang Yu <yuq825@gmail.com> | 2025-03-27 10:58:43 +0800 |
|---|---|---|
| committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2025-05-06 11:57:03 +0400 |
| commit | bb5101aadc1675790983c7911092dd9abeec4651 (patch) | |
| tree | 9709d2fe5e73632f7e5e0dd9d62ef99f034b2e8e /ui/egl-helpers.c | |
| parent | 5134cf9b5d3aee4475fe7e1c1c11b093731073cf (diff) | |
| download | focaccia-qemu-bb5101aadc1675790983c7911092dd9abeec4651.tar.gz focaccia-qemu-bb5101aadc1675790983c7911092dd9abeec4651.zip | |
ui/dmabuf: extend QemuDmaBuf to support multi-plane
mesa/radeonsi is going to support explicit modifier which
may export a multi-plane texture. For example, texture with
DCC enabled (a compressed format) has two planes, one with
compressed data, the other with meta data for compression.
v2:
* change API qemu_dmabuf_get_fd/offset/stride to
qemu_dmabuf_get_fds/offsets/strides.
* change API qemu_dmabuf_dup_fd to qemu_dmabuf_dup_fds.
* add an extra arg to these API for the length of the
array.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
[ Fix style ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20250327025848.46962-2-yuq825@gmail.com>
Diffstat (limited to 'ui/egl-helpers.c')
| -rw-r--r-- | ui/egl-helpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index d591159480..d194d004b7 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -323,9 +323,9 @@ void egl_dmabuf_import_texture(QemuDmaBuf *dmabuf) attrs[i++] = qemu_dmabuf_get_fourcc(dmabuf); attrs[i++] = EGL_DMA_BUF_PLANE0_FD_EXT; - attrs[i++] = qemu_dmabuf_get_fd(dmabuf); + attrs[i++] = qemu_dmabuf_get_fds(dmabuf, NULL)[0]; attrs[i++] = EGL_DMA_BUF_PLANE0_PITCH_EXT; - attrs[i++] = qemu_dmabuf_get_stride(dmabuf); + attrs[i++] = qemu_dmabuf_get_strides(dmabuf, NULL)[0]; attrs[i++] = EGL_DMA_BUF_PLANE0_OFFSET_EXT; attrs[i++] = 0; #ifdef EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT |