diff options
author | Adam Jackson <ajax@redhat.com> | 2016-05-09 13:28:08 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-06-20 11:49:43 -0400 |
commit | d7ae950c1d08724144514151afe47a3fd8e84f3c (patch) | |
tree | d8f5efcfc6ec3d4ce02095b9b329f007c2aa9fd0 /hw | |
parent | 02f9b3c18f6561d47b518bdcd6043a0ec8995c32 (diff) |
xfree86: Add IndirectGLX server flag (v2)
Not all display managers make it easy (or possible) to modify the
command line flags passed to the server, so add a way to get to it from
xorg.conf.
v2: Fix the FlagOptions list to not have IGLX after the terminator (Alan
Coopersmith)
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 4fca18dc03669bada75175df289fbee41275208e)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 9 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Privstr.h | 1 | ||||
-rw-r--r-- | hw/xfree86/man/xorg.conf.man | 4 |
4 files changed, 18 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 0c067c0c9..07f8fb41a 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -700,6 +700,7 @@ typedef enum { FLAG_USE_SIGIO, FLAG_AUTO_ADD_GPU, FLAG_MAX_CLIENTS, + FLAG_IGLX, } FlagValues; /** @@ -761,6 +762,8 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE}, {FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER, {0}, FALSE }, + {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN, + {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; @@ -943,6 +946,12 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Info.aiglx = value; xf86Info.aiglxFrom = X_CONFIG; } + if (xf86Info.iglxFrom != X_CMDLINE) { + if (xf86GetOptValBool(FlagOptions, FLAG_IGLX, &value)) { + enableIndirectGLX = value; + xf86Info.iglxFrom = X_CONFIG; + } + } #endif /* if we're not hotplugging, force some input devices to exist */ diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index de51497b5..a3e58ba16 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1457,6 +1457,10 @@ ddxProcessArgument(int argc, char **argv, int i) xf86Info.ShareVTs = TRUE; return 1; } + if (!strcmp(argv[i], "-iglx") || !strcmp(argv[i], "+iglx")) { + xf86Info.iglxFrom = X_CMDLINE; + return 1; + } /* OS-specific processing */ return xf86ProcessArgument(argc, argv, i); diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h index 58d5a0f13..c5d24eac0 100644 --- a/hw/xfree86/common/xf86Privstr.h +++ b/hw/xfree86/common/xf86Privstr.h @@ -89,6 +89,7 @@ typedef struct { MessageType randRFrom; Bool aiglx; MessageType aiglxFrom; + MessageType iglxFrom; XF86_GlxVisuals glxVisuals; MessageType glxVisualsFrom; diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man index 08eb7a93a..e33114dda 100644 --- a/hw/xfree86/man/xorg.conf.man +++ b/hw/xfree86/man/xorg.conf.man @@ -644,6 +644,10 @@ Default is disabled. .BI "Option \*qAIGLX\*q \*q" boolean \*q enable or disable AIGLX. AIGLX is enabled by default. .TP 7 +.BI "Option \*qIndirectGLX\*q \*q" boolean \*q +enable or disable indirect GLX contexts. Indirect GLX contexts are disabled by +default. +.TP 7 .BI "Option \*qDRI2\*q \*q" boolean \*q enable or disable DRI2. DRI2 is disabled by default. .TP 7 |