[PATCH xserver 4/8] xwin/glx: Always enable GLX_SGIX_pbuffer

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


Again, this is enabled unconditionally by the GLX core.  If the backend
doesn't have WGL_EXT_pbuffer then we won't set the pbuffer bit on any
fbconfigs. Note that the dri2/drisw backends back pbuffers with pixmaps,
so the "clobber" semantics never come into play. Since pbuffer usage is
pretty rare in any case, the same implementation strategy could be taken
for the xwin glx engine too.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xwin/glx/indirect.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index b4b773f..626238f 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -645,6 +645,10 @@ glxWinScreenProbe(ScreenPtr pScreen)
         if (strstr(wgl_extensions, "WGL_ARB_multisample"))
             screen->has_WGL_ARB_multisample = TRUE;
 
+        // GLX_SGIX_pbuffer is always enabled, even if no configs support it
+        if (strstr(wgl_extensions, "WGL_ARB_pbuffer"))
+            screen->has_WGL_ARB_pbuffer = TRUE;
+
         if (strstr(wgl_extensions, "WGL_ARB_make_current_read")) {
             __glXEnableExtension(screen->glx_enable_bits,
                                  "GLX_SGI_make_current_read");
@@ -675,12 +679,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
 /*           screen->has_WGL_ARB_render_texture = TRUE; */
 /*         } */
 
-        if (strstr(wgl_extensions, "WGL_ARB_pbuffer")) {
-            __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_pbuffer");
-            LogMessage(X_INFO, "AIGLX: enabled GLX_SGIX_pbuffer\n");
-            screen->has_WGL_ARB_pbuffer = TRUE;
-        }
-
         screen->base.destroy = glxWinScreenDestroy;
         screen->base.createContext = glxWinCreateContext;
         screen->base.createDrawable = glxWinCreateDrawable;
@@ -740,7 +738,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
         // SGIX_fbconfig && SGIX_pbuffer && SGI_make_current_read -> 1.3
         // ARB_multisample -> 1.4
         //
-        if (screen->has_WGL_ARB_pbuffer && glx_sgi_make_current_read) {
+        if (glx_sgi_make_current_read) {
             screen->base.GLXmajor = 1;
             screen->base.GLXminor = 4;
         }
-- 
2.5.0



More information about the xorg-devel mailing list