No subject


Tue Aug 30 15:12:41 CDT 2005


     WGL_ACCELERATION_ARB
     Indicates whether the pixel format is supported by the driver.
     If this is set to WGL_NO_ACCELERATION_ARB then only the software
     renderer supports this pixel format; if this is set to
     WGL_GENERIC_ACCELERATION_ARB then the pixel format is supported
     by an MCD driver; if this is set to WGL_FULL_ACCELERATION_ARB
     then the pixel format is supported by an ICD driver.

The current CVS code returns only GL_TRUE or GL_FALSE, neither of
which map correctly to any of the WGL_XXX_ACCELERATION_ARB enums.

In particular, World of Warcraft uses this query to determine what
anti-alias visuals are available.  Using the attached patch, the game
correctly enumerates all available multisample (FSAA) visuals and
provides the complete and correct list to the user in-game.

Todo: 
1) How should we handle GLX_NON_CONFORMANT?  Since the intention of
   such a visual is to bypass OpenGL conformance in favour of
   performance, it seems most logical to me that these are
   WGL_FULL_ACCELERATION_ARB visuals... the other option would be
   ARB_NO_ACCELERATION_ARB, which most likely is not true, but might
   prevent artifacts.

2) If an application specifies WGL_ACCELERATION_ARB to
   wglChoosePixelFormat(), we should probably add a GLX_CONFIG_CAVEAT
   = GLX_NONE to filter out GLX_SLOW_CONFIG and
   GLX_NON_CONFORMANT_CONFIG visuals.


-- 
Aric Cyr <acyr at alumni dot uwaterloo dot ca>    (http://acyr.net)
gpg fingerprint: 943A 1549 47AC D766 B7F8  D551 6703 7142 C282 D542

--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="wgl_acceleration_arb.patch"

diff -ru wine-20050419/dlls/opengl32/wgl_ext.c wine-20050419-fbcon/dlls/opengl32/wgl_ext.c
--- wine-20050419/dlls/opengl32/wgl_ext.c	2005-05-09 17:12:10.000000000 +0900
+++ wine-20050419-fbcon/dlls/opengl32/wgl_ext.c	2005-05-09 17:10:55.000000000 +0900
@@ -250,6 +250,10 @@
 #define WGL_STENCIL_BITS_ARB			0x2023
 #define WGL_AUX_BUFFERS_ARB			0x2024
 
+#define WGL_NO_ACCELERATION_ARB			0x2025
+#define WGL_GENERIC_ACCELERATION_ARB		0x2026
+#define WGL_FULL_ACCELERATION_ARB		0x2027
+
 #define WGL_PBUFFER_WIDTH_ARB                   0x2034
 #define WGL_PBUFFER_HEIGHT_ARB                  0x2035
 #define WGL_PBUFFER_LOST_ARB                    0x2036
@@ -423,12 +427,12 @@
       hTest = glXGetFBConfigAttrib(display, curCfg, curGLXAttr, &tmp);
       if (hTest) goto get_error;
       switch (tmp) {
-      case GLX_NONE: piValues[i] = GL_TRUE; break;
-      case GLX_SLOW_CONFIG: piValues[i] = GL_FALSE; break;
-      case GLX_NON_CONFORMANT_CONFIG: piValues[i] = GL_TRUE; break; /** really GL_TRUE ? */
+      case GLX_NONE: piValues[i] = WGL_FULL_ACCELERATION_ARB; break;
+      case GLX_SLOW_CONFIG: piValues[i] = WGL_NO_ACCELERATION_ARB; break;
+      case GLX_NON_CONFORMANT_CONFIG: piValues[i] = WGL_FULL_ACCELERATION_ARB; break;
       default:
 	ERR("unexpected Config Caveat(%x)\n", tmp);
-	piValues[i] = GL_FALSE;
+	piValues[i] = WGL_NO_ACCELERATION_ARB;
       }
       continue ;
 

--dDRMvlgZJXvWKvBx--



More information about the wine-patches mailing list