mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 04:28:03 +02:00
Support setTexBuffer2 in AIGLX.
Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined
alpha channel for pixmaps.
(cherry picked from commit 91b697efde)
This commit is contained in:
parent
ee6ce7e4cc
commit
e34a12b18f
3 changed files with 16 additions and 3 deletions
|
|
@ -1133,6 +1133,7 @@ static void
|
|||
determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
|
||||
{
|
||||
GLenum target = 0;
|
||||
GLenum format = 0;
|
||||
int i;
|
||||
__GLXdrawable *pGlxDraw;
|
||||
|
||||
|
|
@ -1149,6 +1150,9 @@ determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (attribs[2 * i] == GLX_TEXTURE_FORMAT_EXT)
|
||||
format = attribs[2 * i + 1];
|
||||
}
|
||||
|
||||
if (!target) {
|
||||
|
|
@ -1161,6 +1165,7 @@ determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
|
|||
}
|
||||
|
||||
pGlxDraw->target = target;
|
||||
pGlxDraw->format = format;
|
||||
}
|
||||
|
||||
int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ struct __GLXdrawable {
|
|||
int refCount;
|
||||
|
||||
GLenum target;
|
||||
GLenum format;
|
||||
|
||||
/*
|
||||
** Event mask
|
||||
|
|
|
|||
|
|
@ -221,9 +221,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue