virgl: save virgl_hw_res in virgl_transfer
authorChia-I Wu <olvaffe@gmail.com>
Wed, 15 May 2019 22:34:44 +0000 (15:34 -0700)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 17 Jun 2019 16:36:31 +0000 (09:36 -0700)
commit7e0508d9aa9575db7f608eae0c5337e2a0634197
tree2f4f30cd93a09c2c90af6452c2c0de04bf6f7fe2
parentad1ef35dc1e7a0f905e856648727e00219a48ebe
virgl: save virgl_hw_res in virgl_transfer

When PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE is properly supported,
virgl_transfer might refer to a different virgl_hw_res than
virgl_resource does.  We need to save the virgl_hw_res and use the
saved one.

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