xserver: Branch 'master' - 4 commits
Adam Jackson
ajax at kemper.freedesktop.org
Wed Jan 25 16:39:37 UTC 2017
composite/compositeext.h | 2 ++
composite/compwindow.c | 7 +------
glx/glxcmds.c | 5 +++--
glx/glxscreens.c | 5 +++++
4 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit ea483af99a6351323afe00a0b630cd63310efdb1
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Jan 19 17:20:49 2017 -0500
glx: Move Composite's synthetic visuals to a different select group
Should you find yourself using a 16bpp display while also using a
compositor, you poor soul, you may find that your GLX applications
behave strangely; in particular, glxgears will be transparent. This is
because it clears to (0,0,0,0) which is transparent if you honor alpha,
and it will choose the synthetic visual because it has the most
available r/g/b bits.
To avoid this, bump synthetic visuals to a higher (less-preferred)
select group. Unless the client explicitly asks for non-zero alpha bits,
this will prefer any rgb565 visual ahead of the argb8888 visual.
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 536c0c4..78e0aaf 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -43,6 +43,7 @@
#include "glxutil.h"
#include "glxext.h"
#include "protocol-versions.h"
+#include "compositeext.h"
static DevPrivateKeyRec glxScreenPrivateKeyRec;
@@ -336,6 +337,10 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen)
if (config) {
pGlxScreen->visuals[pGlxScreen->numVisuals++] = config;
config->visualID = visual->vid;
+#ifdef COMPOSITE
+ if (compIsAlternateVisual(pScreen, visual->vid))
+ config->visualSelectGroup++;
+#endif
}
}
commit 43efaa6e4fd903229dc9c508da4177ad4bbdd4d8
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Jan 19 17:20:49 2017 -0500
glx: Send GLX_VISUAL_SELECT_GROUP_SGIX attribute for visuals
We already send this for fbconfigs. Mesa happens to implement
glXChooseVisual relative to the fbconfig data, but that might not be
true of NVIDIA's libGL.
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 5873cb4..67f9509 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1030,13 +1030,14 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
buf[p++] = modes->samples;
buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
buf[p++] = modes->sampleBuffers;
+ buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
+ buf[p++] = modes->visualSelectGroup;
/* Add attribute only if its value is not default. */
if (modes->sRGBCapable != GL_FALSE) {
buf[p++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT;
buf[p++] = modes->sRGBCapable;
}
- /* Don't add visualSelectGroup (GLX_VISUAL_SELECT_GROUP_SGIX)?
- * Pad the remaining place with zeroes, so that attributes count is constant. */
+ /* Pad with zeroes, so that attributes count is constant. */
while (p < GLX_VIS_CONFIG_TOTAL) {
buf[p++] = 0;
buf[p++] = 0;
commit ef2345aaa28461a76f77c65240ce5facc180f98e
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Jan 19 17:20:49 2017 -0500
composite: Export compIsAlternateVisual
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/composite/compositeext.h b/composite/compositeext.h
index b96cb1d..5aad073 100644
--- a/composite/compositeext.h
+++ b/composite/compositeext.h
@@ -39,6 +39,8 @@ extern _X_EXPORT Bool CompositeRegisterImplicitRedirectionException(ScreenPtr pS
VisualID parentVisual,
VisualID winVisual);
+
+extern _X_EXPORT Bool compIsAlternateVisual(ScreenPtr pScreen, XID visual);
extern _X_EXPORT RESTYPE CompositeClientWindowType;
#endif /* _COMPOSITEEXT_H_ */
diff --git a/composite/compwindow.c b/composite/compwindow.c
index fa7d574..367f23e 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -320,7 +320,7 @@ compClipNotify(WindowPtr pWin, int dx, int dy)
}
}
-static Bool
+Bool
compIsAlternateVisual(ScreenPtr pScreen, XID visual)
{
CompScreenPtr cs = GetCompScreen(pScreen);
commit bccbaf7c113b1300071601879002682ebbe8b1c1
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Jan 19 17:20:49 2017 -0500
composite: Remove a misleading comment
This comment is above compIsAlternateVisual, which used to be the only
thing determining whether implicit redirect was needed. It's not anymore
due to the redirection exception list. That job is now performed by
compImplicitRedirect, whose code is self-explanitory.
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/composite/compwindow.c b/composite/compwindow.c
index bcd230c..fa7d574 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -320,11 +320,6 @@ compClipNotify(WindowPtr pWin, int dx, int dy)
}
}
-/*
- * Returns TRUE if the window needs server-provided automatic redirect,
- * which is true if the child and parent aren't both regular or ARGB visuals
- */
-
static Bool
compIsAlternateVisual(ScreenPtr pScreen, XID visual)
{
More information about the xorg-commit
mailing list