virgl: check for readback on correct resource
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 4 Apr 2019 10:22:07 +0000 (12:22 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 17 Apr 2019 07:27:08 +0000 (07:27 +0000)
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/gallium/drivers/virgl/virgl_texture.c

index cae7921d6831ce03990fbaa11d97404c256a7431..65d82784d63f5d6736eecd383979d5dd33b558ff 100644 (file)
@@ -149,7 +149,7 @@ static void *virgl_texture_transfer_map(struct pipe_context *ctx,
       trans->resolve_tmp = NULL;
    }
 
-   readback = virgl_res_needs_readback(vctx, vtex, usage, level);
+   readback = virgl_res_needs_readback(vctx, src_res, usage, level);
    if (readback) {
       vs->vws->transfer_get(vs->vws, src_res->hw_res, box, trans->base.stride,
                             trans->l_stride, trans->offset, level);