llvmpipe: add lp_fence_timedwait() helper
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 25 Apr 2019 17:42:02 +0000 (18:42 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 26 Apr 2019 10:26:33 +0000 (11:26 +0100)
commit5b284fe6bc0a2a5c2d9e5da09a5b86ff8912e474
tree0a18ea7a1e2000f781d184dc70ae1e0df6d4a9a9
parentbd0c4e360d08dc1b1a1433530b389358623783bb
llvmpipe: add lp_fence_timedwait() helper

The function is analogous to lp_fence_wait() while taking at timeout
(ns) parameter, as needed for EGL fence/sync.

v2:
 - use absolute UTC time, as per spec (Gustaw)
 - bail out on cnd_timedwait() failure (Gustaw)

v3:
 - check count/rank under mutex (Gustaw)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com> (v1)
Reviewed-by: Gustaw Smolarczyk <wielkiegie@gmail.com>
src/gallium/drivers/llvmpipe/lp_fence.c
src/gallium/drivers/llvmpipe/lp_fence.h