[Bug 39563] Oddworld: Stranger's Wrath HD crashes when starting a new game

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Nov 8 22:32:17 CST 2015


https://bugs.winehq.org/show_bug.cgi?id=39563

Alex Henrie <alexhenrie24 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thunderbird2k at gmail.com

--- Comment #6 from Alex Henrie <alexhenrie24 at gmail.com> ---
Never mind, I found my answer in the source code for is_extension_supported
<https://source.winehq.org/git/wine.git/blob/cbaab82d086e36dacaa22c6adf80f9114bb820fb:/dlls/opengl32/wgl.c#l802>:

    /* We use the GetProcAddress function from the display driver to retrieve
function pointers
     * for OpenGL and WGL extensions. In case of winex11.drv the OpenGL
extension lookup is done
     * using glXGetProcAddress. This function is quite unreliable in the sense
that its specs don't
     * require the function to return NULL when an extension isn't found. For
this reason we check
     * if the OpenGL extension required for the function we are looking up is
supported. */

This is corroborated by the GLX 1.4 specification
<https://www.opengl.org/registry/doc/glx1.4.pdf#page=41>:

    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(GL_EXTENSIONS) or glXQueryExtensionsString to determine if an
    extension is supported by a particular context.

The documentation at <https://www.opengl.org/wiki/Load_OpenGL_Functions> makes
it sound like calling a function without checking the current context's
extension string can cause a program crash, so reverting
bfd4836867d6d90eaeae6ccbc02e37678b59b8f1 would probably just trade one set of
program crashes for another.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list