mesa: don't wait in _mesa_ClientWaitSync if timeout is 0
authorVadim Girlin <vadimgirlin@gmail.com>
Fri, 31 Aug 2012 21:02:24 +0000 (01:02 +0400)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Wed, 12 Sep 2012 09:57:36 +0000 (11:57 +0200)
commit405d47bbe78106f44e4283925e58a1d1ebc88455
tree7213be359f1f66b1c24fa26f3afe07b3b78872bd
parent04f902b47226f976d3d81c66ddadb7414051c957
mesa: don't wait in _mesa_ClientWaitSync if timeout is 0

From ARB_sync spec:

    If the value of <timeout> is zero, then ClientWaitSync does not
    block, but simply tests the current state of <sync>. TIMEOUT_EXPIRED
    will be returned in this case if <sync> is not signaled, even though
    no actual wait was performed.

Fixes random fails of the arb_sync-timeout-zero piglit test on r600g.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit b05a1fc156c4776d97d6ff3dcce71e6e34bac21d)
src/mesa/main/syncobj.c