v3d: Fix drmSyncobjWait() return value checking even more.
authorEric Anholt <eric@anholt.net>
Wed, 18 Jul 2018 19:06:45 +0000 (12:06 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 20 Jul 2018 18:11:29 +0000 (11:11 -0700)
It tends to return >0 in the success case (I think the value is something
like "how much of the timeout remained").  Fixes
dEQP-GLES3.functional.fence_sync.client_wait_sync_finish

src/gallium/drivers/v3d/v3d_fence.c

index 47b5818cb3b12ec8ae07946f6cf12b06fbba969e..850e4a7441470f5784e0cf98f4c7fb442aefe224 100644 (file)
@@ -70,7 +70,7 @@ v3d_fence_finish(struct pipe_screen *pscreen,
         struct v3d_screen *screen = v3d_screen(pscreen);
         struct v3d_fence *f = (struct v3d_fence *)pf;
 
-        return drmSyncobjWait(screen->fd, &f->sync, 1, timeout_ns, 0, NULL) == 0;
+        return drmSyncobjWait(screen->fd, &f->sync, 1, timeout_ns, 0, NULL) >= 0;
 }
 
 struct v3d_fence *