I startet experimenting with OpenCL. First tests are done. Now I am trying to check out Interoperability with OpenGL. I want to manipulate an OpenGL Buffer directly… I’m working with jogamp jocl: http://jogamp.org/jocl/www/.
They offer examples and I’m especially interested in this one: https://github.com/mbien/jocl-demos/tre … oglinterop
Unfortunately I get errors whenever they try to create a CL Buffer from a GL Buffer:
I suggest posting on the jogamp jocl forum. Its quiet but definitely alive, Michael is pretty good at responding.
Maybe add this stuff to the post:
I tried this and get a similar problem. I can’t see any obvious paste-o in JOCL but then i’m using a fairly old version here.
I also tried seeing what’s going on, and clCreateFromGLBuffer() is returning -60 which is:
“CL_INVALID_GL_OBJECT if bufobj is not a GL buffer object or is a GL buffer object but does not have an existing data store.”
But glBufferData has been called so this should be ok.
thanks for your answer. I will try to post this in another forum.
I’ve done some more tests to find out what’s the problem: The AMD SDK delivers some c examples. I compiled them and get the same error, whenever opengl interoperability is used
You’ll have to use the AMD stuff for AMD GPU hardware, intels’ apparently only works on intel cpu’s for that matter.
I did a bit more poking too and it looks like it might be something up with the amd sdk/driver: although i find it hard to believe someone else hasn’t come across it yet - but there’s nothing i can see in the amd forums about it.
It’s a bug that was still not fixed in the amd driver installer.
You have to:
1)uninstall amd drivers,
2)manually clean all junk that it left in the system and
3)reinstall again.
aticonfig --uninstall or (ubuntu) apt-get remove --purge fglrx*
Delete all amd related stuff.
check:
/etc/alternatives/x86_64-linux-gnu_* to find amd symlinks,
/usr/lib/fglrx,
/etc/ati
…
reinstall from the linux binary with --force without creating distribution specific packages. Check for lines like “unable to write to X”. If you find one of them it means that there is still a symlink that was not deleted and you have to restart from point 1.
If the installation went succesfully you may delete again the may delete again the drivers and install a distribution specific package. be sure to follow again point 1 and 2 and don’t use jockey (it introduces again the bug) but install directly from the repository. in ubuntu it’s apt-get install fglrx.
in amd app sdk you find the sample program SimpleGl, if it works then you reinstalled the driver correctly
It worked with 8.881-110728a-122950C-ATI. I did not tested other versions…
Now I got the next problem which is maybe jocl specific…
I get unknown failure messages (varying numeric failure code) if I use clCreateFromGLBuffer. But I will open another thread for it as soon as I tried it with C or CPP unfortunately there are no examples in the AMD SDK and I did not found any elsewhere
I too am having the same situation when I try to make a CL Buffer from a GL Buffer. From what I can understand, the problem seems to be somehow with the driver of my AMD. Do you think that updating my driver will fix this “Invalid GL Object” problem?