From 0c658dd3dda722de969fef772fb8f48cfd9190a2 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Mon, 2 Dec 2019 20:11:05 +0100 Subject: [PATCH] fosphor/cl: Make sure to unlocking the GL objects during CL release Signed-off-by: Sylvain Munaut --- lib/fosphor/cl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/fosphor/cl.c b/lib/fosphor/cl.c index 270f36d..da6f279 100644 --- a/lib/fosphor/cl.c +++ b/lib/fosphor/cl.c @@ -864,6 +864,12 @@ fosphor_cl_release(struct fosphor *self) if (!cl) return; + /* Release the GL objects */ + if ((cl->state == CL_PENDING) && (self->flags & FLG_FOSPHOR_USE_CLGL_SHARING)) + { + cl_lock_unlock(cl, 0, NULL); + } + /* Release all allocated OpenCL resources */ cl_do_release(cl);