cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

sacer
Journeyman III

enqueueAcquireGLObjects won't work

Heya everyone,

some friends and me decided to use OpenCL for a teamproject at university.

Well only 1 worked with OpenCL yet and built most of those parts.

Our Project works fine with NVIDIA yet but as I'm the only one using ATI they can't nor

want to help me.

.

I just started to read about OpenCL and try some samples.

I have general ideas of each methods used.

But in our project we use OpenCL C++ (I didn't find a sample of those 😕 ) and I nailed

down my problem to this command:

manager.getCurrentQueue().enqueueAcquireGLObjects(&vec, NULL, NULL);

Well we did glFinish() before that line and manager.getCurrentQueue() returns the 'current' cl::CommandQueue,

vec is a vector of cl::Memory:

std::vector<cl::Memory> vec;

vec.push_back(m_particlePosBuffer);

Compiling and starting the programm works fine, but as soon as the program reaches this command it just ignores it and everything beyond.

But it does NOT freeze, our glutwindow just keeps updating and simulating, but as that simulateScene never finishs (because of that problem)

it never reachs renderScene() so my window is just empty -.-

I'm sorry if I missed a Discussion about a similar problem.

Edith1:

Well there are OpenCL C++ samples, but non of those uses a shared Buffer with OpenGL 😕

And all i get from debugging info is:

Eine Ausnahme (erste Chance) bei 0x776e76fd in tp.exe: Microsoft C++-Ausnahme: cl::Error an Speicherposition 0x002decd0..

So it's some kind of memory problem -.-

CL-ERROR: clEnqueueAcquireGLObjects(-5) -> OUT_OF_RESOURCES  - no idea why... it shouldn't -.-

I read through everything that could cause that problem (imho) and couldn't see anything weird...

AND it's working fine with NVIDIA >.<

Edit 2:

Nope, all OpenGLBuffers are created before OpenCL context creation,

in some forums i read similar weird stuff with some OpenCL C(++) methods

won't work on some GPUs... but all OpenCL C samples using interop with OpenGL

work fine here, same for all OpenCL C++ samples i tried yet.

0 Likes
3 Replies
binying
Challenger

But in our project we use OpenCL C++ (I didn't find a sample of those 😕 )---if you install amd app sdk 2.8, you can get some samples.

nou
Exemplar

check for any OpenCL errors.

0 Likes
nou
Exemplar

Do you create OpenGL buffer (glGenBuffer) after OpenCL context creation? AMD implementation have limitation in this regard.

0 Likes