I have experimented with glIntercept a bit, but not found anything obvious. Also, I use a macro to check the OpenGL calls.
And of course the good old way of debugging a texture by reading it to the RAM with
glReadPixels(). Interestingly, this call makes the behavior correct (i.e. the texture data is ready before each shader pass), which makes me think texture attachment switches in a single FBO require some kind of explicit synchronization. The problem is, I just can't afford any
glFlush() calls.
If somebody else has an idea, just speculate please
Meanwhile, I'm searching further on the Internet...
Thanks!