Could you clarify, please, the right way to access GL-CL interop. in this system:
Windows environment (Windows 7 x64).
One or several AMD GPUs.
Primary display can be not an AMD one (integrated - Intel or something else).
There should be possible to start application over RDP.
My goal is to create interconnected GL-CL contexts for each GPU to build some geometry (OpenCL) and render it into FBO (OpenGL). There is no need to show anything (except console messages - no problem here).
The problem is that while spending a huge amount of time, playing with OpenGL, OpenCL, Win32, I found no way to do it properly. Is the only chance to create these contexts - to make fake windows all over the infinitely stretched desktop with dummy plug in each of the card to keep them switched on? And still I'm not pretty sure, that it will work in all cases (RDP) of aforementioned environment.
So, what I know for now:
1. GL context cannot be created from CL one - this is the most disappointing fact;
2. wgl_amd_gpu_association - it needs one window-related GL context to generate others, but the main problem is that these others are useless(CL_INVALID_SHAREGROUP_REFERENCE_KHR) for CL context creation - I don't know the reason, but this is the second disappointing fact.
3. Last chance - try to access windows display devices, find an AMD one and use CreateDC instead of GetDC(window handle). Works fine with AMD as a primary display. As a secondary - access violation exception in ChoosePixelFormat and no GL context as a result.
P. S. By the way, please, look into SimpleGL sample (and AMD APP OpenCL Programming Guide, Appendix G - 18.104.22.168, step 8) - what ZeroMemory(&pfd,... there for ? After pfd initialization? And it works somehow!