virgl: Support copy transfers
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Wed, 8 May 2019 13:17:53 +0000 (16:17 +0300)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 8 Jun 2019 04:45:36 +0000 (21:45 -0700)
commit6e7726e50c44c28969b20dc79e5c6f7a26eb6edd
tree4e602578724d4065eaa67b641cf22f9bcbaf0360
parent199d95f29ed0177bab77c7d348a88e26cd4d23c0
virgl: Support copy transfers

Support transfers that use a different resource as the source of data to
transfer. This will be used in upcoming commits to send data to host
buffers through a transfer upload buffer, in order to avoid waiting
when the buffer resource is busy.

Note that we don't support queueing copy transfers in the transfer
queue. Copy transfers should be emitted directly in the command queue,
allowing us to avoid flushes before them and leads to better
performance.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
src/gallium/drivers/virgl/virgl_encode.c
src/gallium/drivers/virgl/virgl_encode.h
src/gallium/drivers/virgl/virgl_resource.c
src/gallium/drivers/virgl/virgl_resource.h
src/gallium/drivers/virgl/virgl_transfer_queue.c