mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 15:30:14 +01:00
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>
This commit is contained in:
parent
b95d598323
commit
b05a1fc156
1 changed files with 6 additions and 2 deletions
|
|
@ -326,9 +326,13 @@ _mesa_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
|
||||||
if (syncObj->StatusFlag) {
|
if (syncObj->StatusFlag) {
|
||||||
ret = GL_ALREADY_SIGNALED;
|
ret = GL_ALREADY_SIGNALED;
|
||||||
} else {
|
} else {
|
||||||
ctx->Driver.ClientWaitSync(ctx, syncObj, flags, timeout);
|
if (timeout == 0) {
|
||||||
|
ret = GL_TIMEOUT_EXPIRED;
|
||||||
|
} else {
|
||||||
|
ctx->Driver.ClientWaitSync(ctx, syncObj, flags, timeout);
|
||||||
|
|
||||||
ret = syncObj->StatusFlag ? GL_CONDITION_SATISFIED : GL_TIMEOUT_EXPIRED;
|
ret = syncObj->StatusFlag ? GL_CONDITION_SATISFIED : GL_TIMEOUT_EXPIRED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_mesa_unref_sync_object(ctx, syncObj);
|
_mesa_unref_sync_object(ctx, syncObj);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue