DRI2 RGB / RGBA visual problems [WAS: Re: intel 2.6.0: EXA choppy, UXA has artifacts]

Michel Dänzer michel at daenzer.net
Wed Jan 21 07:46:23 PST 2009


On Wed, 2009-01-21 at 13:16 +0000, Peter Clifton wrote:
> On Wed, 2009-01-21 at 08:54 +0100, Michel Dänzer wrote:
> > On Wed, 2009-01-21 at 04:45 +0000, Peter Clifton wrote:
> > > 
> > > Questions to those who might know..
> > > 
> > > Should DRI2 be clearing the Alpha channel (even if it requires making a
> > > copy for these cases)?
> > 
> > It mustn't do this for pixmaps that actually have an alpha channel, and
> > it shouldn't need to otherwise.
> > 
> > 
> > > Should compiz be decorating RGB windows using shadows which require
> > > RGBA?
> > 
> > I don't think there should be a problem with that; traditionally compiz
> > doesn't reparent application windows but uses separate drawables for the
> > decorations.
> 
> Ok - I probably just need to figure out what its doing, and why its
> triggering my test for the "window" being 24 bits. Its possible I'm
> testing a property relating to the original window being decorated,
> rather than the Drawable being rendered.

If the decoration drawables had depth 24, it should be the same issue
with DRI1, but that's been working fine for me for the last two years or
so.


> > > Is there some way to fake GL into thinking the non-copied texture from
> > > DRI2 is in fact RGB, not RGBA, just with a stride of 4 bytes?
> > 
> > That's basically how the DRI1 AIGLX zero-copy tfp code handles this. See
> > the code calling testTexOffset() in glx/glxdri.c and the corresponding
> > SetTexOffset hooks in
> > mesa/src/mesa/drivers/dri/{intel,r200,r300,radeon} . Something similar
> > should be possible with DRI2.
> 
> My first attempt at hacking round this was to call the SetTexOffset
> hook, but that didn't appear to work. Is it valid to do so for DRI2?

No, it's a DRI1 specific hack.

Probably the 3D driver setTexBuffer hook needs to make a similar texture
format override depending on the drawable depth.


I'll defer your other questions to Kristian Høgsberg, who wrote most of
the DRI2 code so far.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer



More information about the xorg mailing list