diff options
author | Adam Jackson <ajax@redhat.com> | 2019-08-22 15:07:18 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2019-08-26 13:23:58 -0400 |
commit | f8c85961c8fcb283e4ed6fc2b942428e4da2d093 (patch) | |
tree | f5fcb9477f94aac5f0600683d29159193ca763e8 /glx | |
parent | 4f27d1e05f67eb8953a9bbed7e6f34b03456c64f (diff) |
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@daenzer.net>
Diffstat (limited to 'glx')
-rw-r--r-- | glx/extension_string.c | 8 |
1 files changed, 6 insertions, 2 deletions
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@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"); } |