Mesa (master): virgl: Don't try to use cached resources for legacy fences

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jun 8 04:55:13 UTC 2019


Module: Mesa
Branch: master
Commit: e0ffcdf16a61a41f2a2e4e2c0dca94cf506ba17e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0ffcdf16a61a41f2a2e4e2c0dca94cf506ba17e

Author: Alexandros Frantzis <alexandros.frantzis at collabora.com>
Date:   Wed Jun  5 10:32:01 2019 +0300

virgl: Don't try to use cached resources for legacy fences

Resources for fences should not be from the cache, since we are basing
the fence status on the resource creation busy status.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis at collabora.com>
Reviewed-by: Chia-I Wu <olvaffe at gmail.com>

---

 src/gallium/winsys/virgl/drm/virgl_drm_winsys.c     |  5 ++++-
 src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c | 13 ++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index 48ee73f1e2f..ded12933d3a 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -739,7 +739,10 @@ virgl_drm_fence_create_legacy(struct virgl_winsys *vws)
       return NULL;
    fence->fd = -1;
 
-   fence->hw_res = virgl_drm_winsys_resource_cache_create(vws, PIPE_BUFFER,
+   /* Resources for fences should not be from the cache, since we are basing
+    * the fence status on the resource creation busy status.
+    */
+   fence->hw_res = virgl_drm_winsys_resource_create(vws, PIPE_BUFFER,
          PIPE_FORMAT_R8_UNORM, VIRGL_BIND_CUSTOM, 8, 1, 1, 0, 0, 0, 8);
    if (!fence->hw_res) {
       FREE(fence);
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index 24b57447467..0273d96f0dc 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -589,11 +589,14 @@ virgl_vtest_fence_create(struct virgl_winsys *vws)
 {
    struct virgl_hw_res *res;
 
-   res = virgl_vtest_winsys_resource_cache_create(vws,
-                                                PIPE_BUFFER,
-                                                PIPE_FORMAT_R8_UNORM,
-                                                VIRGL_BIND_CUSTOM,
-                                                8, 1, 1, 0, 0, 0, 8);
+   /* Resources for fences should not be from the cache, since we are basing
+    * the fence status on the resource creation busy status.
+    */
+   res = virgl_vtest_winsys_resource_create(vws,
+                                            PIPE_BUFFER,
+                                            PIPE_FORMAT_R8_UNORM,
+                                            VIRGL_BIND_CUSTOM,
+                                            8, 1, 1, 0, 0, 0, 8);
 
    return (struct pipe_fence_handle *)res;
 }




More information about the mesa-commit mailing list