Page 1 of 2 12 LastLast
Results 1 to 10 of 11


  1. #1



    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:
    They offer examples and I'm especially interested in this one: ... oglinterop

    Unfortunately I get errors whenever they try to create a CL Buffer from a GL Buffer:
    Code :
    clBuffer = clContext.createFromGLBuffer(glObjects[VERTICES], BUFFER_SIZE, CLGLBuffer.Mem.WRITE_ONLY);

    glObjects[VERTICES] contains a valid opengl bufferId which was initialized as follows:
    Code :
    gl.glGenBuffers(glObjects.length, glObjects, 0);
    gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, glObjects[VERTICES]);
    gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);

    Does anyone know what could be the problem? Is this maybe a hardware limitation?
    There is a compatibility check in the code which passes:
    Code :
    ... d.isGLMemorySharingSupported() ...

    I am using this SDK: ... fault.aspx and the newest jogamp version (tried other versions already)

    Does anyone know what's wrong?

  2. #2
    Senior Member
    Join Date
    Aug 2011


    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.

    I'm also using AMD's SDK.

  3. #3


    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
    Code :
    Error: clCreateFromGLBuffer failed. (outputImageBuffer) Error code : CL_INVALID_GL_OBJECT

    So the problem is not jogamp specific.

    Is it possible to use another SDK? Does the Intel SDK supports my ATI graphics card or am I bound to AMDs SDK if I want to use my card?

  4. #4
    Senior Member
    Join Date
    Aug 2011


    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.

    I was testing on linux/amd64 fwiw.

  5. #5


    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.
    1) aticonfig --uninstall or (ubuntu) apt-get remove --purge fglrx*

    2) Delete all amd related stuff.
    /etc/alternatives/x86_64-linux-gnu_* to find amd symlinks,

    3) 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

  6. #6


    thank you all!
    the problem is solved. I've done these simple steps:

    - downloaded some recent driver (not the newest) from ATI
    - uninstalled driver packages (apt-get remove --purge fglrx*)
    - executed driver binary with --force
    - checked for any failure outputs (there where none)
    - reboot


    The SimpleGL example runs fine

    Some other benefit: my window manager (compiz) runs faster. I had lags when starting to move a window before this update.

  7. #7
    Senior Member
    Join Date
    Aug 2011


    Great. Which version worked BTW?

  8. #8
    Senior Member
    Join Date
    Aug 2011


    Quote Originally Posted by notzed
    Great. Which version worked BTW?
    Actually no matter, i did a poke around and found some cruft left from the previous driver too.

  9. #9


    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

  10. #10
    Junior Member
    Join Date
    Nov 2011


    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?

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 06-13-2012, 08:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean