Support setTexBuffer2 in AIGLX.
Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined alpha channel for pixmaps.
This commit is contained in:
parent
1c101d75d4
commit
91b697efde
|
@ -1134,6 +1134,7 @@ static void
|
||||||
determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
|
determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
|
||||||
{
|
{
|
||||||
GLenum target = 0;
|
GLenum target = 0;
|
||||||
|
GLenum format = 0;
|
||||||
int i;
|
int i;
|
||||||
__GLXdrawable *pGlxDraw;
|
__GLXdrawable *pGlxDraw;
|
||||||
|
|
||||||
|
@ -1150,6 +1151,9 @@ determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (attribs[2 * i] == GLX_TEXTURE_FORMAT_EXT)
|
||||||
|
format = attribs[2 * i + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!target) {
|
if (!target) {
|
||||||
|
@ -1162,6 +1166,7 @@ determineTextureTarget(XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs)
|
||||||
}
|
}
|
||||||
|
|
||||||
pGlxDraw->target = target;
|
pGlxDraw->target = target;
|
||||||
|
pGlxDraw->format = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
|
int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
|
|
@ -72,6 +72,7 @@ struct __GLXdrawable {
|
||||||
int refCount;
|
int refCount;
|
||||||
|
|
||||||
GLenum target;
|
GLenum target;
|
||||||
|
GLenum format;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Event mask
|
** Event mask
|
||||||
|
|
|
@ -251,9 +251,16 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
||||||
if (texBuffer == NULL)
|
if (texBuffer == NULL)
|
||||||
return Success;
|
return Success;
|
||||||
|
|
||||||
texBuffer->setTexBuffer(context->driContext,
|
if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) {
|
||||||
glxPixmap->target,
|
(*texBuffer->setTexBuffer2)(context->driContext,
|
||||||
drawable->driDrawable);
|
glxPixmap->target,
|
||||||
|
glxPixmap->format,
|
||||||
|
drawable->driDrawable);
|
||||||
|
} else {
|
||||||
|
texBuffer->setTexBuffer(context->driContext,
|
||||||
|
glxPixmap->target,
|
||||||
|
drawable->driDrawable);
|
||||||
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue