Commit d6a98026 authored by Adam Jackson's avatar Adam Jackson

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.
parent 436fd7e8
Pipeline #58347 passed with stages
in 4 minutes and 36 seconds
......@@ -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");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment