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 << "
";
// 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);