Sebastián Aedo : winex11.drv: Change order register_extension for WGL_ARB_pixel_format_float.

Alexandre Julliard julliard at winehq.org
Thu Jun 16 16:38:07 CDT 2022


Module: wine
Branch: master
Commit: b39fa96d0c95b047e54e74aca6a27e556a0f5893
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b39fa96d0c95b047e54e74aca6a27e556a0f5893

Author: Sebastián Aedo <sebastian.aedo29 at gmail.com>
Date:   Wed Jun 15 17:48:09 2022 -0400

winex11.drv: Change order register_extension for WGL_ARB_pixel_format_float.

Some processes use very naive string matching when detecting extensions,
for example, Cossacks III checks if the extension is "contained" in the
current extension is checking, causing that `WGL_ARB_pixel_format` is
contained in `WGL_ARB_pixel_format_float`, but it ends up with the flag
deactivated because they aren't the same.

This makes it consistent with the behavior on winemac.drv/opengl.c
too.

Signed-off-by: Sebastián Aedo <sebastian.aedo29 at gmail.com>

---

 dlls/winex11.drv/opengl.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 91aef7f67be..017a8813caa 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -3180,11 +3180,6 @@ static void X11DRV_WineGL_LoadExtensions(void)
             register_extension("WGL_ARB_create_context_profile");
     }
 
-    if (has_extension( glxExtensions, "GLX_ARB_fbconfig_float"))
-    {
-        register_extension("WGL_ARB_pixel_format_float");
-        register_extension("WGL_ATI_pixel_format_float");
-    }
 
     register_extension( "WGL_ARB_extensions_string" );
     opengl_funcs.ext.p_wglGetExtensionsStringARB = X11DRV_wglGetExtensionsStringARB;
@@ -3214,6 +3209,12 @@ static void X11DRV_WineGL_LoadExtensions(void)
     opengl_funcs.ext.p_wglGetPixelFormatAttribfvARB = X11DRV_wglGetPixelFormatAttribfvARB;
     opengl_funcs.ext.p_wglGetPixelFormatAttribivARB = X11DRV_wglGetPixelFormatAttribivARB;
 
+    if (has_extension( glxExtensions, "GLX_ARB_fbconfig_float"))
+    {
+        register_extension("WGL_ARB_pixel_format_float");
+        register_extension("WGL_ATI_pixel_format_float");
+    }
+
     /* Support WGL_ARB_render_texture when there's support or pbuffer based emulation */
     if (has_extension( glxExtensions, "GLX_ARB_render_texture") ||
         (glxRequireVersion(3) && use_render_texture_emulation))




More information about the wine-cvs mailing list