Skip to content
Snippets Groups Projects
Commit a47375d4 authored by Juan A. Suárez's avatar Juan A. Suárez Committed by Marge Bot
Browse files

mesa: unref syncobj after wait_sync

Before returning the wait_sync() function, the sync object must be
unreferenced.

Closes: mesa/mesa#6377


Fixes: 0af7c1e3 ("mesa/st: merge the syncobj code from st into mesa")
Signed-off-by: default avatarJuan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!16242>
parent 1585d12d
No related branches found
No related tags found
Loading
......@@ -409,14 +409,17 @@ wait_sync(struct gl_context *ctx, struct gl_sync_object *syncObj,
/* Nothing needs to be done here if the driver does not support async
* flushes. */
if (!pipe->fence_server_sync)
if (!pipe->fence_server_sync) {
_mesa_unref_sync_object(ctx, syncObj, 1);
return;
}
/* If the fence doesn't exist, assume it's signalled. */
simple_mtx_lock(&syncObj->mutex);
if (!syncObj->fence) {
simple_mtx_unlock(&syncObj->mutex);
syncObj->StatusFlag = GL_TRUE;
_mesa_unref_sync_object(ctx, syncObj, 1);
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment