Prob. with uniform buf. and shader binaries in ATi

Hey there,

a long time ago, I have posted in the AMD/ATi forums about some problems I had. An ATi employee named “frali” there (Frank Li) established contact with me directly and confirmed what I reported, but the last time I addressed him, I got an automated reply back saying that he left the company. In order to cope with the… deviations that the ATi drivers still make from the OpenGL standard (indexing of vertices, absence of vertex data, etc.), I’ve implemented a kind of “workaround infrastructure” in my engine – a set of workarounds that can be enabled and alter the program behavior.

Now there is one specific thing I just can’t seem to solve, at all.
I had reported this:
http://devgurus.amd.com/thread/146505

Today I’ve tried to implement a workaround: Not using that std140 layout, but querying the uniform block index, the uniform indexes in it, and the uniform byte offsets. I’ve rechecked everything countless times, and it works just perfectly on my NVidia system, but on the ATi system, it doesn’t. (so contrary to what I’ve posted there, it’s probably not the fault of the layout that I’ve specified, but a more general problem)

Long story short: If I save a shader and then load it again with the getProgramBinary functions of OpenGL 4, the uniform buffer data layout seems to be exactly the same as in a freshly compiled shader, but loading my modelview and projection matrices into the uniform buffer has almost no effect. At certain transformations, my 3D scene flashes briefly, indicating that some data is in there, but the matrices in GPU memory are too sparse or something like that. Mr. Li had once mailed me that there seems to be a bug and that some values should not be as they appear to be, but now I am left quite helpless.

So here I have one question: Can anyone point me to a sample application or tutorial that uses the loading mechanism to fetch a shader binary and then uses a uniform buffer? I may be doing something wrong in my Engine, something regarding the order in which calls are made or so… but I couldn’t figure out yet what : /

Regards,

Shrinker

Addendum: I have just mapped both matrices that I loaded into the uniform block to memory and checked their values - they are exactly what they should be : /

BTW, have you reminded AMD of this issue lately?

I have given up on trying to contact that vendor directly. It seems to be much more fruitful for me to assume that there is something wrong in how I do it, which could be alleviated by looking at a sample where it actually works and going from there.