I am trying to find the OpenCL device closest to the current OpenGL context to do OpenCL/OpenGL Interop. Via the OpenCL extension clGetGLContextInfoKHR() and the CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR parameter I can ask for this device for a specific OpenCL platform and a specific (current) OpenGL context.
I have two OpenCL platforms on my MacBook Pro (OpenCL 1.1 (NVIDIA) and OpenCL 1.2 (Intel)). The strange thing is that for both platforms clGetGLContextInfoKHR() returns a result even if the OpenGL context is running on NVIDIA. Am I doing something wrong or doesn't clGetGLContextInfoKHR() always produce a unique result?