ATI: glCreateShader not sharing across contexts

As the subject line states, glCreateShader does not appear to be sharing shader objects between multiple shared contexts.

Has anyone else experienced this? Have I misunderstood something. i.e. are shader objects not actually shared?

I’m currently using latest Catalyst 10.9 drivers on an HD4850.

The same code works on NVidia (I realize that doesn’t necessarily mean it’s correct though).

OpenGL documentation says:

Like texture objects, the name space for shader objects may be shared across a set of contexts, as long as the server sides of the contexts share the same address space. If the name space is shared across contexts, any attached objects and the data associated with those attached objects are shared as well.

Be sure the sharing was done correctly. Test that texture sharing works.

I’ll double check with texture sharing just to be sure, and report back this afternoon.

I tested texture sharing and it appears to work as expected.

i.e. Create a texture with one context, switch to another and call glIsTexture to confirm that the second context returns true.

The same (instead calling glIsShader) does not work for shaders.

Can anyone else with an ATI card confirm this?

fyi, we have some tests showing that sharing of program works (with drawing), although it is not directly testing that the shader names are shared; since most of the code is shared for all types, I am not expecting any big difference there.

Since you mentioned it, I tested that as well, and glIsProgram does return true for shared shader programs.

However, the shader objects themselves do not appear to be sharing properly. I build shader programs on the fly, so it’s possible that shader programs may be built from shaders that were compiled with a different (shared) context.

Without the shader objects sharing properly, the following code fails:

glAttachShader( ProgramID, SharedShaderID );

Because the current context does not recognize the shared ShaderID.

I just wanted to follow up. ATI/AMD is in the clear. My bad on this one. I’m using Qt for some OpenGL GUI work and it turns out that something less than kosher was happening on the application/Qt side of things.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.