[PATCH xserver 3/8] {xwin, xquartz}/glx: Always enable GLX_{ARB, SGIS}_multisample

Adam Jackson ajax at redhat.com
Mon Mar 21 20:29:41 UTC 2016


This is enabled unconditionally in the GLX core. For xwin, if the
backend doesn't support WGL_ARB_multisample, there will simply be no
fbconfigs that support it.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xquartz/GL/indirect.c |  3 ---
 hw/xwin/glx/indirect.c   | 24 ++++++------------------
 2 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 4f3e2e4..54c9073 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -555,9 +555,6 @@ __glXAquaScreenProbe(ScreenPtr pScreen)
     __glXEnableExtension(screen->glx_enable_bits, "GLX_OML_swap_method");
     __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_fbconfig");
 
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIS_multisample");
-    __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_multisample");
-
     //__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context");
     //__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_profile");
 
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index a01757b..b4b773f 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -641,6 +641,10 @@ glxWinScreenProbe(ScreenPtr pScreen)
         __glXEnableExtension(screen->glx_enable_bits, "GLX_OML_swap_method");
         __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_fbconfig");
 
+        // GLX_ARB_multisample is always enabled, even if no configs support it
+        if (strstr(wgl_extensions, "WGL_ARB_multisample"))
+            screen->has_WGL_ARB_multisample = TRUE;
+
         if (strstr(wgl_extensions, "WGL_ARB_make_current_read")) {
             __glXEnableExtension(screen->glx_enable_bits,
                                  "GLX_SGI_make_current_read");
@@ -677,16 +681,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
             screen->has_WGL_ARB_pbuffer = TRUE;
         }
 
-        if (strstr(wgl_extensions, "WGL_ARB_multisample")) {
-            __glXEnableExtension(screen->glx_enable_bits,
-                                 "GLX_ARB_multisample");
-            __glXEnableExtension(screen->glx_enable_bits,
-                                 "GLX_SGIS_multisample");
-            LogMessage(X_INFO,
-                       "AIGLX: enabled GLX_ARB_multisample and GLX_SGIS_multisample\n");
-            screen->has_WGL_ARB_multisample = TRUE;
-        }
-
         screen->base.destroy = glxWinScreenDestroy;
         screen->base.createContext = glxWinCreateContext;
         screen->base.createDrawable = glxWinCreateDrawable;
@@ -747,14 +741,8 @@ glxWinScreenProbe(ScreenPtr pScreen)
         // ARB_multisample -> 1.4
         //
         if (screen->has_WGL_ARB_pbuffer && glx_sgi_make_current_read) {
-            if (screen->has_WGL_ARB_multisample) {
-                screen->base.GLXmajor = 1;
-                screen->base.GLXminor = 4;
-            }
-            else {
-                screen->base.GLXmajor = 1;
-                screen->base.GLXminor = 3;
-            }
+            screen->base.GLXmajor = 1;
+            screen->base.GLXminor = 4;
         }
     }
     LogMessage(X_INFO, "AIGLX: Set GLX version to %d.%d\n",
-- 
2.5.0



More information about the xorg-devel mailing list