On Thu, Mar 03, 2005 at 08:10:33PM +0100, Roland Scheidegger wrote:
> Ville Syrjälä wrote:
> >>>Like I said before only the RGB components are blended. You can
> >>>choose to write 0, 1, As, 1-As, Ad or 1-Ad to the destination
> >>>alpha ([EMAIL PROTECTED] register). Currently the
> >>>driver seems to write 0. It would probably be a better idea to
> >>>write 1 instead.
> >>
> >>Sorry, but I just can't see that in the driver. And there's no 
> >>ALPHA_DST_SEL bit, at least not in the mach64 reg file I have...
> >
> >
> >I was just looking at the specs :) They are named MACH64_ALPHA_DST_*
> >in mach64_reg.h. The driver doesn't explicitly specify any value
> >which means 0 gets written.
> >
> >I actually just stumbled on this issue a few days ago with the mach64
> > DirectFB driver. My plan for the DirectFB driver is simply to allow
> >ZERO + ZERO/ONE/SRCALPHASAT blend functions for destinations with
> >alpha. It's a rather serious limitation but I think it's better than
> >incorrect rendering. The issue is even worse on older Rage chips
> >since they can only write 0 to the destination alpha. But that is not
> >an issue for the DRI driver since those chips aren't supported.
> I think now I understand. It has alpha channel and all, but it simply
> won't perform the blending equation on the alpha channel, instead simply 
> writing zero, one, source alpha, 1 - minus source alpha, dst alpha, or 1 
> - dst alpha.

Exactly.

> Actually the driver does not write 0, it writes the source 
> alpha value (MACH64_ALPHA_DST_SRCALPHA) as far as I can tell.

Ok I missed that with my grepping. I was probably looking for 
ALPHA_DST_SEL myself too :)

> Actually, this design means it would have some very limited support for 
> blend_func_separate :-).

I had the same though :)

> Looks like a stupid design limitation to me (what would it cost to 
> implement that additional blend adder to the 3 you need anyway?), but ah 
> well. Maybe this wasn't required by DirectX 1.0 ;-).

Mach64 chips have quite a few stupid alpha limitations. Most likely the 
nastiest one being that texture alpha can't be modulated. And then there's 
the whole fog vs. alpha thing.

> In practice though, this might just work quite often, the alpha-blended 
> alpha values are probably not required a lot?

Not with X. With DirectFB they are needed every time you render to an ARGB 
window and then expect to display the window alpha blended on screen.

> >>Regardless if it can actually blend alpha values or not, there
> >>would be some half-way useful alpha values probably in the buffer.
> >
> >
> >Either you get the correct results or the wrong results. Not sure if
> > there are any really useful things you can do with incorrect values.
> I meant that you might just get the correct alpha values sometimes 
> (depending on the blend func that should be true I guess).

Right. Though there are only a few combinations that give correct results.

-- 
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to