clEnqueueCopyImage fails on OpenCL SDK 1.5 when images are made from OpenGL objects

clEnqueueCopyImage fails on OpenCL SDK 1.5 when images are made from OpenGL objects

After upgrading into Intel OpenCL SDK 1.5 a piece of code which calls clEnqueueCopyImage fails with the error CL_INVALID_VALUE when the images are made with clCreateFromGLTexture2D. The code worked on OpenCL SDK 1.1 and works with AMD drivers and it works when the images are made with clCreateImage2dD.

The standard says that CL_INVALID_VALUE represents that the the dst&src_origins are wrong or that the region falls outside of the images. We naturally checked that this is not the case. So either SDK 1.5 has a bug which prevents copying images made from OpenGL textures or it returns an invalid error message.

P.S Good job on the 1.5 SDK though. It does not leak memory nearly as much when using OpenGl interaction as the previous one did.

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks for the reporting the issue.
Could you please provide small reproducer for it.
Are you using additional parameters except the mem. object handles, or just NULLs.

I have this problem as well doing the exact same thing and getting the exact same output at the OP is reporting. I will try to get some code demonstrating the issue but it seems (for me) any code using OpenGL/OpenCL interoperability using clCreateFromGLTexture2D seems to fail as mentioend above so you could probably use any example out there which demonstrates using clCreateFromGLTexture2D.

Thanks for the additional information.

The issue was reproduced on our side.


Thank you for your quick replay and for looking into this issue. We are not getting this level (or any level) of support from the other vendors and is very refreshing to see an OpenCL vendor actually looking into our issues and being concerned with fixing them.



Hi Evgeny,

I wanted to touch base and see if you guys had found a work around for this or a patch for the SDK?



Hi Jim,

Sorry for long delay in reply.
Unfortunatly there is no workaround of this problem.

We fixed it andthe fixwill be availble in the next public release.


No problem Evgeny,
I am glad you got it fixed and I will eagerly await the release.Thanks,

Leave a Comment

Please sign in to add a comment. Not a member? Join today