Re: Multiple OpenCL contexts
Posted by shaman on Jun 12, 2016; 7:09am
URL: https://forum.jogamp.org/Multiple-OpenCL-contexts-tp4036753p4036827.html
Hi Wade,
If I want to use all devices, I combine them in one single context. This is better also from a point of memory management.
As I said at the very beginning, I've written an OpenCL wrapper for the jMonkeyEngine. In jME, it is possible to theoretically create multiple applications (i.e. multiple OpenGL windows and contexts) that run in parallel. For me, this only works with JOGL, LWJGL throws errors :) .
Since the OpenCL context is attached to the OpenGL context (for OpenGL-OpenCL interop), it would be nice to also have an OpenCL context for every application. This leads exactly to the question I've asked.
For simplicity, I would now just say: If someone really needs multiple OpenCL contexts for some reason, he/she should just try it out if it works on his/her platform.
That's not a satisfying result, I know, but I'm out of ideas and would stop working on this issue now.