d3d12: Fix Linux fence wait return value

zero is for success, nonzero is failure.

Fixes: 0b60d6a2 ("d3d12: Support Linux eventfds for fences")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12268>
(cherry picked from commit accd8326c5)
This commit is contained in:
Jesse Natalie 2021-08-07 19:27:41 -07:00 committed by Dylan Baker
parent 7d6a3ca9c1
commit 4cf2f780dc
2 changed files with 2 additions and 2 deletions

View file

@ -427,7 +427,7 @@
"description": "d3d12: Fix Linux fence wait return value",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0b60d6a24d405066c4077154095a76204c103cc1"
},

View file

@ -72,7 +72,7 @@ static bool
wait_event(HANDLE event, int event_fd, uint64_t timeout_ns)
{
int timeout_ms = (timeout_ns == PIPE_TIMEOUT_INFINITE) ? -1 : timeout_ns / 1000000;
return sync_wait(event_fd, timeout_ms);
return sync_wait(event_fd, timeout_ms) == 0;
}
#endif