OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

INFO: OpenCL/OpenGL Interop when another GPU is present.

LLess
Beginner
174 Views

Hi guys,

After a lot of search I have been able to get the OpenCL/OpenGL Interop working with the HD4000 WITHOUT deactivating my NVidia card.

The pain is caused by the fact that Microsoft doesn't want to change the way they load OpenGL ICDs. So right now they decide somehow with no control from the ICD providers.

So in my case I was ending up with NVidia ICD loaded and no matter what I was doing the OpenGL/OpenCL interop would fail because the contexts were not on the same device.

I have found in some forum that the only way is to actually load the ICD you want BEFORE the OpenGL32.dll.

The only way I have found so far is to put any DLL using OpenGL (OpenGL itself, Glut,GLEW etc..)  as delayed loaded.

Then in my App InitInstance I load the Intel ICD with LoadLibrary("ig7icd32.dll") .

OpenGL32.DLL when loading detects that the ICD is already loaded and uses the one loaded instead of the one it would be default.

And now I can work on my OpenCL with OpenGL app without having to disable the NVidia Card.

If you have encountered the same issue, then this might be a solution for you.

Laurent

0 Kudos
4 Replies
Raghupathi_M_Intel
174 Views

Laurent,

Thanks for the excellent info. Hope this helps others facing the same issue.

Raghu

jeffwrite
Beginner
174 Views

To the forum:

     In regards to Laurent, the Nvidia SDK had only 3D and the Opengl software did not seem to be developed as of yet.  I had hoped that Nvidia would developed the SDK software that could handle both 3D and OpenGL.  Then I researched on WIKI that OpenGL might have PATENT Issues that might hurt developers down the road, so I do not know if there is a big problem with that.

MSimm2
New Contributor I
174 Views

ReactOS has an opengl32.dll that supports multiple vendor icd's. You can compile it separately and the use it instead. But you would need to add each vendors icd into the registry yourself.

MSimm2
New Contributor I
174 Views

Sorry double post

Reply