Revert "opengl32: Return a NULL pointer for functions requiring unsupported or disabled extensions.".

Alex Henrie alexhenrie24 at
Fri Nov 27 13:15:46 CST 2015

2015-11-27 0:54 GMT-07:00 Alexandre Julliard <julliard at>:
> Sebastian Lackner <sebastian at> writes:
>> @Alexandre: Just to make sure I tested it in practice, and it indeed solves
>> the bug. It would be acceptable but 1.8, but wouldn't solve
>> for example. I am aware that
>> its technically not a Wine bug, but it could still be solved by being less
>> strict with extension filtering. Both MESA and NVIDIA return valid valid
>> function pointers in this case.
> Actually I would argue that it is a Wine bug. If you can get a valid
> function on Windows even when the extension is missing, you should get
> one on Wine. Conversely, if you get a NULL pointer on Windows for a
> missing function, you should get NULL on Wine too.
> This means that we have a responsibility to properly remap functions and
> extensions between the Windows and the Unix side. We can't simply
> forward to the Unix driver and hope that it happens to follow the
> Windows semantics.

After giving it some thought, I think this could work. As long as
we're sure that suffixed functions behave identically to their
unsuffixed counterparts, we should be able to return a function
pointer to a suffixed function even though a unsuffixed function was
requested (as long as the suffixed function is advertised in the
extension list).

This would match both:
- Windows returning function pointers for unsuffixed functions even
though the rest of the OpenGL version is not available
- GLX providing no guarantee that calling a function not defined in
the GL version or extension list won't crash the program, even though
an unsuffixed equivalent could work fine

And it would cleanly resolve bugs 38480 and 39563.


More information about the wine-devel mailing list