mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
mesa: unref syncobj after wait_sync
Before returning the wait_sync() function, the sync object must be unreferenced. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6377 Fixes:0af7c1e385("mesa/st: merge the syncobj code from st into mesa") Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16242> (cherry picked from commita47375d4da)
This commit is contained in:
parent
421e4d445a
commit
40867789ec
2 changed files with 5 additions and 2 deletions
|
|
@ -1075,7 +1075,7 @@
|
|||
"description": "mesa: unref syncobj after wait_sync",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "0af7c1e385b94c4d3610c4bff4c3af8a1afb26c6"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue