I have two gl (shared) contexts, each current in a different thread.
In one thread I create and upload data to a pixel buffer. Then I create some textures and fill them with parts of that pixel buffer. At the end I call glFinish() and set a boolean variable (ready = true) and release the gl context.
On the main thread I draw an animated quad. If the ready variable is true then texture map the quad. Everything works except that the animation is affected by the other thread. I mean, gl commands on the worker thread are affecting the main thread.
Moreover, in my intel hd 3000, everything works smooth. in my gt520 the worker thread really affects the smoothness of the animation.
So, how to properly execute gl commands in the background without touching the main thread and its rendering/animation?
[QUOTE=promag;1240934]You mean poll the fence on the worker thread like:
// for(;
// do work
// fence
// flush
// while not signaled wait[/QUOTE]
No, I meant exactly as you described in your previous post. In my understanding this is how it’s supposed to work, maybe somebody with more insight on the NVidia driver can comment.
swap buffer on the rendering context is forcing something like glFinish in the worker context
commands that usually stall the pipeline are stalling both contexts
However, I realize that I’m trying to do the same amount of work independently of the GPU.
So, how I can get hardware capabilities so I can upper limit the worker load?