xserver: Branch 'master'
Kristian Høgsberg
krh at kemper.freedesktop.org
Thu Apr 2 10:41:28 PDT 2009
glx/glxcmds.c | 5 +++++
glx/glxdrawable.h | 1 +
glx/glxdri2.c | 13 ++++++++++---
3 files changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 91b697efdefba125348dbcaf584ee51a7f8c9bf6
Author: Kristian Høgsberg <krh at redhat.com>
Date: Wed Apr 1 17:42:33 2009 -0400
Support setTexBuffer2 in AIGLX.
Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined
alpha channel for pixmaps.
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 8b6dfbc..80f3a69 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1134,6 +1134,7 @@ static void
determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
{
GLenum target = 0;
+ GLenum format = 0;
int i;
__GLXdrawable *pGlxDraw;
@@ -1150,6 +1151,9 @@ determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
break;
}
}
+
+ if (attribs[2 * i] == GLX_TEXTURE_FORMAT_EXT)
+ format = attribs[2 * i + 1];
}
if (!target) {
@@ -1162,6 +1166,7 @@ determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
}
pGlxDraw->target = target;
+ pGlxDraw->format = format;
}
int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
diff --git a/glx/glxdrawable.h b/glx/glxdrawable.h
index 259b11e..2d787ae 100644
--- a/glx/glxdrawable.h
+++ b/glx/glxdrawable.h
@@ -72,6 +72,7 @@ struct __GLXdrawable {
int refCount;
GLenum target;
+ GLenum format;
/*
** Event mask
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index b12293a..4df406b 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -251,9 +251,16 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
if (texBuffer == NULL)
return Success;
- texBuffer->setTexBuffer(context->driContext,
- glxPixmap->target,
- drawable->driDrawable);
+ if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) {
+ (*texBuffer->setTexBuffer2)(context->driContext,
+ glxPixmap->target,
+ glxPixmap->format,
+ drawable->driDrawable);
+ } else {
+ texBuffer->setTexBuffer(context->driContext,
+ glxPixmap->target,
+ drawable->driDrawable);
+ }
return Success;
}
More information about the xorg-commit
mailing list