cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Meteorhead
Challenger

Qt5.1 + multi-device OpenCL-GL interop

Hi everyone!

I took on a nice project that uses Qt5.1 alpha and there are problems with OpenCL-GL interop. Let me not repeat myself, but simply link the Qt forum post I made there. All remakrs are welcome on both sides.

0 Likes
1 Solution
moozoo
Adept III

From http://developer.amd.com/download/AMD_APP_SDK_Release_Notes_Developer.pdf

Section 5.3

"

For OpenGL interoperability with OpenCL, there currently is a requirement on when the

OpenCL context is created and when texture/buffer shared allocations can be made. To use

shared resources, the OpenGL application must create an OpenGL context and then an

OpenCL context. All resources (GL buffers and textures) created after creation of the OpenCL

context can be shared between OpenGL and OpenCL. If resources are allocated before the

OpenCL context creation, they cannot be shared between OpenGL and OpenCL."

ie.for your minimalistic program, you need to move the code related to making your vbo (QOpenGLBuffer m_vbo; etc) until after you have made your cl context

i.e. after your for(auto& plat : my_cl_platforms)  code block

The SimpleGL sample in the amd sdk creates the CL command queue before the vbo, so maybe that is required as well.

Will this help... It didn't for me. I also don't have access to an AMD graphics card.

May try GLIntercept with the ARB_debug_output, it might log something that tells you what is going on.

Also a pnf_notify on your CL context.

Note to AMD The info in Section 5.3 should also be in the AMD_Accelerated_Parallel_Processing_OpenCL_Programming_Guide under appendix G

I would have found this information a lot faster,

View solution in original post

0 Likes
22 Replies