occlusion query issue [GPU optimisation]

Hello all
i don’t think i am on the right forum but my question seems to be nvidia drivers related.

I’m working on huge optimisation problem using level set 2D formulation using a Fast Iterative Method

Because I make a huge use of the rasterisation in my process Cuda seems not to be fitted for my use
so i build a framework based on multi pass render to texture via FBO with occlusion query to test convergence
I use geometries primitive in order to localize processes done in prixel shader.

However occluson query seems to be buggy and don’t return reliable answer

It result in a poor solution approximation and also
a very strange behavior both under linux and windows :

When my program is stuck ( may be in the occlusion queries waiting loop) it converges if i click in the terminal like a crazy

I saw in gpugem3 that there’s some hack in most driver concerning occlusion queries…could it be that?

In think my poor precsion results came from it too…

If anyone exoeriences problem with massive synchronised occlusion queries (need results before the next frame) , could he help me…

Morever I would like to know if a rasterization process can be done via cuda as cuda don’t allow texture writing?

I need to sleep…

Thanks by advance