I have created an OpenCL/OpenGL interop program , which execute 6 kernels , reading from an FBO and outputting (each kernel per its own) results to an output texture.
[indent]m_oclContext, //The context for the GL/CL texture share
CL_MEM_READ_WRITE, //The activity for this texture
GL_TEXTURE_2D, //The dimensions of the texture
0, //The LOD of the texture
uFinalTextureOutput, //The texture to convert to the OPenCL handler
&ciErrNum); //The Error returned
And the program works great, and executes fast and all is well. Yet when I exit, and attempt to release the memory object of the textures I write to, I get an access violation , the counter for the 6 kernels gets messed up and that’s it. Releasing the Texture I read from (The FBO) is executed flawlessly.
Prior to working with textures directly , I tried it with PBO’s, which worked fine , including the release. If I ommit the clReleaseMemObject command , and application exits gracefully.
Is this OK to happen ? is it a driver bug ? I am working with a GTX470 and the latest driver released (258.96), yet I also had tourlbe with the previous driver to this one.
Before you ask : The textures to which I write to , are released LAST , after releasing the OpenCL memory object uFinalTextureOutput.