OpenCL Kernel doesn't work on GTX570, but 8600M GT works clWaitForEvents returns CL_OUT_OF_RESOU


I am new to this forum, so please be gently. (Hopefully I didn’t miss any previous post regarding my problem.)

So here is my thing: I am writing an application for radiosity light calculation. For the formfactor calculation part: I am rendering many images on the GPU, get them via glGetTexImgae and evaluate them with OpenMP on the CPU. But, when I benchmarked the thing I realized glGetTexImage took nearly 70% of the time. So I wrote an OpenCL Kernel (in fact 2) to evaluate the rendered light ID image (from a skydome) on the GPU. I wrote this on my laptop with OpenCL 1.0 and Geforce 8600M GT. It worked just fine. In high resolutions I got a good speedup of 2 (for my old laptop).

Now, I wanted to test the application on my desktop with Geforce GTX570 (OpenCL 1.1, latest WHQL driver). It crashed. When I debugged the application, clWaitForEvents() returns CL_OUT_OF_RESOURCES after I launched my 2nd kernel. After reading a bit in this forum someone wrote, that this error might be a general error or that my kernel worksizes are set wrong. But it worked on my 8600M GT laptop.

  1. How do I figure out, what went wrong with CL_OUT_OF_RESOURCES?
  2. Reading out of memory bounds on the GPU in my kernel?
  3. Wrong worksizes in my Kernel?
  4. Not enough GPU memory? ;-)

Any hints and answers are very welcome. Thanks in advance! I can deliver code if you want, but I am afraid it would be a little overkill here.

Cheers, Christian

I am 99% sure now, that its a driver bug. On another PC with an Geforce GTX260 my code worked just fine … but all drivers I tested on my GTX570 failed (even old ones with OpenCL 1.0).

Problem solved … It was the internal image format of my rendered stuff. On 8600M GT and 260 GTX the same code produced internally BGRA images. On 570GTX it was RGBA. I don’t know why. It was the same code for all 3 cards. The different color order messed up my color-ID … so I got corrupted memory access … resulting in clWaitForEvents() returned CL_OUT_OF_RESOURCES.

Bye, Christian