[Mesa-dev] [Bug 43896] Mesa assembly breaks Super Meat Boy, Shank

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Dec 17 06:36:09 PST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=43896

--- Comment #4 from Vadim <ptpzz at yandex.ru> 2011-12-17 06:36:09 PST ---
(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

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list