virgl: fix virgl_buffer_transfer_extend
authorChia-I Wu <olvaffe@gmail.com>
Wed, 10 Jul 2019 07:33:29 +0000 (00:33 -0700)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 20 Jul 2019 01:04:34 +0000 (18:04 -0700)
Without setting hw_res, virgl_transfer_queue_extend never finds a
match and always returns NULL.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/gallium/drivers/virgl/virgl_resource.c

index 909deb774c734cf26c9e259ed39d68e310515770..436f705b9e5d748762fde9fd360c101198b07200 100644 (file)
@@ -554,6 +554,7 @@ static bool virgl_buffer_transfer_extend(struct pipe_context *ctx,
     * Pessimestically falls back if a flush is required.
     */
    dummy_trans.base.resource = resource;
+   dummy_trans.hw_res = vbuf->hw_res;
    dummy_trans.base.usage = usage;
    dummy_trans.base.box = *box;
    dummy_trans.base.stride = vbuf->metadata.stride[0];