virgl: Remove incorrect resource wait condition
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Mon, 27 May 2019 21:06:03 +0000 (00:06 +0300)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 8 Jun 2019 04:45:43 +0000 (21:45 -0700)
Now that we have copy transfers in place, we can remove the incorrect
resource wait condition. Copy transfers and other optimizations minimize
the performance impact of this removal, while providing the correct
behavior.

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

index 897e0c16c7ef2ce1850ea7e42468e22bd659b709..879c3fb359a992dcb4dc6cef6fd9b8bd277abff5 100644 (file)
@@ -155,19 +155,6 @@ virgl_resource_transfer_prepare(struct virgl_context *vctx,
          flush = true;
    }
 
-   /* XXX This is incorrect and will be removed.  Consider
-    *
-    *   glTexImage2D(..., data1);
-    *   glDrawArrays();
-    *   glFlush();
-    *   glTexImage2D(..., data2);
-    *
-    * readback and flush are both false in the second glTexImage2D call.  The
-    * draw call might end up seeing data2.  Same applies to buffers with
-    * glBufferSubData.
-    */
-   wait = flush || readback;
-
    if (flush)
       vctx->base.flush(&vctx->base, NULL, 0);