Mesa (master): st/xorg: Fix comp alpha code and deal with luminance masks

Alan Hourihane alanh at fairlite.co.uk
Mon Nov 16 14:51:39 PST 2009


On Mon, 2009-11-16 at 22:44 +0000, Alan Hourihane wrote:
> On Mon, 2009-11-16 at 14:36 -0800, Jakob Bornecrantz wrote:
> > Module: Mesa
> > Branch: master
> > Commit: cb060f3b987c9fa07ebe06cf2e7e54d1eaded1e1
> > URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb060f3b987c9fa07ebe06cf2e7e54d1eaded1e1
> > 
> > Author: Jakob Bornecrantz <jakob at vmware.com>
> > Date:   Mon Nov 16 22:57:43 2009 +0100
> > 
> > st/xorg: Fix comp alpha code and deal with luminance masks
> > 
> > There are two fixes in here one is a one liner that fixes
> > component alpha logic. The other deals better with luminance
> > formats used for masks, sources not yet implemented.
> > 
> > Fixes component alpha text and icons in gnome. There are a one
> > or two cases that this code misses. Like if src_luminance is set
> > but no mask image is given.
> > 
> > ---
> > 
> >  src/gallium/state_trackers/xorg/xorg_composite.c |    5 ++-
> >  src/gallium/state_trackers/xorg/xorg_exa.c       |    3 +
> >  src/gallium/state_trackers/xorg/xorg_exa_tgsi.c  |   58 ++++++++++++++++++++--
> >  src/gallium/state_trackers/xorg/xorg_exa_tgsi.h  |    2 +
> >  4 files changed, 62 insertions(+), 6 deletions(-)
> > 
> > diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c
> > index 1ff19a2..93a3e1b 100644
> > --- a/src/gallium/state_trackers/xorg/xorg_composite.c
> > +++ b/src/gallium/state_trackers/xorg/xorg_composite.c
> > @@ -235,8 +235,11 @@ picture_format_fixups(struct exa_pixmap_priv *pSrc, PicturePtr pSrcPicture, bool
> >     boolean swizzle = FALSE;
> >     unsigned ret = 0;
> >  
> > -   if (pSrc->picture_format == pSrcPicture->format)
> > +   if (pSrc->picture_format == pSrcPicture->format) {
> > +      if (pSrc->picture_format == PICT_a8)
> > +         return mask ? FS_MASK_LUMINANCE : FS_MASK_LUMINANCE;
> >        return 0;
> > +   }
> 
> Mmm,
> 
> I guess this should say....
> 
> 	return mask ? FS_MASK_LUMINANCE : FS_SET_LUMINANCE;
> 

Whoops. Not _SET_, but _SRC_ ??

Alan.



More information about the mesa-commit mailing list