virgl: document potentially failing blit
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 9 Apr 2019 12:25:51 +0000 (14:25 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 17 Apr 2019 07:27:08 +0000 (07:27 +0000)
This blit can fail, but this is not new; in the old version we
didn't even try to blit in this case. So let's just document the
limitation for now, and leave this for another day.

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 bbda3f2406e99a7bca09712a2de53fe2865db1d5..f0a2465021c0cfcef2a3ba91c37bcdfc281829b0 100644 (file)
@@ -298,6 +298,12 @@ static void virgl_texture_transfer_unmap(struct pipe_context *ctx,
          flush_data(ctx, virgl_transfer(trans->resolve_transfer),
                     &trans->resolve_transfer->box);
 
+         /* FINISHME: In case the destination format isn't renderable here, the
+          * blit here will currently fail. This could for instance happen if the
+          * mapped resource is of a compressed format, and it's mapped with both
+          * read and write usage.
+          */
+
          virgl_copy_region_with_blit(ctx,
                                      trans->base.resource, trans->base.level,
                                      &transfer->box,