Comment 6 for bug 905456

(In reply to comment #2)
> (In reply to comment #1)
> > There is a bug in the 32-bit mesa build, when asm is enabled -
> > glXGetProcAddress returns non-NULL for any string starting with "gl".
> >
> > In this case the app calls glXGetProcAddress with the incorrect function name,
> > e.g. "glCreateShaderObject", mesa incorrectly returns non-NULL, the app calls
> > it.
> Sounds like a bug in the application to me. From the GLX 1.4 spec (though
> that's certainly not new in 1.4):
>
> "A non-NULL return value for glXGetProcAddress does not guarantee that an
> extension function is actually supported at runtime. The client must also query
> glGetString() or glXQueryExtensionsString to determine if an extension is
> supported by a particular context."

AFAICS the problem is that extension is supported (ARB_shader_objects), but the app tries glxGetProcAddress with the wrong name first (glCreateShaderObject), and if it returns NULL, then the app tries the same name with the "ARB" suffix and gets the correct pointer. When glXGetProcAddress returns non-NULL for the wrong name, the app just uses the returned pointer, which leads to nowhere. You can view the code here (see loadsym function) :

http://hg.icculus.org/icculus/mojoshader/file/12e1db42bf75/mojoshader_opengl.c