virgl: Introduce virgl_resource_transfer_map
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Fri, 5 Jul 2019 11:22:16 +0000 (14:22 +0300)
committerChia-I Wu <olvaffe@gmail.com>
Sun, 7 Jul 2019 02:30:22 +0000 (19:30 -0700)
commitbb0a38d8197e1480dc5aedb3520741c840d01e91
treee9feeffb9edca2396585b88470ce72a21291da1d
parent4633298fd62121a466884998cb64d7a5b5976fcd
virgl: Introduce virgl_resource_transfer_map

Normal mapping of buffers and textures uses almost identical logic.
This commit extracts the this logic in the form of the
virgl_resource_transfer_map() helper function.

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