aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2014-12-26 16:53:17 +0100
committerSylvain Munaut <tnt@246tNt.com>2015-01-18 23:35:51 +0100
commitf2ed7b07a3fa7b34158f327621e070dae974d9b0 (patch)
tree59ce254173c4c77fc2a4f1dd8f381b7a394a2ab7
parent36ce5e78430bcf87e219a97219051a9d62d1d834 (diff)
fosphor: Acquire the GL objects before cleaning buffers in cl_finish
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--lib/fosphor/cl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/fosphor/cl.c b/lib/fosphor/cl.c
index d367469..f939f0d 100644
--- a/lib/fosphor/cl.c
+++ b/lib/fosphor/cl.c
@@ -928,6 +928,20 @@ fosphor_cl_finish(struct fosphor *self)
/* If no data was processed, we may need to finish the boot */
if (cl->state == CL_BOOTING) {
+ /* Acquire GL objects if needed */
+ if (self->flags & FLG_FOSPHOR_USE_CLGL_SHARING)
+ {
+ cl_mem objs[3];
+
+ objs[0] = cl->mem_waterfall;
+ objs[1] = cl->mem_histogram;
+ objs[2] = cl->mem_spectrum;
+
+ err = clEnqueueAcquireGLObjects(cl->cq, 3, objs, 0, NULL, NULL);
+ CL_ERR_CHECK(err, "Unable to acquire GL objects");
+ }
+
+ /* Clear the buffers */
err = cl_queue_clear_buffers(self);
if (err != CL_SUCCESS)
goto error;