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. Actually the driver does not write 0, it writes the source alpha value (MACH64_ALPHA_DST_SRCALPHA) as far as I can tell.
Actually, this design means it would have some very limited support for blend_func_separate :-).
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 ;-).
In practice though, this might just work quite often, the alpha-blended alpha values are probably not required a lot?



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

Roland


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