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 <[email protected]>
---
 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

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to