mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
5134cf9b5d
commit
bb5101aadc
8 changed files with 90 additions and 49 deletions
|
@ -1075,10 +1075,10 @@ static void qemu_spice_gl_update(DisplayChangeListener *dcl,
|
|||
stride, fourcc, false);
|
||||
}
|
||||
} else {
|
||||
stride = qemu_dmabuf_get_stride(dmabuf);
|
||||
stride = qemu_dmabuf_get_strides(dmabuf, NULL)[0];
|
||||
fourcc = qemu_dmabuf_get_fourcc(dmabuf);
|
||||
y_0_top = qemu_dmabuf_get_y0_top(dmabuf);
|
||||
fd = qemu_dmabuf_dup_fd(dmabuf);
|
||||
qemu_dmabuf_dup_fds(dmabuf, &fd, 1);
|
||||
|
||||
trace_qemu_spice_gl_forward_dmabuf(ssd->qxl.id, width, height);
|
||||
/* note: spice server will close the fd, so hand over a dup */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue