From dc81b3ad43dde0815baf957e7cf4c633d6f350f8 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Tue, 7 Jun 2016 14:54:34 +0200 Subject: virgl: fix checking fences MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: "11.1 11.2 12.0" Signed-off-by: Dave Airlie --- src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/winsys/virgl/vtest') diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c index 9c9ec044591..ce8ac97756f 100644 --- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c +++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c @@ -544,7 +544,7 @@ static bool virgl_fence_wait(struct virgl_winsys *vws, struct virgl_hw_res *res = virgl_hw_res(fence); if (timeout == 0) - return virgl_vtest_resource_is_busy(vdws, res); + return !virgl_vtest_resource_is_busy(vdws, res); if (timeout != PIPE_TIMEOUT_INFINITE) { int64_t start_time = os_time_get(); -- cgit v1.2.3