virgl: wait for the right resource
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 13 Mar 2019 15:03:39 +0000 (16:03 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 17 Apr 2019 07:27:08 +0000 (07:27 +0000)
In case we're resolving, we need to wait for the resolved resource
instead of the original one.

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 65d82784d63f5d6736eecd383979d5dd33b558ff..d52062579d4a4d1d32c889872ed341b51d95e979 100644 (file)
@@ -154,7 +154,7 @@ static void *virgl_texture_transfer_map(struct pipe_context *ctx,
       vs->vws->transfer_get(vs->vws, src_res->hw_res, box, trans->base.stride,
                             trans->l_stride, trans->offset, level);
 
-      vs->vws->resource_wait(vs->vws, vtex->hw_res);
+      vs->vws->resource_wait(vs->vws, src_res->hw_res);
    }
 
    ptr = vs->vws->resource_map(vs->vws, src_res->hw_res);