[PATCH] glx: Lie about GLX_Y_INVERTED_EXT

Adam Jackson ajax at redhat.com
Thu Oct 31 23:39:22 CET 2013


Well, that was lame.  The problem with reporting y inversion honestly is
that libGL asks the driver _its_ opinion of Y inversion, which it just
fabricates from whole cloth.  So then when libGL goes to compare the
driver's idea of fbconfigs with that of the server - a fairly dumb idea
to begin with - nothing matches, and direct rendering fails, and
sadness.

So until the DRI drivers are fixed we should just continue to lie about
Y inversion.  GLX_DONT_CARE is what libGL would make up for that
attribute if we hadn't sent it, so just send that instead.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glx/glxcmds.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 64ebf9e..efa4aec 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1118,7 +1118,8 @@ DoGetFBConfigs(__GLXclientState * cl, unsigned screen)
         WRITE_PAIR(GLX_BIND_TO_MIPMAP_TEXTURE_EXT, modes->bindToMipmapTexture);
         WRITE_PAIR(GLX_BIND_TO_TEXTURE_TARGETS_EXT,
                    modes->bindToTextureTargets);
-	WRITE_PAIR(GLX_Y_INVERTED_EXT, modes->yInverted);
+	/* can't report honestly until mesa is fixed */
+	WRITE_PAIR(GLX_Y_INVERTED_EXT, GLX_DONT_CARE);
 	if (modes->drawableType & GLX_PBUFFER_BIT) {
 	    WRITE_PAIR(GLX_MAX_PBUFFER_WIDTH, modes->maxPbufferWidth);
 	    WRITE_PAIR(GLX_MAX_PBUFFER_HEIGHT, modes->maxPbufferHeight);
-- 
1.8.3.1



More information about the xorg-devel mailing list