mesa: fix refcnt imbalance related to _mesa_delete_semaphore_object()

Indeed, the fence reference was not freed.

For instance, this issue is triggered with
"piglit/bin/ext_external_objects-vk-semaphores-2 -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 7b6cd912a5 ("mesa/st: get rid of ST_CALLOC_STRUCT use CALLOC_STRUCT")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23296>
This commit is contained in:
Patrick Lerda 2023-05-25 16:15:28 +02:00 committed by Marge Bot
parent 52d212aff2
commit 84f465ec81

View file

@ -754,8 +754,11 @@ void
_mesa_delete_semaphore_object(struct gl_context *ctx,
struct gl_semaphore_object *semObj)
{
if (semObj != &DummySemaphoreObject)
if (semObj != &DummySemaphoreObject) {
struct pipe_context *pipe = ctx->pipe;
pipe->screen->fence_reference(ctx->screen, &semObj->fence, NULL);
FREE(semObj);
}
}
void GLAPIENTRY