MGA EXA: problems when writing to A8 textures/pictures

Tilman Sauerbeck tilman at code-monkey.de
Thu Sep 14 14:11:38 PDT 2006


Ville Syrjälä [2006-09-14 21:11]:
> On Thu, Sep 14, 2006 at 07:35:55PM +0200, Tilman Sauerbeck wrote:
> > Ville Syrjälä [2006-09-14 20:06]:
> > > On Thu, Sep 14, 2006 at 06:31:00PM +0200, Tilman Sauerbeck wrote:
> > > > Hi,
> > > > I'm almost finished with the EXA implementation in the MGA driver, but
> > > > I've got one major problem left.
> > > > 
> > > > Rendering to A8 textures is broken in weird ways. It's easily
> > > > reproducable with rendercheck doing Src blends (you'll need to get
> > > > rendercheck from git to see the errors though).
> > > 
> > > I had a quick look at the code.
> > > 
> > > Did you enable bypass332 and nodither bits in MACCESS? I didn't see it.
> > 
> > I think I didn't try the combination of these two flags recently.
> > Using both for A8->A8 writes fixes these rendering issues :)
> > 
> > It also adds more artefacts to A8 Add blends though, but these can
> > probably be fixed by adjusting DUALSTAGE0...

Okay, here's on the "a8 Add a8" blends (ie, sblendf is SRC_ONE, dblendf
is DST_ONE):

> IIRC TW8A actually behaves like I8, ie. every channel has the same 
> value.

That explains why for above mentioned blend I need to replicate the
alpha value to the "color channels" for the texture :)

I get a quite good result if I then omit the bypass332 flag (ie, disable
bypass332 mode). I still enable nodither though.

> I also noticed (with glean) that srcblendf and dstblendf (ALPHACTRL) 
> don't seem to work correctly when ADD is selected in the TDUALSTAGE 
> registers.

I wonder whether I should try loading the destination texture into the
2nd texture unit, perform an ADD of the alpha channels via DUALSTAGE,
and then use a SRC_ONE, DST_ZERO blend, ie, a staight copy...

Regards,
Tilman

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20060914/e7be60e0/attachment.pgp>


More information about the xorg mailing list