cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

dikobraz
Journeyman III

Re: rite to OpenGL texture problem

Here are demos binaries: http://dl.dropbox.com/u/31853478/Sobel.zip

It uses texture sharing if can (simple check is performed), otherwise texture exchange is implemented through buffer. Source code you can find here: https://bitbucket.org/DikobrAz/simplegl/src/ddc55dc41873 - check out "opencl" branch.

There are lots of crazy buggy stuff, which I still haven't refactored. But you might be particularly interested in code fragment from this file (lines 197-306), where the check for texture sharing functionality is performed:

https://bitbucket.org/DikobrAz/simplegl-core/src/fca59f24b388/src/GL/CLContext.cpp

Works as follows: OpenGL texture is created and exposed to OpenCL via clCreateFromGLTexture2D. Then it is filled through FBO with some color, acquired for OpenCL, and check is performed that OpenCL image have the same content.

P.S: We have tested sample on AMD and it crashed (fine on NVidia). Not so far ago it worked on both cards. Tomorrow I try to locate bug, but it might be a driver problem.

0 Likes