summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/virgl/drm
diff options
context:
space:
mode:
authorMarc-AndrĂ© Lureau <[email protected]>2016-06-07 14:54:34 +0200
committerDave Airlie <[email protected]>2016-06-09 14:07:53 +1000
commitdc81b3ad43dde0815baf957e7cf4c633d6f350f8 (patch)
treea84df252d55c561ce1ae9e7c6df85f36986c8380 /src/gallium/winsys/virgl/drm
parent15896a470b2b56cefc2a00ce458fd784ed42cee9 (diff)
virgl: fix checking fences
When calling virgl_fence_wait() with timeout=0, virgl_{drm,vtest}_resource_is_busy() is called. However, it returns TRUE for a busy resource, whereace virgl_fence_wait() should return TRUE for a completed (non-busy) resource. This fixes running supertuxkart in a VM (I could not reproduce locally with vtest though there is a similar fix) Signed-off-by: Marc-AndrĂ© Lureau <[email protected]> Cc: "11.1 11.2 12.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/winsys/virgl/drm')
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index c77b8994291..81afa848732 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -734,7 +734,7 @@ static bool virgl_fence_wait(struct virgl_winsys *vws,
struct virgl_hw_res *res = virgl_hw_res(fence);
if (timeout == 0)
- return virgl_drm_resource_is_busy(vdws, res);
+ return !virgl_drm_resource_is_busy(vdws, res);
if (timeout != PIPE_TIMEOUT_INFINITE) {
int64_t start_time = os_time_get();