On NV it works as expected, fragColor.g is 1. Unfortunately on ATI, fragColor.g is 0. As I checked, I found that all components of modelViewProjMat is 0 whatever I set them. Without the texel fetch the modelViewProjMat is correctly loaded into the shader program.
There's no OpenGL errors raised, the location for the modelViewProjMat uniform is non-negative, so I can only think that it's a driver bug. It happen with a Radeon 4850 with Catalyst 11.12 on Vista 64 bit.

If anyone have found a similiar problem any help is appreciated. Thanks

Re: Problems with TBO on ATI

Ok, I'm sorry, it was my fault. I intercepted the uniforms using the glGetProgram and glGetActiveUniform functions. What I missed is that the location of the uniform and the index used for GetActiveUniform is not the same. For some reasons, the 3 uniforms of the upper program have locations 16, 17 and 18.
But I think glUniform should generate some error if I try to use it with locations 0, 1 and 2.

Re: Problems with TBO on ATI

Originally Posted by thekend

But I think glUniform should generate some error if I try to use it with locations 0, 1 and 2.

It won't generate any errors at fact. The location of uniforms are generated in compiling. Usually, locations are filled in order, which means your 0, 1, 2 are filled by other hidden uniforms. That is because in many cases, driver will patch the user shader code for some specific purposes. Some uniforms are inserted into user shader. It is very important to make sure your uniform location is correct.

Re: Problems with TBO on ATI

Originally Posted by Hongwei Li

It won't generate any errors at fact. The location of uniforms are generated in compiling. Usually, locations are filled in order, which means your 0, 1, 2 are filled by other hidden uniforms. That is because in many cases, driver will patch the user shader code for some specific purposes. Some uniforms are inserted into user shader. It is very important to make sure your uniform location is correct.