On Thu, Mar 03, 2005 at 06:49:26PM +0100, Roland Scheidegger wrote:
> Ville Syrjälä wrote:
> >On Thu, Mar 03, 2005 at 05:45:15PM +0100, Roland Scheidegger wrote:
> >
> >>Brian Paul wrote:
> >>
> >>>Roland Scheidegger wrote:
> >>>
> >>>
> >>>>here's a patch which mainly does 3 things: - convert sis, mach64,
> >>>>and radeon to spantmp2. The sis and mach64 drivers got a slight
> >>>>change, previously you could not read back alpha values (always
> >>>>0xff) and I don't think there was a good reason for that?
> >>>
> >>>
> >>>IIRC, the mach64 doesn't support destination alpha planes.  OpenGL 
> >>>requires that reads of absent alpha planes returns 1.0.  I don't know
> >>>if the SiS chip is the same.
> >>
> >>Are you sure? At least the driver handles things like GL_DST_ALPHA blend
> >>factors, wouldn't you get awfully bogus results if it wouldn't support 
> >>destination alpha planes in that case?
> >
> >
> >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.

> 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.

-- 
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