Revert "opengl32: Return a NULL pointer for functions requiring unsupported or disabled extensions.".
hverbeet at gmail.com
Thu Nov 26 20:24:50 CST 2015
On 26 November 2015 at 12:45, Sebastian Lackner <sebastian at fds-team.de> wrote:
> I don't think Wine can really ignore compatibility with proprietary drivers,
> which in fact are preferred by a lot of people on Linux.
Sure, and I'm not saying that, at least in case of the NVIDIA ones.
But there's a lot of space between completely ignoring those drivers
or breaking them on purpose and going out of our way to make sure
everything works perfectly with the proprietary drivers at the cost of
more complicated code (granted, not a real issue in this specific
case), or compatibility with other drivers.
There's also such a thing as fixing problems in the correct place, and
I'm sure Nouveau would be in much better shape if all the effort spent
on writing workarounds for bugs in the proprietary drivers had been
spent on improving the free drivers instead.
Essentially, I think the number of affected users doesn't outweigh
doing the correct thing in this case.
> Of course there
> might also be other solutions, but its not clear to me why you call this
> solution "wrong", when it works exactly the same way on Windows. You'll
> find plenty of examples where the Windows driver returns a non-NULL pointer,
> although the corresponding extension is not listed / supported.
Not exactly. In the cases where the Windows driver returns a non-NULL
pointer, calling that pointer will usually do something more or less
reasonable. I.e., there may be functions that are available for which
no corresponding extension is advertised in the extension string, but
you won't get back a pointer for functions that aren't implemented at
all. Checking for a non-NULL pointer from wglGetProcAddress() is a
valid way to check if a function is available on WGL.
With GLX that's not the case, and calling glXGetProcAddress() with a
random string will return a non-NULL pointer, that in the (arguably)
best case just does nothing when you call it. The only valid way to
check if an extension is available on GLX is to check the extension
string. Calling glXGetProcAddress("glCopyTexSubImage3DEXT") may return
a valid pointer on one driver, but an invalid one on another, with no
way to distinguish between the two until after you've called them.
More information about the wine-devel