mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
st/mesa: disallow deferred flush if there are multiple contexts
u_threaded can hang in these situation, with one context waiting on a
deferred fence from the other context.
But the other context isn't flushing its pending work (because it's waiting
for more work to pushed) so everything is stuck.
Fixes: d17b35e671 ("gallium: add PIPE_FLUSH_DEFERRED")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1430
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4213>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4213>
This commit is contained in:
parent
6ee971c882
commit
e7f3a8d695
1 changed files with 2 additions and 1 deletions
|
|
@ -74,7 +74,8 @@ static void st_fence_sync(struct gl_context *ctx, struct gl_sync_object *obj,
|
|||
assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE && flags == 0);
|
||||
assert(so->fence == NULL);
|
||||
|
||||
pipe->flush(pipe, &so->fence, PIPE_FLUSH_DEFERRED);
|
||||
/* Deferred flush are only allowed when there's a single context. See issue 1430 */
|
||||
pipe->flush(pipe, &so->fence, ctx->Shared->RefCount == 1 ? PIPE_FLUSH_DEFERRED : 0);
|
||||
}
|
||||
|
||||
static void st_client_wait_sync(struct gl_context *ctx,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue