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

Sebastian Lackner sebastian at fds-team.de
Wed Nov 25 21:06:10 CST 2015


This reverts commit bfd4836867d6d90eaeae6ccbc02e37678b59b8f1.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---

For bug https://bugs.winehq.org/show_bug.cgi?id=38480
Also helps for https://bugs.winehq.org/show_bug.cgi?id=39563 (resolved as NOTOURBUG).

I am aware that reverting patches should usually be avoided, however I think that
it could be useful in this case. Other comments / ideas are also welcome of course -
also it would be good to know if someone is aware of any real world application
fixed by the original commit.

In theory the commit is correct, however:
  * sometimes graphic drivers only implement part of an extension
  * games do not always handle correctly when extensions/functions are missing

Disadvantage of reverting the commit would be that we can no longer find mistakes
in the OpenGL spec, like for example bug 38264.

 dlls/opengl32/wgl.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 42bf920..75d3796 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -877,10 +877,7 @@ PROC WINAPI wglGetProcAddress( LPCSTR name )
         void *driver_func = funcs->wgl.p_wglGetProcAddress( name );
 
         if (!is_extension_supported(ext_ret->extension))
-        {
             WARN("Extension %s required for %s not supported\n", ext_ret->extension, name);
-            return NULL;
-        }
 
         if (driver_func == NULL)
         {
-- 
2.6.2



More information about the wine-patches mailing list