summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2021-08-07 19:27:41 -0700
committerDylan Baker <dylan.c.baker@intel.com>2021-11-10 09:28:04 -0800
commit4ba15a8f1156176f015515db0dfff5291d590cbe (patch)
tree15554d6d5ad44923b43c1c3e9a98045f28a7fb44
parent6212bcfd84144e7f8f87b980bcb1d3b963d2a859 (diff)
downloadmesa-4ba15a8f1156176f015515db0dfff5291d590cbe.tar.gz
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 accd8326c5cb78788f12e3066bb6654595c23a51)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/d3d12/d3d12_fence.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 60a30d780a3..330319f2f92 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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"
},
diff --git a/src/gallium/drivers/d3d12/d3d12_fence.cpp b/src/gallium/drivers/d3d12/d3d12_fence.cpp
index 453c72b55e8..72e2567a5f9 100644
--- a/src/gallium/drivers/d3d12/d3d12_fence.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_fence.cpp
@@ -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