Results 1 to 3 of 3

Thread: OpenCL/OpenGL interop problem with textures on NVIDIA

  1. #1

    OpenCL/OpenGL interop problem with textures on NVIDIA

    I've written a simple voxel raytracer which fills in an OpenGL texture inside of the kernel then displays it as a fullscreen quad in OpenGL. On my NVIDIA GTX 480 (latest drivers) the screen is garbage and clEnqueueAcquireGLObjects returns CL_OUT_OF_RESOURCES. On my AMD Radeon 5850 (latest drivers) it works perfectly fine. Anybody know why this is happening?

    glFinish();

    cl_int error = clEnqueueAcquireGLObjects(cmdQueue, 1, &deviceMemFramebuffer, 0, 0, 0);
    if (CL_SUCCESS != error) std::cout << "clEnqueueAcquireGLObjects failed, error = " << error << "\n";

    // Launch the kernel
    const size_t globalWorkSize[] = { framebufferWidth, framebufferHeight };
    clEnqueueNDRangeKernel(cmdQueue, kernel, 2, 0, globalWorkSize, 0, 0, 0, 0);

    // Release the GL texture.
    clEnqueueReleaseGLObjects(cmdQueue, 1, &deviceMemFramebuffer, 0, 0, 0);
    clFinish(cmdQueue);

  2. #2
    Junior Member
    Join Date
    Sep 2011
    Posts
    3

    Re: OpenCL/OpenGL interop problem with textures on NVIDIA

    I'm having similar problems with CL/GL interop.
    May I see how you setup your OpenGL texture and get the shared OpenCL handle?

    Maybe we are able to help eachother.

  3. #3

    Re: OpenCL/OpenGL interop problem with textures on NVIDIA

    Try the 275.33 driver from NVIDIA. The latest driver, 280.26, crashes for all of our demos in OpenCL Studio, which use OpenGL interop. If you can live with OpenCL 1.0 for now then try the older driver.
    OpenCL Studio --- http://www.opencldev.com

Similar Threads

  1. OpenCL - OpenGL 2D texture interop
    By majicou in forum OpenCL
    Replies: 4
    Last Post: 01-14-2012, 06:56 AM
  2. OpenCL + OpenGL (interop)
    By Executor in forum OpenCL
    Replies: 2
    Last Post: 11-09-2009, 05:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •