xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 26 17:33:31 UTC 2019


 glx/extension_string.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit f8c85961c8fcb283e4ed6fc2b942428e4da2d093
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Aug 22 15:07:18 2019 -0400

    glx: Disable GLX_EXT_import_context if !enableIndirectGLX
    
    GLX_EXT_import_context allows multiple clients to share the same
    indirect context. If you can't create an indirect context, you're
    certainly not going to be able to share one. Hide the extension from the
    server string if we've disabled indirect contexts.
    
    This turns piglit's tests from fail to skip when indirect contexts are
    disabled. Since GLX_EXT_import_context has been supported in
    xfree86-derived servers since day 1 (it was included in the initial GLX
    code drop from SGI), this is now also a hint to the client that indirect
    contexts are unlikely to work at all.
    
    Reviewed-by: Michel Dänzer <michel at daenzer.net>

diff --git a/glx/extension_string.c b/glx/extension_string.c
index 354ce06f7..d7e2c7242 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -31,8 +31,9 @@
  * \author Ian Romanick <idr at us.ibm.com>
  */
 
-#include <string.h>
+#include "dix-config.h"
 #include "extension_string.h"
+#include "opaque.h"
 
 #define SET_BIT(m,b)    (m[ (b) / 8 ] |=  (1U << ((b) % 8)))
 #define CLR_BIT(m,b)    (m[ (b) / 8 ] &= ~(1U << ((b) % 8)))
@@ -85,7 +86,7 @@ static const struct extension_info known_glx_extensions[] = {
     { GLX(EXT_create_context_es2_profile), VER(0,0), N, },
     { GLX(EXT_fbconfig_packed_float),   VER(0,0), N, },
     { GLX(EXT_framebuffer_sRGB),        VER(0,0), N, },
-    { GLX(EXT_import_context),          VER(0,0), Y, },
+    { GLX(EXT_import_context),          VER(0,0), N, },
     { GLX(EXT_libglvnd),                VER(0,0), N, },
     { GLX(EXT_no_config_context),       VER(0,0), N, },
     { GLX(EXT_stereo_tree),             VER(0,0), N, },
@@ -177,4 +178,7 @@ __glXInitExtensionEnableBits(unsigned char *enable_bits)
             SET_BIT(enable_bits, known_glx_extensions[i].bit);
         }
     }
+
+    if (enableIndirectGLX)
+        __glXEnableExtension(enable_bits, "GLX_EXT_import_context");
 }


More information about the xorg-commit mailing list