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.
1722 Discussions

Using OpenCL with OpenGL in Intel OpenCL SDK 1.5?

javedrabbani
Beginner
1,356 Views
Hi All,

I have seen no sample of OpenCL + OpenGL usage with Intel OpenCL SDK. However, the release notes indicate that cl_khr_gl_sharing extension is supported. I am not sure whether it will be possible to use both APIs together in an application. I have Intel Core i5 CPU and Intel HD 3000 GPU. Will I be able to use GL + CL with this hardware configuration on my laptop?

If such support really exists in the SDK, the I wonder why Intel does not ship any such sample with their OpenCL SDK just like AMD and NVIDIA do for their CL SDKs?

Can anybody refer me to some sample somewhere someone has successfully achieved this with Intel OpenCL SDK and the used system has Intel graphics (i.e. no AMD/NVIDIA GPU!)

Thanks.

- Javed
0 Kudos
6 Replies
ARNON_P_Intel
Employee
1,356 Views
Thanks for the feedback.
The feature does work according to the specification details on cl_khr_gl_sharing and pass the relevant conformance tests.

It is true that are current sample list doesn't cover this feature, and we will consider this for future products. Nevertherless, you can use current list of samples available at:http://software.intel.com/en-us/articles/vcsource-samples/?filter=oclsdk.

Regards,
- Arnon
0 Kudos
Jim_Vaughn
Beginner
1,356 Views
I can confirm it does work but only for a very limited set of OpenGL Textures. Other selecting the right texture there is no difference and you should be able to use any tutorial that demostrates this capability on for NVIDIA or AMD.

Edit: To be be absolutely clear, I mean that interop code will still run when using the Intel OpenCL SDK. It will certainly not see any performance benifit as there cannot be one as Intel doesn't support running OpenCL kernels on their GPUs. So what I mean when I say it "works" I mean you do not have to rewrite the code (You may have to change image formats to something the Intel SDK supports). What seems to be happening is that the Intel SDK is doing a copy behind the scenes for you. This is of course exactly what you would do in the event you wrote the code yourself so there is no performance gain whatsoever. The only advantage is that you don't have to rewrite your code. I thought you knew this as the question does not make any sense otherwise as the Intel OpenCL SDK clearly states it does allow kernels to be run on the GPU only on the CPU.
0 Kudos
javedrabbani
Beginner
1,356 Views
Well, when the Intel SDK is installed on my laptop (Core i5 + Intel HD 3000 Graphics), there is only one OpenCL device available for use which of type CPU. That is, after SDK installation, I can only use Intel CPU as an OpenCL compute device but not the IntelGPU. As a result, theOpenCL/GL interop will face issues.

That is thereason, I am not able to runeven the mostbasic CL/GL demo fromAMD CL SDK on my laptop. It fails in between or Isee black screen for the OpenGL rendering part.

If the support is limited, then may be I will need to modify those samples to make them run on my system. However, I am stillnot comfortable with the fact that why I seeno OpenCL GPU compute device for Intel GPU; only a compute device for CPU isavailable.

Thanks.
0 Kudos
javedrabbani
Beginner
1,356 Views

If you are confirming that it does work then will it be possible to share a very bare bone simple sample of OpenGL and OpenCL working togetherwith Intel OpenCLSDK to get me moving. Ihave no success so far withrunning basic samples from AMDAPP CL SDK.

Thanks.

0 Kudos
ARNON_P_Intel
Employee
1,356 Views
Hi,
Intel OpenCL SDK 1.5 supports only OpenCL CPU device. See more info in the link below
The OpenGL-OpenCL interoperability feature is designed to work with any OpenGL device in the system.
As far as the sample you refer to, we will look into it and response.
Regards,
- Arnon
0 Kudos
javedrabbani
Beginner
1,356 Views
Thanksa lot for the response. Regarding supported OpenCL devices returned by Intel OpenCL SDK, this is what I was already saying that it will return OpenCL CPU devices corresponding to Intel Core i5 CPU. Even if I install AMD SDK, it will also show a single OpenCL CPU device as the system has no AMD/ATI graphics.

As far as the CL-GL interopis concerned, ideallyit should work out-of-the-box with any GPU installed within the system. However, even though this may be true with AMD/NVIDIA GPUs, it does not necessarily appear to be the case with Intel Integrated Graphics.

Can you please confirm thatCL-GL interop withIntel OpenCL SDKhas been tested with Intel CPU + Intel GPU combination?

Regarding the sample, itwould be good if it available. Even a very bare-bone sample wouldsuffice, the point being to verify that CL-GL interop can work with this setup and then things can move forward and more complex applications can be developed afterwards.

Thanks.

-Javed
0 Kudos
Reply