File U_xfree86-Add-IndirectGLX-server-flag.patch of Package xorg-x11-server.6681
Git-commit: 4fca18dc03669bada75175df289fbee41275208e
Patch-Mainline: Upstream
Author: Adam Jackson <ajax@redhat.com>
Subject: xfree86: Add IndirectGLX server flag (v2)
Signed-off-by: Michal Srb <msrb@suse.com>
References: bnc#1031887
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>
Index: xorg-server-1.17.2/hw/xfree86/common/xf86Config.c
===================================================================
--- xorg-server-1.17.2.orig/hw/xfree86/common/xf86Config.c
+++ xorg-server-1.17.2/hw/xfree86/common/xf86Config.c
@@ -698,6 +698,7 @@ typedef enum {
FLAG_DRI2,
FLAG_USE_SIGIO,
FLAG_AUTO_ADD_GPU,
+ FLAG_IGLX,
} FlagValues;
/**
@@ -759,6 +760,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE},
{FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN,
{0}, FALSE},
+ {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN,
+ {0}, FALSE},
{-1, NULL, OPTV_NONE,
{0}, FALSE},
};
@@ -942,6 +945,12 @@ configServerFlags(XF86ConfFlagsPtr flags
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 */
Index: xorg-server-1.17.2/hw/xfree86/common/xf86Init.c
===================================================================
--- xorg-server-1.17.2.orig/hw/xfree86/common/xf86Init.c
+++ xorg-server-1.17.2/hw/xfree86/common/xf86Init.c
@@ -1456,6 +1456,10 @@ ddxProcessArgument(int argc, char **argv
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);
Index: xorg-server-1.17.2/hw/xfree86/common/xf86Privstr.h
===================================================================
--- xorg-server-1.17.2.orig/hw/xfree86/common/xf86Privstr.h
+++ xorg-server-1.17.2/hw/xfree86/common/xf86Privstr.h
@@ -90,6 +90,7 @@ typedef struct {
MessageType randRFrom;
Bool aiglx;
MessageType aiglxFrom;
+ MessageType iglxFrom;
XF86_GlxVisuals glxVisuals;
MessageType glxVisualsFrom;
Index: xorg-server-1.17.2/hw/xfree86/man/xorg.conf.man
===================================================================
--- xorg-server-1.17.2.orig/hw/xfree86/man/xorg.conf.man
+++ xorg-server-1.17.2/hw/xfree86/man/xorg.conf.man
@@ -640,6 +640,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